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
Vyper
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
define nonnull i32* @tgt(i32* readnone %0, i32 %1) { %3 = icmp eq i32 %1, 3 %4 = icmp eq i32 %1, 5 %5 = select i1 %4, i64 17, i64 15 %6 = select i1 %3, i64 13, i64 %5 %7 = getelementptr inbounds i32, i32* %0, i64 1 %8 = getelementptr inbounds i32, i32* %0, i64 2 %cgep = icmp eq i64 %6, 2 %selgep = select i1 %cgep, i32* %8, i32* %7 %9 = getelementptr inbounds i32, i32* %0, i64 3 %cgep1 = icmp eq i64 %6, 3 %selgep2 = select i1 %cgep1, i32* %9, i32* %selgep %10 = getelementptr inbounds i32, i32* %0, i64 4 %cgep3 = icmp eq i64 %6, 4 %selgep4 = select i1 %cgep3, i32* %10, i32* %selgep2 %11 = getelementptr inbounds i32, i32* %0, i64 5 %cgep5 = icmp eq i64 %6, 5 %selgep6 = select i1 %cgep5, i32* %11, i32* %selgep4 %12 = getelementptr inbounds i32, i32* %0, i64 6 %cgep7 = icmp eq i64 %6, 6 %selgep8 = select i1 %cgep7, i32* %12, i32* %selgep6 %13 = getelementptr inbounds i32, i32* %0, i64 7 %cgep9 = icmp eq i64 %6, 7 %selgep10 = select i1 %cgep9, i32* %13, i32* %selgep8 %14 = getelementptr inbounds i32, i32* %0, i64 8 %cgep11 = icmp eq i64 %6, 8 %selgep12 = select i1 %cgep11, i32* %14, i32* %selgep10 %15 = getelementptr inbounds i32, i32* %0, i64 9 %cgep13 = icmp eq i64 %6, 9 %selgep14 = select i1 %cgep13, i32* %15, i32* %selgep12 %16 = getelementptr inbounds i32, i32* %0, i64 10 %cgep15 = icmp eq i64 %6, 10 %selgep16 = select i1 %cgep15, i32* %16, i32* %selgep14 %17 = getelementptr inbounds i32, i32* %0, i64 11 %cgep17 = icmp eq i64 %6, 11 %selgep18 = select i1 %cgep17, i32* %17, i32* %selgep16 %18 = getelementptr inbounds i32, i32* %0, i64 12 %cgep19 = icmp eq i64 %6, 12 %selgep20 = select i1 %cgep19, i32* %18, i32* %selgep18 %19 = getelementptr inbounds i32, i32* %0, i64 13 %cgep21 = icmp eq i64 %6, 13 %selgep22 = select i1 %cgep21, i32* %19, i32* %selgep20 %20 = getelementptr inbounds i32, i32* %0, i64 14 %cgep23 = icmp eq i64 %6, 14 %selgep24 = select i1 %cgep23, i32* %20, i32* %selgep22 %21 = getelementptr inbounds i32, i32* %0, i64 15 %cgep25 = icmp eq i64 %6, 15 %selgep26 = select i1 %cgep25, i32* %21, i32* %selgep24 %22 = getelementptr inbounds i32, i32* %0, i64 16 %cgep27 = icmp eq i64 %6, 16 %selgep28 = select i1 %cgep27, i32* %22, i32* %selgep26 %23 = getelementptr inbounds i32, i32* %0, i64 17 %cgep29 = icmp eq i64 %6, 17 %selgep30 = select i1 %cgep29, i32* %23, i32* %selgep28 %24 = getelementptr inbounds i32, i32* %0, i64 18 %cgep31 = icmp eq i64 %6, 18 %selgep32 = select i1 %cgep31, i32* %24, i32* %selgep30 %25 = getelementptr inbounds i32, i32* %0, i64 19 %cgep33 = icmp eq i64 %6, 19 %selgep34 = select i1 %cgep33, i32* %25, i32* %selgep32 %26 = getelementptr inbounds i32, i32* %0, i64 20 %cgep35 = icmp eq i64 %6, 20 %selgep36 = select i1 %cgep35, i32* %26, i32* %selgep34 %27 = getelementptr inbounds i32, i32* %0, i64 21 %cgep37 = icmp eq i64 %6, 21 %selgep38 = select i1 %cgep37, i32* %27, i32* %selgep36 %28 = getelementptr inbounds i32, i32* %0, i64 22 %cgep39 = icmp eq i64 %6, 22 %selgep40 = select i1 %cgep39, i32* %28, i32* %selgep38 %29 = getelementptr inbounds i32, i32* %0, i64 23 %cgep41 = icmp eq i64 %6, 23 %selgep42 = select i1 %cgep41, i32* %29, i32* %selgep40 %30 = getelementptr inbounds i32, i32* %0, i64 24 %cgep43 = icmp eq i64 %6, 24 %selgep44 = select i1 %cgep43, i32* %30, i32* %selgep42 %31 = getelementptr inbounds i32, i32* %0, i64 25 %cgep45 = icmp eq i64 %6, 25 %selgep46 = select i1 %cgep45, i32* %31, i32* %selgep44 %32 = getelementptr inbounds i32, i32* %0, i64 26 %cgep47 = icmp eq i64 %6, 26 %selgep48 = select i1 %cgep47, i32* %32, i32* %selgep46 %33 = getelementptr inbounds i32, i32* %0, i64 27 %cgep49 = icmp eq i64 %6, 27 %selgep50 = select i1 %cgep49, i32* %33, i32* %selgep48 %34 = getelementptr inbounds i32, i32* %0, i64 28 %cgep51 = icmp eq i64 %6, 28 %selgep52 = select i1 %cgep51, i32* %34, i32* %selgep50 %35 = getelementptr inbounds i32, i32* %0, i64 29 %cgep53 = icmp eq i64 %6, 29 %selgep54 = select i1 %cgep53, i32* %35, i32* %selgep52 %36 = getelementptr inbounds i32, i32* %0, i64 30 %cgep55 = icmp eq i64 %6, 30 %selgep56 = select i1 %cgep55, i32* %36, i32* %selgep54 %37 = getelementptr inbounds i32, i32* %0, i64 31 %cgep57 = icmp eq i64 %6, 31 %selgep58 = select i1 %cgep57, i32* %37, i32* %selgep56 ret i32* %selgep58 }
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