Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Algol68
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
hexagon-clang 16.0.5
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 = '<source>' source_filename = "crash2.c" target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" target triple = "s390x-ibm-linux" @g_101 = external dso_local local_unnamed_addr global [9 x i32], align 4 @g_267 = external dso_local local_unnamed_addr global i64*, align 8 ; Function Attrs: noreturn define dso_local i32 @main(i32 %arg, i8** nocapture readnone %arg1) local_unnamed_addr #0 { bb: tail call fastcc void @0() #3 unreachable } ; Function Attrs: noreturn optsize define internal fastcc void @0(i40 %a) unnamed_addr #1 { bb: %i12.i = load i64*, i64** @g_267, align 8, !tbaa !1 %i25.i = sext i8 -1 to i64 br label %bb7.i bb7.i: ; preds = %bb7.i, %bb %indvars.iv.i = phi i64 [ 2, %bb ], [ %indvars.iv.next.i, %bb7.i ] %i9.i = shl i40 %a, 24 %i10.i = ashr i40 %i9.i, 28 %i11.i = trunc i40 %i10.i to i32 store i64 0, i64* %i12.i, align 8, !tbaa !5 %i14.i = icmp eq i32 %i11.i, 0 %i19.i = sext i8 -56 to i32 %i4.i.i = zext i1 %i14.i to i32 %i6.i.i = lshr i32 127, %i19.i %i7.i.i = icmp ult i32 %i6.i.i, %i4.i.i %i11.i.i = shl nuw i32 %i4.i.i, %i19.i %0 = and i32 %i11.i.i, 201 %narrow.i = select i1 %i7.i.i, i32 0, i32 %0 %i22.i = zext i32 %narrow.i to i64 %i26.i = or i64 %i22.i, %i25.i %i27.i = icmp sgt i64 %i26.i, -7 %i28.i = zext i1 %i27.i to i32 %i31.i = getelementptr inbounds [9 x i32], [9 x i32]* @g_101, i64 0, i64 %indvars.iv.i store i32 %i28.i, i32* %i31.i, align 4, !tbaa !7 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 9 br i1 %exitcond.not.i, label %.exit, label %bb7.i .exit: ; preds = %bb7.i %i39.i = tail call zeroext i16 @safe_lshift_func_uint16_t_u_u(i16 zeroext 1, i32 zeroext undef) #3 br label %bb7 bb7: ; preds = %bb7, %.exit br label %bb7 } declare dso_local i16 @safe_lshift_func_uint16_t_u_u(i16, i32) local_unnamed_addr #2 attributes #0 = { noreturn "no-jump-tables"="false" "target-cpu"="z14" } attributes #1 = { noreturn optsize "target-cpu"="z14" "target-features"="+transactional-execution,+vector,+vector-enhancements-1" "use-soft-float"="false" } attributes #2 = { "target-cpu"="z14" "use-soft-float"="false" } attributes #3 = { optsize } !llvm.ident = !{!0} !0 = !{!"clang version 12.0.0 (https://github.com/llvm/llvm-project.git 5535696c386ba89b66c1b5a72a2aa98783571cc9)"} !1 = !{!2, !2, i64 0} !2 = !{!"any pointer", !3, i64 0} !3 = !{!"omnipotent char", !4, i64 0} !4 = !{!"Simple C/C++ TBAA"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !3, i64 0} !7 = !{!8, !8, i64 0} !8 = !{!"int", !3, i64 0}
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