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#
Go
Haskell
HLSL
Hook
Hylo
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
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
Zig
Javascript
GIMPLE
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 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 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 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
; ModuleID = 'foo.cpp' source_filename = "foo.cpp" target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i386-pc-windows-msvc19.11.0" ; Function Attrs: uwtable define dso_local i32 @"?orExpr@@YAHXZ"() local_unnamed_addr #0 { entry: %nodeStack = alloca [12 x i32], align 4 %0 = bitcast [12 x i32]* %nodeStack to i8* call void @llvm.lifetime.start.p0i8(i64 48, i8* nonnull %0) #3 %call25 = tail call i32 @"?unaryExpr@@YAHXZ"() %tobool.not26 = icmp eq i32 %call25, 0 br i1 %tobool.not26, label %cleanup, label %while.cond while.cond: ; preds = %entry, %while.cond.backedge %depth.1 = phi i32 [ %depth.1.be, %while.cond.backedge ], [ 0, %entry ] %pn.0 = phi i32 [ %pn.0.be, %while.cond.backedge ], [ %call25, %entry ] %cmp = icmp sgt i32 %depth.1, 0 br i1 %cmp, label %land.rhs, label %while.end land.rhs: ; preds = %while.cond %sub = add nsw i32 %depth.1, -1 %arrayidx = getelementptr inbounds [12 x i32], [12 x i32]* %nodeStack, i32 0, i32 %sub %1 = load i32, i32* %arrayidx, align 4, !tbaa !4 %call2 = tail call i32 @"?Precedence@@YAHH@Z"(i32 %1) %cmp3 = icmp sgt i32 %call2, -1 br i1 %cmp3, label %while.body, label %while.end while.body: ; preds = %land.rhs %call5 = tail call i32 (...) @"?handler__appendOrCreateList@@YAHZZ"(i32 %1, i32 %pn.0) %tobool6.not = icmp eq i32 %call5, 0 br i1 %tobool6.not, label %cleanup, label %while.cond.backedge while.cond.backedge: ; preds = %while.body, %while.end %depth.1.be = phi i32 [ %sub, %while.body ], [ %inc, %while.end ] %pn.0.be = phi i32 [ %call5, %while.body ], [ %call, %while.end ] br label %while.cond while.end: ; preds = %while.cond, %land.rhs tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !8 %arrayidx10 = getelementptr inbounds [12 x i32], [12 x i32]* %nodeStack, i32 0, i32 %depth.1 store i32 %pn.0, i32* %arrayidx10, align 4, !tbaa !4 %inc = add nsw i32 %depth.1, 1 tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !9 %call = tail call i32 @"?unaryExpr@@YAHXZ"() %tobool.not = icmp eq i32 %call, 0 br i1 %tobool.not, label %cleanup, label %while.cond.backedge cleanup: ; preds = %while.body, %while.end, %entry %call8 = tail call i32 @"?null@@YAHXZ"() call void @llvm.lifetime.end.p0i8(i64 48, i8* nonnull %0) #3 ret i32 %call8 } ; Function Attrs: argmemonly nounwind willreturn declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1 declare dso_local i32 @"?unaryExpr@@YAHXZ"() local_unnamed_addr #2 declare dso_local i32 @"?null@@YAHXZ"() local_unnamed_addr #2 declare dso_local i32 @"?Precedence@@YAHH@Z"(i32) local_unnamed_addr #2 declare dso_local i32 @"?handler__appendOrCreateList@@YAHZZ"(...) local_unnamed_addr #2 ; Function Attrs: argmemonly nounwind willreturn declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #1 attributes #0 = { uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { argmemonly nounwind willreturn } attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} !0 = !{i32 1, !"NumRegisterParameters", i32 0} !1 = !{i32 1, !"wchar_size", i32 2} !2 = !{i32 7, !"PIC Level", i32 2} !3 = !{!"clang version 12.0.0 (https://github.com/llvm/llvm-project c4f1b3144184e4c276a7e7c801cbcd4ac3c573ba)"} !4 = !{!5, !5, i64 0} !5 = !{!"int", !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C++ TBAA"} !8 = !{i32 563} !9 = !{i32 672}
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