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-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: noinline define void @_Z18Softmax_ActivationPA10_fS0_([10 x float]* %l_Z2, [10 x float]* %out) #0 { entry: %l_Z2.addr = alloca [10 x float]*, align 8 %out.addr = alloca [10 x float]*, align 8 %max = alloca [10 x float], align 16 %i = alloca i32, align 4 %j = alloca i32, align 4 store [10 x float]* %l_Z2, [10 x float]** %l_Z2.addr, align 8 store [10 x float]* %out, [10 x float]** %out.addr, align 8 br label %SA_MAX2 SA_MAX2: ; preds = %entry store i32 0, i32* %i, align 4 br label %for.cond for.cond: ; preds = %for.inc17, %SA_MAX2 %0 = load i32, i32* %i, align 4 %cmp = icmp slt i32 %0, 10 br i1 %cmp, label %for.body, label %for.end19 for.body: ; preds = %for.cond %1 = load i32, i32* %i, align 4 %idxprom = sext i32 %1 to i64 %arrayidx = getelementptr inbounds [10 x float], [10 x float]* %max, i64 0, i64 %idxprom store float 0.000000e+00, float* %arrayidx, align 4 br label %SA_MAX1 SA_MAX1: ; preds = %for.body store i32 0, i32* %j, align 4 br label %for.cond1 for.cond1: ; preds = %for.inc, %SA_MAX1 %2 = load i32, i32* %j, align 4 %cmp2 = icmp slt i32 %2, 10 br i1 %cmp2, label %for.body3, label %for.end for.body3: ; preds = %for.cond1 %3 = load [10 x float]*, [10 x float]** %l_Z2.addr, align 8 %4 = load i32, i32* %j, align 4 %idxprom4 = sext i32 %4 to i64 %arrayidx5 = getelementptr inbounds [10 x float], [10 x float]* %3, i64 %idxprom4 %5 = load i32, i32* %i, align 4 %idxprom6 = sext i32 %5 to i64 %arrayidx7 = getelementptr inbounds [10 x float], [10 x float]* %arrayidx5, i64 0, i64 %idxprom6 %6 = load float, float* %arrayidx7, align 4 %7 = load i32, i32* %i, align 4 %idxprom8 = sext i32 %7 to i64 %arrayidx9 = getelementptr inbounds [10 x float], [10 x float]* %max, i64 0, i64 %idxprom8 %8 = load float, float* %arrayidx9, align 4 %cmp10 = fcmp ogt float %6, %8 br i1 %cmp10, label %if.then, label %if.end if.then: ; preds = %for.body3 %9 = load [10 x float]*, [10 x float]** %l_Z2.addr, align 8 %10 = load i32, i32* %j, align 4 %idxprom11 = sext i32 %10 to i64 %arrayidx12 = getelementptr inbounds [10 x float], [10 x float]* %9, i64 %idxprom11 %11 = load i32, i32* %i, align 4 %idxprom13 = sext i32 %11 to i64 %arrayidx14 = getelementptr inbounds [10 x float], [10 x float]* %arrayidx12, i64 0, i64 %idxprom13 %12 = load float, float* %arrayidx14, align 4 %13 = load i32, i32* %i, align 4 %idxprom15 = sext i32 %13 to i64 %arrayidx16 = getelementptr inbounds [10 x float], [10 x float]* %max, i64 0, i64 %idxprom15 store float %12, float* %arrayidx16, align 4 br label %if.end if.end: ; preds = %if.then, %for.body3 br label %for.inc for.inc: ; preds = %if.end %14 = load i32, i32* %j, align 4 %inc = add nsw i32 %14, 1 store i32 %inc, i32* %j, align 4 br label %for.cond1 for.end: ; preds = %for.cond1 br label %for.inc17 for.inc17: ; preds = %for.end %15 = load i32, i32* %i, align 4 %inc18 = add nsw i32 %15, 1 store i32 %inc18, i32* %i, align 4 br label %for.cond for.end19: ; preds = %for.cond %16 = load [10 x float]*, [10 x float]** %out.addr, align 8 %arraydecay = getelementptr inbounds [10 x float], [10 x float]* %max, i32 0, i32 0 call void @_Z3fooPA10_fPf([10 x float]* %16, float* %arraydecay) ret void } declare void @_Z3fooPA10_fPf([10 x float]*, float*) #1 attributes #0 = { noinline "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
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