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
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" target triple = "aarch64-unknown-linux-gnu" %"class.std::__1::complex" = type { float, float } @s_ref_real = dso_local local_unnamed_addr global [16 x [256 x float]] zeroinitializer, align 4 @s_ref_imag = dso_local local_unnamed_addr global [16 x [256 x float]] zeroinitializer, align 4 @padding_factor = dso_local local_unnamed_addr global float 0x3FF19999A0000000, align 4 @mdlComplex = dso_local global [10000 x %"class.std::__1::complex"] zeroinitializer, align 4 @indexarr = dso_local local_unnamed_addr global [1000 x i32] zeroinitializer, align 4 ; Function Attrs: mustprogress noinline uwtable vscale_range(1,16) define dso_local void @_Z3foov() local_unnamed_addr #0 { entry: br label %for.cond1.preheader for.cond1.preheader: ; preds = %entry, %for.cond.cleanup3 %kk.047 = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.cond.cleanup3 ] %pass.046 = phi i32 [ 0, %entry ], [ %inc31, %for.cond.cleanup3 ] br label %for.cond5.preheader for.cond.cleanup: ; preds = %for.cond.cleanup3 ret void for.cond5.preheader: ; preds = %for.cond1.preheader, %for.cond.cleanup7 %indvars.iv53 = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next54, %for.cond.cleanup7 ] %kk.145 = phi i64 [ %kk.047, %for.cond1.preheader ], [ %indvars.iv.next, %for.cond.cleanup7 ] %sext = shl i64 %kk.145, 32 %0 = ashr exact i64 %sext, 32 br label %for.body8 for.cond.cleanup3: ; preds = %for.cond.cleanup7 %inc31 = add nuw nsw i32 %pass.046, 1 %exitcond57.not = icmp eq i32 %inc31, 10 br i1 %exitcond57.not, label %for.cond.cleanup, label %for.cond1.preheader, !llvm.loop !6 for.cond.cleanup7: ; preds = %for.body8 %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1 %exitcond56.not = icmp eq i64 %indvars.iv.next54, 16 br i1 %exitcond56.not, label %for.cond.cleanup3, label %for.cond5.preheader, !llvm.loop !9 for.body8: ; preds = %for.cond5.preheader, %for.body8 %indvars.iv48 = phi i64 [ 0, %for.cond5.preheader ], [ %indvars.iv.next49, %for.body8 ] %indvars.iv = phi i64 [ %0, %for.cond5.preheader ], [ %indvars.iv.next, %for.body8 ] %arrayidx = getelementptr inbounds [1000 x i32], ptr @indexarr, i64 0, i64 %indvars.iv %1 = load i32, ptr %arrayidx, align 4, !tbaa !10 ; %idxprom9 = sext i32 %1 to i64 ; %arrayidx10 = getelementptr inbounds [10000 x %"class.std::__1::complex"], ptr @mdlComplex, i32 0, i32 %1 %arrayidx10.idx = shl nsw i32 %1, 3 %arrayidx10 = getelementptr inbounds i8, ptr @mdlComplex, i32 %arrayidx10.idx %2 = load float, ptr %arrayidx10, align 4, !tbaa !14 %__im_.i = getelementptr inbounds nuw i8, ptr %arrayidx10, i32 4 %3 = load float, ptr %__im_.i, align 4, !tbaa !17 %arrayidx20 = getelementptr inbounds [16 x [256 x float]], ptr @s_ref_real, i64 0, i64 %indvars.iv53, i64 %indvars.iv48 store float %2, ptr %arrayidx20, align 4, !tbaa !18 %arrayidx25 = getelementptr inbounds [16 x [256 x float]], ptr @s_ref_imag, i64 0, i64 %indvars.iv53, i64 %indvars.iv48 store float %3, ptr %arrayidx25, align 4, !tbaa !18 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1 %exitcond.not = icmp eq i64 %indvars.iv.next49, 256 br i1 %exitcond.not, label %for.cond.cleanup7, label %for.body8, !llvm.loop !19 } attributes #0 = { mustprogress noinline uwtable vscale_range(1,16) "approx-func-fp-math"="true" "frame-pointer"="non-leaf" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon,+sve,+sve2" "unsafe-fp-math"="true" } !6 = distinct !{!6, !7, !8} !7 = !{!"llvm.loop.mustprogress"} !8 = !{!"llvm.loop.unroll.disable"} !9 = distinct !{!9, !7, !8} !10 = !{!11, !11, i64 0} !11 = !{!"int", !12, i64 0} !12 = !{!"omnipotent char", !13, i64 0} !13 = !{!"Simple C++ TBAA"} !14 = !{!15, !16, i64 0} !15 = !{!"_ZTSNSt3__17complexIfEE", !16, i64 0, !16, i64 4} !16 = !{!"float", !12, i64 0} !17 = !{!15, !16, i64 4} !18 = !{!16, !16, i64 0} !19 = distinct !{!19, !7, !8, !20} !20 = !{!"llvm.loop.vectorize.enable", i1 true}
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