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
Odin
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Slang
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
@__str = internal constant [49 x i8] c"deepak.ispc:2:9: Assertion failed: arg0 > arg1 \0A\00" @__str.1 = internal constant [49 x i8] c"deepak.ispc:2:9: Assertion failed: arg0 > arg1 \0A\00" ; Function Attrs: nounwind readnone declare i32 @llvm.x86.sse.movmsk.ps(<4 x float>) #0 ; Function Attrs: alwaysinline define void @__do_assume_uniform(i8* %str, i1 %test, <4 x i32> %mask) #1 { call void @llvm.assume(i1 %test) ret void } ; Function Attrs: nounwind willreturn declare void @llvm.assume(i1) #2 ; Function Attrs: nounwind define i32 @test_cond__uni___uniuni(i32 %arg0, i32 %arg1, <4 x i32> %__mask) #3 { allocas: %internal_mask_memory = alloca <4 x i32>, align 16 %full_mask_memory = alloca <4 x i32>, align 16 %returned_lanes_memory = alloca <4 x i32>, align 16 %launch_group_handle = alloca i8*, align 8 %return_value_memory = alloca i32, align 4 %arg01 = alloca i32, align 4 %arg12 = alloca i32, align 4 br label %entry entry: ; preds = %allocas store <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, <4 x i32>* %internal_mask_memory, align 16 store <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, <4 x i32>* %full_mask_memory, align 16 store <4 x i32> zeroinitializer, <4 x i32>* %returned_lanes_memory, align 16 store i8* null, i8** %launch_group_handle, align 8 store i32 %arg0, i32* %arg01, align 4 store i32 %arg1, i32* %arg12, align 4 %load_mask = load <4 x i32>, <4 x i32>* %internal_mask_memory, align 16 %"internal_mask&function_mask" = and <4 x i32> %load_mask, %__mask store <4 x i32> %"internal_mask&function_mask", <4 x i32>* %full_mask_memory, align 16 %floatmask.i = bitcast <4 x i32> %__mask to <4 x float> %v.i = call i32 @llvm.x86.sse.movmsk.ps(<4 x float> %floatmask.i) #0 %cmp.i = icmp eq i32 %v.i, 15 br i1 %cmp.i, label %all_on, label %some_on all_on: ; preds = %entry %load_mask3 = load <4 x i32>, <4 x i32>* %internal_mask_memory, align 16 %"internal_mask&function_mask4" = and <4 x i32> %load_mask3, <i32 -1, i32 -1, i32 -1, i32 -1> store <4 x i32> %"internal_mask&function_mask4", <4 x i32>* %full_mask_memory, align 16 %str_void_ptr = bitcast [49 x i8]* @__str to i8* %arg0_load = load i32, i32* %arg01, align 4 %arg1_load = load i32, i32* %arg12, align 4 %greater_arg0_load_arg1_load = icmp sgt i32 %arg0_load, %arg1_load %load_mask5 = load <4 x i32>, <4 x i32>* %internal_mask_memory, align 16 %"internal_mask&function_mask6" = and <4 x i32> %load_mask5, <i32 -1, i32 -1, i32 -1, i32 -1> call void @llvm.assume(i1 %greater_arg0_load_arg1_load) %arg0_load7 = load i32, i32* %arg01, align 4 %arg1_load8 = load i32, i32* %arg12, align 4 %greater_arg0_load7_arg1_load8 = icmp sgt i32 %arg0_load7, %arg1_load8 %load_mask9 = load <4 x i32>, <4 x i32>* %internal_mask_memory, align 16 br i1 %greater_arg0_load7_arg1_load8, label %if_then, label %if_else if_then: ; preds = %all_on store i32 0, i32* %return_value_memory, align 4 %return_value = load i32, i32* %return_value_memory, align 4 ret i32 %return_value if_else: ; preds = %all_on br label %if_exit if_exit: ; preds = %if_else store i32 1, i32* %return_value_memory, align 4 %return_value10 = load i32, i32* %return_value_memory, align 4 ret i32 %return_value10 some_on: ; preds = %entry %load_mask11 = load <4 x i32>, <4 x i32>* %internal_mask_memory, align 16 %"internal_mask&function_mask12" = and <4 x i32> %load_mask11, %__mask store <4 x i32> %"internal_mask&function_mask12", <4 x i32>* %full_mask_memory, align 16 %str_void_ptr13 = bitcast [49 x i8]* @__str.1 to i8* %arg0_load14 = load i32, i32* %arg01, align 4 %arg1_load15 = load i32, i32* %arg12, align 4 %greater_arg0_load14_arg1_load15 = icmp sgt i32 %arg0_load14, %arg1_load15 %load_mask16 = load <4 x i32>, <4 x i32>* %internal_mask_memory, align 16 %"internal_mask&function_mask17" = and <4 x i32> %load_mask16, %__mask call void @llvm.assume(i1 %greater_arg0_load14_arg1_load15) %arg0_load18 = load i32, i32* %arg01, align 4 %arg1_load19 = load i32, i32* %arg12, align 4 %greater_arg0_load18_arg1_load19 = icmp sgt i32 %arg0_load18, %arg1_load19 %load_mask20 = load <4 x i32>, <4 x i32>* %internal_mask_memory, align 16 br i1 %greater_arg0_load18_arg1_load19, label %if_then21, label %if_else22 if_then21: ; preds = %some_on store i32 0, i32* %return_value_memory, align 4 %return_value24 = load i32, i32* %return_value_memory, align 4 ret i32 %return_value24 if_else22: ; preds = %some_on br label %if_exit23 if_exit23: ; preds = %if_else22 store i32 1, i32* %return_value_memory, align 4 %return_value25 = load i32, i32* %return_value_memory, align 4 ret i32 %return_value25 } attributes #0 = { nounwind readnone } attributes #1 = { alwaysinline } attributes #2 = { nounwind willreturn } attributes #3 = { nounwind }
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