blob: add65765e3890d21262fd93f09ab076d3e9bdbc8 [file] [log] [blame]
Benjamin Kramerebcb4512011-11-23 13:54:17 +00001; RUN: llc < %s -march=x86-64 | FileCheck %s
2
3declare void @bar()
4
5define void @test1(i64 %foo) nounwind {
6 %and = and i64 %foo, 4294967296
7 %tobool = icmp eq i64 %and, 0
8 br i1 %tobool, label %if.end, label %if.then
9
Stephen Linf799e3f2013-07-13 20:38:47 +000010; CHECK-LABEL: test1:
Benjamin Kramerebcb4512011-11-23 13:54:17 +000011; CHECK: btq $32
12
13if.then:
14 tail call void @bar() nounwind
15 br label %if.end
16
17if.end:
18 ret void
19}
20
21define void @test2(i64 %foo) nounwind {
22 %and = and i64 %foo, 2147483648
23 %tobool = icmp eq i64 %and, 0
24 br i1 %tobool, label %if.end, label %if.then
25
Stephen Linf799e3f2013-07-13 20:38:47 +000026; CHECK-LABEL: test2:
Benjamin Kramerebcb4512011-11-23 13:54:17 +000027; CHECK: testl $-2147483648
28
29if.then:
30 tail call void @bar() nounwind
31 br label %if.end
32
33if.end:
34 ret void
35}