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
; ModuleID = 'test.6a688027-cgu.0' source_filename = "test.6a688027-cgu.0" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" %Blueprint = type { [0 x i32], i32, [0 x i32], i32, [0 x i32], i32, [0 x i32], i32, [0 x i32] } ; <test::Blueprint as core::cmp::PartialEq>::eq ; Function Attrs: nonlazybind uwtable define zeroext i1 @"_ZN56_$LT$test..Blueprint$u20$as$u20$core..cmp..PartialEq$GT$2eq17h4a7cb9f8e3ef5288E"(%Blueprint* noalias readonly align 4 dereferenceable(16) %self, %Blueprint* noalias readonly align 4 dereferenceable(16) %other) unnamed_addr #0 { start: %_4 = alloca i8, align 1 %_3 = alloca i8, align 1 %0 = alloca i8, align 1 call void @llvm.lifetime.start.p0i8(i64 1, i8* %_3) call void @llvm.lifetime.start.p0i8(i64 1, i8* %_4) %1 = bitcast %Blueprint* %self to i32* %_6 = load i32, i32* %1, align 4 %2 = bitcast %Blueprint* %other to i32* %_7 = load i32, i32* %2, align 4 %_5 = icmp eq i32 %_6, %_7 br i1 %_5, label %bb8, label %bb7 bb7: ; preds = %start store i8 0, i8* %_4, align 1 br label %bb9 bb8: ; preds = %start %3 = getelementptr inbounds %Blueprint, %Blueprint* %self, i32 0, i32 3 %_9 = load i32, i32* %3, align 4 %4 = getelementptr inbounds %Blueprint, %Blueprint* %other, i32 0, i32 3 %_10 = load i32, i32* %4, align 4 %_8 = icmp eq i32 %_9, %_10 %5 = zext i1 %_8 to i8 store i8 %5, i8* %_4, align 1 br label %bb9 bb9: ; preds = %bb7, %bb8 %6 = load i8, i8* %_4, align 1, !range !2 %7 = trunc i8 %6 to i1 br i1 %7, label %bb5, label %bb4 bb4: ; preds = %bb9 store i8 0, i8* %_3, align 1 br label %bb6 bb5: ; preds = %bb9 %8 = getelementptr inbounds %Blueprint, %Blueprint* %self, i32 0, i32 5 %_12 = load i32, i32* %8, align 4 %9 = getelementptr inbounds %Blueprint, %Blueprint* %other, i32 0, i32 5 %_13 = load i32, i32* %9, align 4 %_11 = icmp eq i32 %_12, %_13 %10 = zext i1 %_11 to i8 store i8 %10, i8* %_3, align 1 br label %bb6 bb6: ; preds = %bb4, %bb5 call void @llvm.lifetime.end.p0i8(i64 1, i8* %_4) %11 = load i8, i8* %_3, align 1, !range !2 %12 = trunc i8 %11 to i1 br i1 %12, label %bb2, label %bb1 bb1: ; preds = %bb6 store i8 0, i8* %0, align 1 br label %bb3 bb2: ; preds = %bb6 %13 = getelementptr inbounds %Blueprint, %Blueprint* %self, i32 0, i32 7 %_15 = load i32, i32* %13, align 4 %14 = getelementptr inbounds %Blueprint, %Blueprint* %other, i32 0, i32 7 %_16 = load i32, i32* %14, align 4 %_14 = icmp eq i32 %_15, %_16 %15 = zext i1 %_14 to i8 store i8 %15, i8* %0, align 1 br label %bb3 bb3: ; preds = %bb1, %bb2 call void @llvm.lifetime.end.p0i8(i64 1, i8* %_3) %16 = load i8, i8* %0, align 1, !range !2 %17 = trunc i8 %16 to i1 ret i1 %17 } ; Function Attrs: argmemonly nofree nosync nounwind willreturn declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1 ; Function Attrs: argmemonly nofree nosync nounwind willreturn declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #1 attributes #0 = { nonlazybind uwtable "probe-stack"="__rust_probestack" "target-cpu"="x86-64" } attributes #1 = { argmemonly nofree nosync nounwind willreturn } !llvm.module.flags = !{!0, !1} !0 = !{i32 7, !"PIC Level", i32 2} !1 = !{i32 2, !"RtLibUseGOT", i32 1} !2 = !{i8 0, i8 2}
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