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 = 'reduced.ll' source_filename = "/home/lebedevri/rawspeed/src/librawspeed/interpolators/Cr2sRawInterpolator.cpp" 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" %"class.rawspeed::Cr2sRawInterpolator" = type { %"class.rawspeed::RawImage"*, %"class.rawspeed::Array2DRef", %"struct.std::array.26", i32 } %"class.rawspeed::RawImage" = type { %"class.rawspeed::RawImageData"* } %"class.rawspeed::RawImageData" = type { i32 (...)**, %"class.rawspeed::ErrorLog", %"class.rawspeed::iPoint2D", i32, i32, i8, %"class.rawspeed::ColorFilterArray", i32, %"struct.std::array", i32, %"class.std::vector.8", %"class.std::vector.13", i8*, i32, i8, [3 x i8], %"class.rawspeed::ImageMetaData", %"class.rawspeed::Mutex", i32, i32, i8*, i32, i32, %"class.rawspeed::iPoint2D", %"class.rawspeed::iPoint2D", %"class.std::unique_ptr", %"class.rawspeed::Mutex" } %"class.rawspeed::ErrorLog" = type { %"class.rawspeed::Mutex", %"class.std::vector" } %"class.std::vector" = type { %"struct.std::_Vector_base" } %"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" } %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" } %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { %"class.std::__cxx11::basic_string"*, %"class.std::__cxx11::basic_string"*, %"class.std::__cxx11::basic_string"* } %"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon } %"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { i8* } %union.anon = type { i64, [8 x i8] } %"class.rawspeed::ColorFilterArray" = type { %"class.std::vector.3", %"class.rawspeed::iPoint2D" } %"class.std::vector.3" = type { %"struct.std::_Vector_base.4" } %"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<rawspeed::CFAColor, std::allocator<rawspeed::CFAColor>>::_Vector_impl" } %"struct.std::_Vector_base<rawspeed::CFAColor, std::allocator<rawspeed::CFAColor>>::_Vector_impl" = type { %"struct.std::_Vector_base<rawspeed::CFAColor, std::allocator<rawspeed::CFAColor>>::_Vector_impl_data" } %"struct.std::_Vector_base<rawspeed::CFAColor, std::allocator<rawspeed::CFAColor>>::_Vector_impl_data" = type { i8*, i8*, i8* } %"struct.std::array" = type { [4 x i32] } %"class.std::vector.8" = type { %"struct.std::_Vector_base.9" } %"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<rawspeed::BlackArea, std::allocator<rawspeed::BlackArea>>::_Vector_impl" } %"struct.std::_Vector_base<rawspeed::BlackArea, std::allocator<rawspeed::BlackArea>>::_Vector_impl" = type { %"struct.std::_Vector_base<rawspeed::BlackArea, std::allocator<rawspeed::BlackArea>>::_Vector_impl_data" } %"struct.std::_Vector_base<rawspeed::BlackArea, std::allocator<rawspeed::BlackArea>>::_Vector_impl_data" = type { %"class.rawspeed::BlackArea"*, %"class.rawspeed::BlackArea"*, %"class.rawspeed::BlackArea"* } %"class.rawspeed::BlackArea" = type <{ i32, i32, i8, [3 x i8] }> %"class.std::vector.13" = type { %"struct.std::_Vector_base.14" } %"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" } %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" } %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { i32*, i32*, i32* } %"class.rawspeed::ImageMetaData" = type <{ double, %"struct.std::array.18", i32, %"class.rawspeed::iPoint2D", [4 x i8], %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }> %"struct.std::array.18" = type { [4 x float] } %"class.rawspeed::iPoint2D" = type { i32, i32 } %"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" } %"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" } %"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" } %"class.std::tuple" = type { %"struct.std::_Tuple_impl" } %"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.20" } %"struct.std::_Head_base.20" = type { %"class.rawspeed::TableLookUp"* } %"class.rawspeed::TableLookUp" = type <{ i32, [4 x i8], %"class.std::vector.21", i8, [7 x i8] }> %"class.std::vector.21" = type { %"struct.std::_Vector_base.22" } %"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" } %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" } %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" = type { i16*, i16*, i16* } %"class.rawspeed::Mutex" = type { %struct.omp_lock_t } %struct.omp_lock_t = type { i8* } %"class.rawspeed::Array2DRef" = type <{ i16*, i32, i32, i32, [4 x i8] }> %"struct.std::array.26" = type { [3 x i32] } %"struct.std::array.30" = type { [2 x %"struct.std::array.31"] } %"struct.std::array.31" = type { [2 x %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"] } %"struct.rawspeed::Cr2sRawInterpolator::YCbCr" = type { i32, i32, i32 } $_ZN8rawspeed19Cr2sRawInterpolator5YCbCr7processEi = comdat any $_ZN8rawspeed19Cr2sRawInterpolator5YCbCr10signExtendEv = comdat any $_ZN8rawspeed19Cr2sRawInterpolator5YCbCr8applyHueEi = comdat any define hidden void @_ZN8rawspeed19Cr2sRawInterpolator11interpolateEi() local_unnamed_addr align 2 { sw.bb: call void @_ZN8rawspeed19Cr2sRawInterpolator15interpolate_422ILi0EEEvv() ret void } define linkonce_odr hidden void @_ZN8rawspeed19Cr2sRawInterpolator15interpolate_422ILi0EEEvv() local_unnamed_addr align 2 { for.body: call void @_ZN8rawspeed19Cr2sRawInterpolator19interpolate_422_rowILi0EEEvi(%"class.rawspeed::Cr2sRawInterpolator"* undef) ret void } define linkonce_odr hidden void @_ZN8rawspeed19Cr2sRawInterpolator19interpolate_422_rowILi0EEEvi(%"class.rawspeed::Cr2sRawInterpolator"* %this) local_unnamed_addr align 2 { entry: %MCUs = alloca %"struct.std::array.30", align 4 %width = getelementptr inbounds %"class.rawspeed::Cr2sRawInterpolator", %"class.rawspeed::Cr2sRawInterpolator"* %this, i64 0, i32 1, i32 2 %0 = load i32, i32* %width, align 4, !tbaa !0 %div = sdiv i32 %0, 4 br label %for.cond for.cond: ; preds = %for.end, %entry %MCUIdx.0 = phi i32 [ undef, %entry ], [ %inc21, %for.end ] %sub = add nsw i32 %div, -1 %cmp = icmp slt i32 %MCUIdx.0, %sub br i1 %cmp, label %for.end, label %for.end22 for.end: ; preds = %for.cond %hue = getelementptr inbounds %"class.rawspeed::Cr2sRawInterpolator", %"class.rawspeed::Cr2sRawInterpolator"* %this, i64 0, i32 3 %1 = load i32, i32* %hue, align 4, !tbaa !8 %Cb.i.i = getelementptr inbounds %"struct.std::array.30", %"struct.std::array.30"* %MCUs, i64 0, i32 0, i64 undef, i32 0, i64 undef, i32 1 %2 = load i32, i32* %Cb.i.i, align 4, !tbaa !9 %sub.i.i = add i32 %1, -16384 %add.i.i = add i32 %sub.i.i, %2 store i32 %add.i.i, i32* %Cb.i.i, align 4, !tbaa !9 %inc21 = add nsw i32 %MCUIdx.0, 1 br label %for.cond, !llvm.loop !11 for.end22: ; preds = %for.cond ret void } ; Function Attrs: willreturn define linkonce_odr hidden %"struct.std::array.31"* @_ZNSt5arrayIS_IN8rawspeed19Cr2sRawInterpolator5YCbCrELm2EELm2EEixEm(%"struct.std::array.30"* %this) local_unnamed_addr #0 align 2 { entry: %arrayidx.i = getelementptr inbounds %"struct.std::array.30", %"struct.std::array.30"* %this, i64 0, i32 0, i64 undef ret %"struct.std::array.31"* %arrayidx.i } ; Function Attrs: willreturn define linkonce_odr hidden %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* @_ZNSt5arrayIN8rawspeed19Cr2sRawInterpolator5YCbCrELm2EEixEm(%"struct.std::array.31"* %this) local_unnamed_addr #0 align 2 { entry: %arrayidx.i = getelementptr inbounds %"struct.std::array.31", %"struct.std::array.31"* %this, i64 0, i32 0, i64 undef ret %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %arrayidx.i } ; Function Attrs: willreturn define linkonce_odr hidden void @_ZN8rawspeed19Cr2sRawInterpolator5YCbCr7processEi(%"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %this, i32 %hue_) local_unnamed_addr #0 comdat align 2 { entry: %Cb.i = getelementptr inbounds %"struct.rawspeed::Cr2sRawInterpolator::YCbCr", %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %this, i64 0, i32 1 %0 = load i32, i32* %Cb.i, align 4, !tbaa !9 %sub.i = add i32 %hue_, -16384 %add.i = add i32 %sub.i, %0 store i32 %add.i, i32* %Cb.i, align 4, !tbaa !9 ret void } ; Function Attrs: willreturn define linkonce_odr hidden %"struct.std::array.31"* @_ZNSt14__array_traitsISt5arrayIN8rawspeed19Cr2sRawInterpolator5YCbCrELm2EELm2EE6_S_refERA2_KS4_m([2 x %"struct.std::array.31"]* %__t) local_unnamed_addr #0 align 2 { entry: %arrayidx = getelementptr inbounds [2 x %"struct.std::array.31"], [2 x %"struct.std::array.31"]* %__t, i64 0, i64 undef ret %"struct.std::array.31"* %arrayidx } ; Function Attrs: willreturn define linkonce_odr hidden %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* @_ZNSt14__array_traitsIN8rawspeed19Cr2sRawInterpolator5YCbCrELm2EE6_S_refERA2_KS2_m([2 x %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"]* %__t) local_unnamed_addr #0 align 2 { entry: %arrayidx = getelementptr inbounds [2 x %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"], [2 x %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"]* %__t, i64 0, i64 undef ret %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %arrayidx } ; Function Attrs: willreturn define linkonce_odr hidden void @_ZN8rawspeed19Cr2sRawInterpolator5YCbCr10signExtendEv(%"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %this) local_unnamed_addr #0 comdat align 2 { entry: %Cb = getelementptr inbounds %"struct.rawspeed::Cr2sRawInterpolator::YCbCr", %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %this, i64 0, i32 1 %0 = load i32, i32* %Cb, align 4, !tbaa !9 %sub = add nsw i32 %0, -16384 store i32 %sub, i32* %Cb, align 4, !tbaa !9 ret void } ; Function Attrs: willreturn define linkonce_odr hidden void @_ZN8rawspeed19Cr2sRawInterpolator5YCbCr8applyHueEi(%"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %this, i32 %hue_) local_unnamed_addr #0 comdat align 2 { entry: %Cb = getelementptr inbounds %"struct.rawspeed::Cr2sRawInterpolator::YCbCr", %"struct.rawspeed::Cr2sRawInterpolator::YCbCr"* %this, i64 0, i32 1 %0 = load i32, i32* %Cb, align 4, !tbaa !9 %add = add nsw i32 %0, %hue_ store i32 %add, i32* %Cb, align 4, !tbaa !9 ret void } attributes #0 = { willreturn } !0 = !{!1, !6, i64 20} !1 = !{!"_ZTSN8rawspeed19Cr2sRawInterpolatorE", !2, i64 0, !5, i64 8, !7, i64 32, !6, i64 44} !2 = !{!"any pointer", !3, i64 0} !3 = !{!"omnipotent char", !4, i64 0} !4 = !{!"Simple C++ TBAA"} !5 = !{!"_ZTSN8rawspeed10Array2DRefIKtEE", !2, i64 0, !6, i64 8, !6, i64 12, !6, i64 16} !6 = !{!"int", !3, i64 0} !7 = !{!"_ZTSSt5arrayIiLm3EE", !3, i64 0} !8 = !{!1, !6, i64 44} !9 = !{!10, !6, i64 4} !10 = !{!"_ZTSN8rawspeed19Cr2sRawInterpolator5YCbCrE", !6, i64 0, !6, i64 4, !6, i64 8} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
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