Skip to content

Instantly share code, notes, and snippets.

@nikic

nikic/reduced.ll Secret

Created January 17, 2022 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikic/3d15c42b7b8f54e6253215576a4cba07 to your computer and use it in GitHub Desktop.
Save nikic/3d15c42b7b8f54e6253215576a4cba07 to your computer and use it in GitHub Desktop.
target triple = "x86_64-unknown-linux-gnu"
%class.Isa = type <{ i32, i32, i32, i8, i8, [2 x i8] }>
@_ZZN3Isa13supportedIsasEvE14supportedIsas_ = external dso_local constant [75 x { i32, i32, i32, i8, i8 }]
define %class.Isa* @_ZN3Isa7findIsaEjjjNS_7FeatureES0_(i32 %versionMajor) {
land.lhs.true.i.i.i.i.i.2:
%cmp4.i.i.i.i.i.2 = icmp eq i32 %versionMajor, 1
br i1 %cmp4.i.i.i.i.i.2, label %"_ZSt7find_ifIPK3IsaZNS0_7findIsaEjjjNS0_7FeatureES3_E3$_0ET_S5_S5_T0_.exit", label %land.lhs.true.i.i.i.i.i.3
land.lhs.true.i.i.i.i.i.3: ; preds = %land.lhs.true.i.i.i.i.i.2
%cmp4.i.i.i.i.i.3 = icmp eq i32 %versionMajor, 2
br i1 %cmp4.i.i.i.i.i.3, label %"_ZSt7find_ifIPK3IsaZNS0_7findIsaEjjjNS0_7FeatureES3_E3$_0ET_S5_S5_T0_.exit", label %land.lhs.true.i.i.i.i.i.4
land.lhs.true.i.i.i.i.i.4: ; preds = %land.lhs.true.i.i.i.i.i.3
%cmp4.i.i.i.i.i.4 = icmp eq i32 %versionMajor, 0
br i1 %cmp4.i.i.i.i.i.4, label %"_ZSt7find_ifIPK3IsaZNS0_7findIsaEjjjNS0_7FeatureES3_E3$_0ET_S5_S5_T0_.exit", label %if.end.i.i.i.4.thread
if.end.i.i.i.4.thread: ; preds = %land.lhs.true.i.i.i.i.i.4
br label %"_ZSt7find_ifIPK3IsaZNS0_7findIsaEjjjNS0_7FeatureES3_E3$_0ET_S5_S5_T0_.exit"
"_ZSt7find_ifIPK3IsaZNS0_7findIsaEjjjNS0_7FeatureES3_E3$_0ET_S5_S5_T0_.exit": ; preds = %if.end.i.i.i.4.thread, %land.lhs.true.i.i.i.i.i.4, %land.lhs.true.i.i.i.i.i.3, %land.lhs.true.i.i.i.i.i.2
%retval.0.i.i.i = phi %class.Isa* [ null, %if.end.i.i.i.4.thread ], [ bitcast (i32* getelementptr inbounds ([75 x { i32, i32, i32, i8, i8 }], [75 x { i32, i32, i32, i8, i8 }]* @_ZZN3Isa13supportedIsasEvE14supportedIsas_, i64 0, i64 6, i32 0) to %class.Isa*), %land.lhs.true.i.i.i.i.i.2 ], [ null, %land.lhs.true.i.i.i.i.i.3 ], [ null, %land.lhs.true.i.i.i.i.i.4 ]
%cmp = icmp eq %class.Isa* %retval.0.i.i.i, bitcast (i32* getelementptr inbounds ([75 x { i32, i32, i32, i8, i8 }], [75 x { i32, i32, i32, i8, i8 }]* @_ZZN3Isa13supportedIsasEvE14supportedIsas_, i64 1, i64 0, i32 0) to %class.Isa*)
ret %class.Isa* null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment