Created
October 16, 2020 00:03
-
-
Save Artem-B/98a4420dda4f0c36364ddc170a8b12c5 to your computer and use it in GitHub Desktop.
LLVM crash repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'x2.bc' | |
source_filename = "merged_12-9d953f.hip.i.cc" | |
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-ni:7" | |
target triple = "amdgcn-amd-amdhsa" | |
%struct.wibble = type { <4 x float> } | |
%struct.wombat = type { float } | |
@global = external hidden addrspace(1) global %struct.wibble*, align 8 | |
; Function Attrs: convergent norecurse nounwind | |
define protected amdgpu_kernel void @widget() local_unnamed_addr #0 { | |
bb: | |
%tmp = alloca %struct.wombat, align 4, addrspace(5) | |
%tmp1 = addrspacecast %struct.wombat addrspace(5)* %tmp to %struct.wombat* | |
%tmp2 = bitcast %struct.wombat addrspace(5)* %tmp to i8 addrspace(5)* | |
call void @llvm.lifetime.start.p5i8(i64 4, i8 addrspace(5)* %tmp2) #3 | |
call void @barney(%struct.wombat* %tmp1) #4 | |
%tmp3 = getelementptr inbounds %struct.wombat, %struct.wombat* %tmp1, i64 0, i32 0 | |
%tmp4 = load float, float* %tmp3, align 4, !tbaa !3 | |
%tmp5 = insertelement <4 x float> undef, float %tmp4, i32 0 | |
%tmp6 = shufflevector <4 x float> %tmp5, <4 x float> undef, <4 x i32> zeroinitializer | |
%tmp7 = load <4 x float>*, <4 x float>** addrspacecast (<4 x float>* addrspace(1)* bitcast (%struct.wibble* addrspace(1)* @global to <4 x float>* addrspace(1)*) to <4 x float>**), align 8, !tbaa !8 | |
store <4 x float> %tmp6, <4 x float>* %tmp7, align 16, !tbaa.struct !10 | |
call void @llvm.lifetime.end.p5i8(i64 4, i8 addrspace(5)* %tmp2) #3 | |
ret void | |
} | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.lifetime.start.p5i8(i64 immarg, i8 addrspace(5)* nocapture) #1 | |
; Function Attrs: convergent nounwind | |
declare hidden void @barney(%struct.wombat*) #2 | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.lifetime.end.p5i8(i64 immarg, i8 addrspace(5)* nocapture) #1 | |
attributes #0 = { convergent norecurse nounwind "amdgpu-flat-work-group-size"="1,1024" "amdgpu-implicitarg-num-bytes"="56" "denormal-fp-math-f32"="preserve-sign,preserve-sign" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx803" "target-features"="+16-bit-insts,+ci-insts,+dpp,+flat-address-space,+gfx8-insts,+s-memrealtime" "uniform-work-group-size"="true" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #1 = { argmemonly nounwind willreturn } | |
attributes #2 = { convergent nounwind "denormal-fp-math-f32"="preserve-sign,preserve-sign" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx803" "target-features"="+16-bit-insts,+ci-insts,+dpp,+flat-address-space,+gfx8-insts,+s-memrealtime" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #3 = { convergent nounwind "denormal-fp-math-f32"="preserve-sign,preserve-sign" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx803" "target-features"="+16-bit-insts,+ci-insts,+dpp,+flat-address-space,+gfx8-insts,+s-memrealtime" "unsafe-fp-math"="false" "use-soft-float"="false" } | |
attributes #4 = { nounwind } | |
!llvm.module.flags = !{!0, !1} | |
!llvm.ident = !{!2} | |
!0 = !{i32 1, !"wchar_size", i32 4} | |
!1 = !{i32 7, !"PIC Level", i32 1} | |
!2 = !{!"clang version 12.0.0"} | |
!3 = !{!4, !5, i64 0} | |
!4 = !{!"_ZTS1c", !5, i64 0} | |
!5 = !{!"float", !6, i64 0} | |
!6 = !{!"omnipotent char", !7, i64 0} | |
!7 = !{!"Simple C++ TBAA"} | |
!8 = !{!9, !9, i64 0} | |
!9 = !{!"any pointer", !6, i64 0} | |
!10 = !{i64 0, i64 16, !11} | |
!11 = !{!6, !6, i64 0} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stack: