Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Algol68
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C with Coccinelle
C++ with Coccinelle
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
Mojo
Nim
Numba
Nix
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
PTX
Python
Racket
Raku
Ruby
Rust
Sail
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
Triton
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
sway
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 20.1.0
clang 21.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
hexagon-clang 16.0.5
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 20.1.0
llc 21.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 20.1.0
opt 21.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" target triple = "aarch64-unknown-linux-gnu" %"struct.LAMMPS_NS::HyperOneCoeff" = type { double, i32 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) define void @_ZN9LAMMPS_NS4ubufC2ERKi(ptr nocapture writeonly %this, ptr nocapture readonly %arg) local_unnamed_addr #0 { entry: %0 = load i32, ptr %arg, align 4 %conv = sext i32 %0 to i64 store i64 %conv, ptr %this, align 8 ret void } ; Function Attrs: nofree norecurse noreturn nosync nounwind memory(argmem: readwrite) vscale_range(4,4) define i32 @_ZN9LAMMPS_NS13FixHyperLocal17pack_reverse_commEiiPd(ptr nocapture writeonly %buf, ptr nocapture writeonly %0, ptr nocapture readonly %1, i32 %inc110, ptr nocapture readonly %2) local_unnamed_addr #1 { entry: %cmp951 = icmp sgt i32 %inc110, 0 br i1 %cmp951, label %for.cond72.us.preheader, label %for.cond72 for.cond72.us.preheader: ; preds = %entry %wide.trip.count = zext i32 %inc110 to i64 %scevgep = getelementptr i8, ptr %0, i64 8 %scevgep4 = getelementptr i8, ptr %buf, i64 8 %3 = shl nuw nsw i64 %wide.trip.count, 4 %4 = add nsw i64 %3, -8 %scevgep5 = getelementptr i8, ptr %2, i64 %4 %scevgep6 = getelementptr i8, ptr %1, i64 4 %min.iters.check = icmp ult i32 %inc110, 9 %bound0 = icmp ugt ptr %scevgep4, %0 %bound1 = icmp ugt ptr %scevgep, %buf %found.conflict = and i1 %bound0, %bound1 %bound07 = icmp ugt ptr %scevgep5, %0 %bound18 = icmp ugt ptr %scevgep, %2 %found.conflict9 = and i1 %bound18, %bound07 %conflict.rdx = or i1 %found.conflict, %found.conflict9 %bound010 = icmp ugt ptr %scevgep6, %0 %bound111 = icmp ugt ptr %scevgep, %1 %found.conflict12 = and i1 %bound111, %bound010 %conflict.rdx13 = or i1 %found.conflict12, %conflict.rdx %bound014 = icmp ugt ptr %scevgep5, %buf %bound115 = icmp ugt ptr %scevgep4, %2 %found.conflict16 = and i1 %bound115, %bound014 %conflict.rdx17 = or i1 %found.conflict16, %conflict.rdx13 %bound018 = icmp ugt ptr %scevgep6, %buf %bound119 = icmp ugt ptr %scevgep4, %1 %found.conflict20 = and i1 %bound119, %bound018 %conflict.rdx21 = or i1 %found.conflict20, %conflict.rdx17 %min.iters.check22 = icmp ult i32 %inc110, 17 %n.mod.vf = and i64 %wide.trip.count, 15 %5 = icmp eq i64 %n.mod.vf, 0 %6 = select i1 %5, i64 16, i64 %n.mod.vf %n.vec = sub nsw i64 %wide.trip.count, %6 %min.epilog.iters.check = icmp ult i64 %6, 9 %n.mod.vf23 = and i64 %wide.trip.count, 7 %7 = icmp eq i64 %n.mod.vf23, 0 %8 = select i1 %7, i64 8, i64 %n.mod.vf23 %n.vec24 = sub nsw i64 %wide.trip.count, %8 %brmerge = select i1 %min.iters.check, i1 true, i1 %conflict.rdx21 br label %iter.check iter.check.loopexit: ; preds = %for.body96.us br label %iter.check, !llvm.loop !0 iter.check: ; preds = %iter.check.loopexit, %for.cond72.us.preheader br i1 %brmerge, label %for.body96.us.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %iter.check br i1 %min.iters.check22, label %vec.epilog.ph, label %vector.ph vector.ph: ; preds = %vector.main.loop.iter.check %9 = load i32, ptr %1, align 4, !alias.scope !9 %broadcast.splatinsert = insertelement <vscale x 4 x i32> poison, i32 %9, i64 0 %broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer %10 = extractelement <vscale x 4 x i32> %broadcast.splat, i64 15 %11 = sext i32 %10 to i64 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %12 = getelementptr %"struct.LAMMPS_NS::HyperOneCoeff", ptr %2, i64 %index %wide.vec = load <vscale x 8 x double>, ptr %12, align 8 %strided.vec = tail call { <vscale x 4 x double>, <vscale x 4 x double> } @llvm.experimental.vector.deinterleave2.nxv8f64(<vscale x 8 x double> %wide.vec) %13 = extractvalue { <vscale x 4 x double>, <vscale x 4 x double> } %strided.vec, 0 %14 = extractelement <vscale x 4 x double> %13, i64 15 store double %14, ptr %0, align 8, !alias.scope !12, !noalias !14 store i64 %11, ptr %buf, align 8, !alias.scope !17, !noalias !18 %index.next = add nuw i64 %index, 16 %15 = icmp eq i64 %index.next, %n.vec br i1 %15, label %vec.epilog.iter.check, label %vector.body, !llvm.loop !3 vec.epilog.iter.check: ; preds = %vector.body br i1 %min.epilog.iters.check, label %for.body96.us.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vec.epilog.iter.check, %vector.main.loop.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] %16 = load i32, ptr %1, align 4, !alias.scope !19 %broadcast.splatinsert28 = insertelement <vscale x 2 x i32> poison, i32 %16, i64 0 %broadcast.splat29 = shufflevector <vscale x 2 x i32> %broadcast.splatinsert28, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer %17 = extractelement <vscale x 2 x i32> %broadcast.splat29, i64 7 %18 = sext i32 %17 to i64 br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index25 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next30, %vec.epilog.vector.body ] %19 = getelementptr %"struct.LAMMPS_NS::HyperOneCoeff", ptr %2, i64 %index25 %wide.vec26 = load <vscale x 4 x double>, ptr %19, align 8 %strided.vec27 = tail call { <vscale x 2 x double>, <vscale x 2 x double> } @llvm.experimental.vector.deinterleave2.nxv4f64(<vscale x 4 x double> %wide.vec26) %20 = extractvalue { <vscale x 2 x double>, <vscale x 2 x double> } %strided.vec27, 0 %21 = extractelement <vscale x 2 x double> %20, i64 7 store double %21, ptr %0, align 8, !alias.scope !22, !noalias !24 store i64 %18, ptr %buf, align 8, !alias.scope !27, !noalias !28 %index.next30 = add nuw i64 %index25, 8 %22 = icmp eq i64 %index.next30, %n.vec24 br i1 %22, label %for.body96.us.preheader, label %vec.epilog.vector.body, !llvm.loop !8 for.body96.us.preheader: ; preds = %vec.epilog.vector.body, %vec.epilog.iter.check, %iter.check %indvars.iv.ph = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %iter.check ], [ %n.vec24, %vec.epilog.vector.body ] br label %for.body96.us for.body96.us: ; preds = %for.body96.us.preheader, %for.body96.us %indvars.iv = phi i64 [ %indvars.iv.next, %for.body96.us ], [ %indvars.iv.ph, %for.body96.us.preheader ] %arrayidx100.us = getelementptr %"struct.LAMMPS_NS::HyperOneCoeff", ptr %2, i64 %indvars.iv %23 = load double, ptr %arrayidx100.us, align 8 store double %23, ptr %0, align 8 %24 = load i32, ptr %1, align 4 %conv.i.us = sext i32 %24 to i64 store i64 %conv.i.us, ptr %buf, align 8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %iter.check.loopexit, label %for.body96.us, !llvm.loop !0 for.cond72: ; preds = %entry, %for.cond72 br label %for.cond72 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none) declare { <vscale x 4 x double>, <vscale x 4 x double> } @llvm.experimental.vector.deinterleave2.nxv8f64(<vscale x 8 x double>) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none) declare { <vscale x 2 x double>, <vscale x 2 x double> } @llvm.experimental.vector.deinterleave2.nxv4f64(<vscale x 4 x double>) #2 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) } attributes #1 = { nofree norecurse noreturn nosync nounwind memory(argmem: readwrite) vscale_range(4,4) } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(none) } !0 = distinct !{!0, !1, !2, !6, !7, !4} !1 = !{!"llvm.loop.max.tripcount", i32 3} !2 = !{!"llvm.loop.isresidualloop", !3} !3 = distinct !{!3, !4, !5} !4 = !{!"llvm.loop.isvectorized", i32 1} !5 = !{!"llvm.loop.unroll.runtime.disable"} !6 = !{!"llvm.loop.max.tripcount", i32 1} !7 = !{!"llvm.loop.isresidualloop", !8} !8 = distinct !{!8, !1, !2, !4, !5} !9 = !{!10} !10 = distinct !{!10, !11} !11 = distinct !{!11, !"LVerDomain"} !12 = !{!13} !13 = distinct !{!13, !11} !14 = !{!15, !16, !10} !15 = distinct !{!15, !11} !16 = distinct !{!16, !11} !17 = !{!15} !18 = !{!16, !10} !19 = !{!20} !20 = distinct !{!20, !21} !21 = distinct !{!21, !"LVerDomain"} !22 = !{!23} !23 = distinct !{!23, !21} !24 = !{!25, !26, !20} !25 = distinct !{!25, !21} !26 = distinct !{!26, !21} !27 = !{!25} !28 = !{!26, !20}
Become a Patron
Sponsor on GitHub
Donate via PayPal
Compiler Explorer Shop
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
Statistics
Changelog
Version tree