xref: /llvm-project/llvm/test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | FileCheck %s
2; Reduced from JavaScriptCore
3
4%"class.JSC::CodeLocationCall" = type { [8 x i8] }
5%"class.JSC::JSGlobalData" = type { [4 x i8] }
6%"class.JSC::FunctionPtr" = type { ptr }
7%"class.JSC::Structure" = type { [4 x i8] }
8%"class.JSC::UString" = type { ptr }
9%"class.JSC::JSString" = type { [16 x i8], i32, %"class.JSC::UString", i32 }
10
11declare hidden fastcc void @_ZN3JSCL23returnToThrowTrampolineEPNS_12JSGlobalDataENS_16ReturnAddressPtrERS2_(ptr nocapture, ptr, ptr nocapture) nounwind noinline ssp
12
13; Avoid hoisting the test above loads or copies
14; CHECK: %entry
15; CHECK: test
16; CHECK-NOT: mov
17; CHECK: je
18define i32 @cti_op_eq(ptr nocapture %args) nounwind ssp {
19entry:
20  %0 = load ptr, ptr null, align 8
21  %tobool.i.i.i = icmp ugt ptr undef, inttoptr (i64 281474976710655 to ptr)
22  %or.cond.i = and i1 %tobool.i.i.i, undef
23  br i1 %or.cond.i, label %if.then.i, label %if.end.i
24
25if.then.i:                                        ; preds = %entry
26  br i1 undef, label %if.then.i.i.i, label %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
27
28if.then.i.i.i:                                    ; preds = %if.then.i
29  %conv.i.i.i.i = trunc i64 undef to i32
30  br label %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
31
32if.end.i:                                         ; preds = %entry
33  br i1 undef, label %land.rhs.i121.i, label %_ZNK3JSC7JSValue8isStringEv.exit122.i
34
35land.rhs.i121.i:                                  ; preds = %if.end.i
36  %tmp.i.i117.i = load ptr, ptr undef, align 8
37  br label %_ZNK3JSC7JSValue8isStringEv.exit122.i
38
39_ZNK3JSC7JSValue8isStringEv.exit122.i:            ; preds = %land.rhs.i121.i, %if.end.i
40  %brmerge.i = or i1 undef, false
41  %or.cond = or i1 false, %brmerge.i
42  br i1 %or.cond, label %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit, label %if.then.i92.i
43
44if.then.i92.i:                                    ; preds = %_ZNK3JSC7JSValue8isStringEv.exit122.i
45  tail call void @_ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE(ptr undef, ptr %0) nounwind
46  unreachable
47
48_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit: ; preds = %_ZNK3JSC7JSValue8isStringEv.exit122.i, %if.then.i.i.i, %if.then.i
49
50  %1 = load ptr, ptr undef, align 8
51  br i1 undef, label %do.end39, label %do.body27
52
53do.body27:                                        ; preds = %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
54  %2 = getelementptr inbounds ptr, ptr %args, i64 -1
55  tail call fastcc void @_ZN3JSCL23returnToThrowTrampolineEPNS_12JSGlobalDataENS_16ReturnAddressPtrERS2_(ptr %1, ptr undef, ptr %2)
56  unreachable
57
58do.end39:                                         ; preds = %_ZN3JSC7JSValue19equalSlowCaseInlineEPNS_9ExecStateES0_S0_.exit
59  ret i32 undef
60}
61
62declare void @_ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE(ptr, ptr)
63