Benjamin Kramer | ebcb451 | 2011-11-23 13:54:17 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86-64 | FileCheck %s |
| 2 | |
| 3 | declare void @bar() |
| 4 | |
| 5 | define 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 Lin | f799e3f | 2013-07-13 20:38:47 +0000 | [diff] [blame^] | 10 | ; CHECK-LABEL: test1: |
Benjamin Kramer | ebcb451 | 2011-11-23 13:54:17 +0000 | [diff] [blame] | 11 | ; CHECK: btq $32 |
| 12 | |
| 13 | if.then: |
| 14 | tail call void @bar() nounwind |
| 15 | br label %if.end |
| 16 | |
| 17 | if.end: |
| 18 | ret void |
| 19 | } |
| 20 | |
| 21 | define 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 Lin | f799e3f | 2013-07-13 20:38:47 +0000 | [diff] [blame^] | 26 | ; CHECK-LABEL: test2: |
Benjamin Kramer | ebcb451 | 2011-11-23 13:54:17 +0000 | [diff] [blame] | 27 | ; CHECK: testl $-2147483648 |
| 28 | |
| 29 | if.then: |
| 30 | tail call void @bar() nounwind |
| 31 | br label %if.end |
| 32 | |
| 33 | if.end: |
| 34 | ret void |
| 35 | } |