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
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
sway
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 20.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 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 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
@test.l_in1 = linkonce dso_local local_unnamed_addr addrspace(3) global [16384 x i8] undef, section "0", align 1 #0 @test.l_out = linkonce dso_local local_unnamed_addr addrspace(3) global [16384 x i8] undef, section "1", align 1 #0 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #1 ; Function Attrs: nofree noinline norecurse nosync nounwind optsize memory(readwrite, argmem: none, inaccessiblemem: write) define void @test(i32 %size) local_unnamed_addr #2 { newFuncRoot: %cmp.i.cloned = icmp ne i32 %size, 0 tail call void @llvm.assume(i1 %cmp.i.cloned) %cmp1.i.cloned = icmp ult i32 %size, 65537 tail call void @llvm.assume(i1 %cmp1.i.cloned) br label %for.body.preheader for.body.preheader: ; preds = %newFuncRoot br label %for.body common.ret.loopexit: ; preds = %for.body ret void for.body: ; preds = %for.body, %for.body.preheader %iterations.02 = phi i32 [ %dec, %for.body ], [ %size, %for.body.preheader ] %x.01 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ] %arrayidx = getelementptr inbounds [16384 x i8], ptr addrspace(3) @test.l_in1, i32 0, i32 %x.01 %0 = load i8, ptr addrspace(3) %arrayidx, align 1, !tbaa !0, !llvm.access.group !3, !eyeq_nlcd !4 %arrayidx9 = getelementptr inbounds [16384 x i8], ptr addrspace(3) @test.l_out, i32 0, i32 %x.01 store i8 %0, ptr addrspace(3) %arrayidx9, align 1, !tbaa !0, !llvm.access.group !3, !eyeq_nlcd !5 %dec = add nsw i32 %iterations.02, -1 %inc = add nuw nsw i32 %x.01, 1 %cmp8 = icmp slt i32 %inc, %dec ; %cmp8 = icmp sgt i32 %dec, %inc br i1 %cmp8, label %for.body, label %common.ret.loopexit, !llvm.loop !6 } attributes #0 = { "ocl-local-decl-context-name"="test" "uninit" } attributes #1 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #2 = { nofree noinline norecurse nosync nounwind optsize memory(readwrite, argmem: none, inaccessiblemem: write) "frame-pointer"="all" "no-jump-tables"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } !0 = !{!1, !1, i64 0} !1 = !{!"omnipotent char", !2, i64 0} !2 = !{!"Simple C/C++ TBAA"} !3 = distinct !{} !4 = distinct !{} !5 = distinct !{} !6 = distinct !{!6, !7, !8, !9, !10, !11} !7 = !{!"llvm.loop.parallel_accesses", !3} !8 = !{!"llvm.loop.vectorize.enable", i1 true} !9 = !{!"llvm.loop.vectorize.width", i32 32} !10 = !{!"llvm.loop.vectorize.scalable.enable", i1 false} !11 = !{!"llvm.loop.interleave.count", i32 1}
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
CE on Bluesky
About the author
Statistics
Changelog
Version tree