Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Nim
Objective-C
Objective-C++
OCaml
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
WASM
Zig
Javascript
GIMPLE
Ygen
llvm source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
clang (assertions trunk)
clang (trunk)
clang 10.0.0
clang 10.0.1
clang 11.0.0
clang 11.0.1
clang 12.0.0
clang 12.0.1
clang 13.0.0
clang 14.0.0
clang 15.0.0
clang 16.0.0
clang 17.0.1
clang 18.1.0
clang 19.1.0
clang 4.0.1
clang 5.0.0
clang 6.0.0
clang 7.0.0
clang 8.0.0
clang 9.0.0
llc (assertions trunk)
llc (trunk)
llc 10.0.0
llc 10.0.1
llc 11.0.0
llc 11.0.1
llc 12.0.0
llc 12.0.1
llc 13.0.0
llc 14.0.0
llc 15.0.0
llc 16.0.0
llc 17.0.1
llc 18.1.0
llc 19.1.0
llc 3.2
llc 3.3
llc 3.9.1
llc 4.0.0
llc 4.0.1
llc 5.0.0
llc 6.0.0
llc 7.0.0
llc 8.0.0
llc 9.0.0
opt (assertions trunk)
opt (trunk)
opt 10.0.0
opt 10.0.1
opt 11.0.0
opt 11.0.1
opt 12.0.0
opt 12.0.1
opt 13.0.0
opt 14.0.0
opt 15.0.0
opt 16.0.0
opt 17.0.1
opt 18.1.0
opt 19.1.0
opt 3.2
opt 3.3
opt 3.9.1
opt 4.0.0
opt 4.0.1
opt 5.0.0
opt 6.0.0
opt 7.0.0
opt 8.0.0
opt 9.0.0
Options
Source code
; ModuleID = 'broken.ll' source_filename = "start" 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-G1-ni:10:11:12:13" target triple = "amdgcn-amd-amdhsa" ; Function Attrs: nounwind readnone speculatable willreturn declare i32 @llvm.amdgcn.workitem.id.x() #0 define amdgpu_kernel void @wibble({ i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, i64, i64 } %arg, i64 zeroext %arg1, i64 signext %arg2, i64 signext %arg3) local_unnamed_addr #1 { bb: %tmp = call i32 @llvm.amdgcn.workitem.id.x(), !range !7 %tmp4 = icmp ugt i32 %tmp, 9 br i1 %tmp4, label %bb23, label %bb24 bb24: ; preds = %bb %tmp25 = sub i64 0, %arg2 %tmp26 = icmp sgt i64 %tmp25, %arg2 %tmp27 = sext i1 %tmp26 to i64 %tmp28 = xor i64 %tmp27, %arg2 %tmp29 = icmp slt i64 %tmp28, %tmp25 br i1 %tmp29, label %bb18, label %bb30 bb30: ; preds = %bb24 %tmp31 = sub i64 0, %arg3 %tmp32 = icmp sgt i64 %tmp31, %arg3 %tmp33 = sext i1 %tmp32 to i64 %tmp34 = xor i64 %tmp33, %arg3 %tmp35 = icmp slt i64 %tmp34, %tmp31 br label %bb5 bb5: ; preds = %bb30, %bb14 %tmp6 = phi i64 [ %tmp17, %bb14 ], [ %tmp25, %bb30 ] %tmp7 = phi double [ %tmp15, %bb14 ], [ 0.000000e+00, %bb30 ] br i1 %tmp35, label %bb14, label %bb8 bb8: ; preds = %bb8, %bb5 %tmp9 = phi double [ %tmp11, %bb8 ], [ %tmp7, %bb5 ] %tmp10 = phi i64 [ %tmp13, %bb8 ], [ %tmp31, %bb5 ] %tmp11 = fadd double %tmp9, 1.000000e+00 %tmp12 = icmp eq i64 %tmp10, %tmp34 %tmp13 = add i64 %tmp10, 1 br i1 %tmp12, label %bb14, label %bb8 bb14: ; preds = %bb8, %bb5 %tmp15 = phi double [ %tmp7, %bb5 ], [ %tmp11, %bb8 ] %tmp16 = icmp eq i64 %tmp6, %tmp28 %tmp17 = add i64 %tmp6, 1 br i1 %tmp16, label %bb18, label %bb5 bb18: ; preds = %bb24, %bb14 %tmp19 = phi double [ 0.000000e+00, %bb24 ], [ %tmp15, %bb14 ] %tmp20 = zext i32 %tmp to i64 %tmp21 = inttoptr i64 %arg1 to double* %tmp22 = getelementptr inbounds double, double* %tmp21, i64 %tmp20 store double %tmp19, double* %tmp22, align 1, !tbaa !8, !alias.scope !12, !noalias !15 br label %bb23 bb23: ; preds = %bb18, %bb ret void } attributes #0 = { nounwind readnone speculatable willreturn } attributes #1 = { "amdgpu-unsafe-fp-atomics"="true" "target-cpu"="gfx1103" "target-features"="+wavefrontsize32,-wavefrontsize64" } !llvm.module.flags = !{!0, !1, !2, !3} !opencl.ocl.version = !{!4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4} !llvm.ident = !{!5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5} !julia.kernel = !{!6} !0 = !{i32 2, !"Dwarf Version", i32 4} !1 = !{i32 2, !"Debug Info Version", i32 3} !2 = !{i32 1, !"wchar_size", i32 4} !3 = !{i32 7, !"PIC Level", i32 1} !4 = !{i32 2, i32 0} !5 = !{!"clang version 15.0.0 (/cache/yggdrasil/downloads/clones/llvm-project.git-974efd367bc513231526d317489c66cb27727ef3caa41108e3819c131a8acf57 f3d695fc2985a8dfdd5f4219d351fdeac3038867)"} !6 = !{void ({ i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, i64, i64 }, i64, i64, i64)* @wibble} !7 = !{i32 0, i32 1023} !8 = !{!9, !9, i64 0} !9 = !{!"jtbaa_data", !10, i64 0} !10 = !{!"jtbaa", !11, i64 0} !11 = !{!"jtbaa"} !12 = !{!13} !13 = !{!"jnoalias_data", !14} !14 = !{!"jnoalias"} !15 = !{!16, !17, !18, !19} !16 = !{!"jnoalias_gcframe", !14} !17 = !{!"jnoalias_stack", !14} !18 = !{!"jnoalias_typemd", !14} !19 = !{!"jnoalias_const", !14}
llvm source #2
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
clang (assertions trunk)
clang (trunk)
clang 10.0.0
clang 10.0.1
clang 11.0.0
clang 11.0.1
clang 12.0.0
clang 12.0.1
clang 13.0.0
clang 14.0.0
clang 15.0.0
clang 16.0.0
clang 17.0.1
clang 18.1.0
clang 19.1.0
clang 4.0.1
clang 5.0.0
clang 6.0.0
clang 7.0.0
clang 8.0.0
clang 9.0.0
llc (assertions trunk)
llc (trunk)
llc 10.0.0
llc 10.0.1
llc 11.0.0
llc 11.0.1
llc 12.0.0
llc 12.0.1
llc 13.0.0
llc 14.0.0
llc 15.0.0
llc 16.0.0
llc 17.0.1
llc 18.1.0
llc 19.1.0
llc 3.2
llc 3.3
llc 3.9.1
llc 4.0.0
llc 4.0.1
llc 5.0.0
llc 6.0.0
llc 7.0.0
llc 8.0.0
llc 9.0.0
opt (assertions trunk)
opt (trunk)
opt 10.0.0
opt 10.0.1
opt 11.0.0
opt 11.0.1
opt 12.0.0
opt 12.0.1
opt 13.0.0
opt 14.0.0
opt 15.0.0
opt 16.0.0
opt 17.0.1
opt 18.1.0
opt 19.1.0
opt 3.2
opt 3.3
opt 3.9.1
opt 4.0.0
opt 4.0.1
opt 5.0.0
opt 6.0.0
opt 7.0.0
opt 8.0.0
opt 9.0.0
Options
Source code
; ModuleID = 'broken.ll' source_filename = "start" 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-G1-ni:10:11:12:13" target triple = "amdgcn-amd-amdhsa" ; Function Attrs: nounwind readnone speculatable willreturn declare i32 @llvm.amdgcn.workitem.id.x() #0 define amdgpu_kernel void @wibble({ i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, i64, i64 } %arg, i64 zeroext %arg1, i64 signext %arg2, i64 signext %arg3) local_unnamed_addr #1 { bb: %tmp = call i32 @llvm.amdgcn.workitem.id.x(), !range !7 %tmp4 = icmp ugt i32 %tmp, 9 br i1 %tmp4, label %bb23, label %bb24 bb5: ; preds = %bb30, %bb14 %tmp6 = phi i64 [ %tmp17, %bb14 ], [ %tmp25, %bb30 ] %tmp7 = phi double [ %tmp15, %bb14 ], [ 0.000000e+00, %bb30 ] br i1 %tmp35, label %bb14, label %bb8 bb8: ; preds = %bb8, %bb5 %tmp9 = phi double [ %tmp11, %bb8 ], [ %tmp7, %bb5 ] %tmp10 = phi i64 [ %tmp13, %bb8 ], [ %tmp31, %bb5 ] %tmp11 = fadd double %tmp9, 1.000000e+00 %tmp12 = icmp eq i64 %tmp10, %tmp34 %tmp13 = add i64 %tmp10, 1 br i1 %tmp12, label %bb14, label %bb8 bb14: ; preds = %bb8, %bb5 %tmp15 = phi double [ %tmp7, %bb5 ], [ %tmp11, %bb8 ] %tmp16 = icmp eq i64 %tmp6, %tmp28 %tmp17 = add i64 %tmp6, 1 br i1 %tmp16, label %bb18, label %bb5 bb18: ; preds = %bb24, %bb14 %tmp19 = phi double [ 0.000000e+00, %bb24 ], [ %tmp15, %bb14 ] %tmp20 = zext i32 %tmp to i64 %tmp21 = inttoptr i64 %arg1 to double* %tmp22 = getelementptr inbounds double, double* %tmp21, i64 %tmp20 store double %tmp19, double* %tmp22, align 1, !tbaa !8, !alias.scope !12, !noalias !15 br label %bb23 bb23: ; preds = %bb18, %bb ret void bb24: ; preds = %bb %tmp25 = sub i64 0, %arg2 %tmp26 = icmp sgt i64 %tmp25, %arg2 %tmp27 = sext i1 %tmp26 to i64 %tmp28 = xor i64 %tmp27, %arg2 %tmp29 = icmp slt i64 %tmp28, %tmp25 br i1 %tmp29, label %bb18, label %bb30 bb30: ; preds = %bb24 %tmp31 = sub i64 0, %arg3 %tmp32 = icmp sgt i64 %tmp31, %arg3 %tmp33 = sext i1 %tmp32 to i64 %tmp34 = xor i64 %tmp33, %arg3 %tmp35 = icmp slt i64 %tmp34, %tmp31 br label %bb5 } attributes #0 = { nounwind readnone speculatable willreturn } attributes #1 = { "amdgpu-unsafe-fp-atomics"="true" "target-cpu"="gfx1103" "target-features"="+wavefrontsize32,-wavefrontsize64" } !llvm.module.flags = !{!0, !1, !2, !3} !opencl.ocl.version = !{!4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4, !4} !llvm.ident = !{!5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5, !5} !julia.kernel = !{!6} !0 = !{i32 2, !"Dwarf Version", i32 4} !1 = !{i32 2, !"Debug Info Version", i32 3} !2 = !{i32 1, !"wchar_size", i32 4} !3 = !{i32 7, !"PIC Level", i32 1} !4 = !{i32 2, i32 0} !5 = !{!"clang version 15.0.0 (/cache/yggdrasil/downloads/clones/llvm-project.git-974efd367bc513231526d317489c66cb27727ef3caa41108e3819c131a8acf57 f3d695fc2985a8dfdd5f4219d351fdeac3038867)"} !6 = !{void ({ i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, i64, i64 }, i64, i64, i64)* @wibble} !7 = !{i32 0, i32 1023} !8 = !{!9, !9, i64 0} !9 = !{!"jtbaa_data", !10, i64 0} !10 = !{!"jtbaa", !11, i64 0} !11 = !{!"jtbaa"} !12 = !{!13} !13 = !{!"jnoalias_data", !14} !14 = !{!"jnoalias"} !15 = !{!16, !17, !18, !19} !16 = !{!"jnoalias_gcframe", !14} !17 = !{!"jnoalias_stack", !14} !18 = !{!"jnoalias_typemd", !14} !19 = !{!"jnoalias_const", !14}
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
About the author
Statistics
Changelog
Version tree