Jakob Stoklund Olesen | 8534e99 | 2013-04-03 04:41:44 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -march=sparcv9 | FileCheck %s |
| 2 | ; Testing 64-bit conditionals. |
| 3 | |
| 4 | ; CHECK: cmpri |
| 5 | ; CHECK: subcc %i1, 1 |
| 6 | ; CHECK: bpe %xcc, |
| 7 | define void @cmpri(i64* %p, i64 %x) { |
| 8 | entry: |
| 9 | %tobool = icmp eq i64 %x, 1 |
| 10 | br i1 %tobool, label %if.end, label %if.then |
| 11 | |
| 12 | if.then: |
| 13 | store i64 %x, i64* %p, align 8 |
| 14 | br label %if.end |
| 15 | |
| 16 | if.end: |
| 17 | ret void |
| 18 | } |
| 19 | |
| 20 | ; CHECK: cmprr |
| 21 | ; CHECK: subcc %i1, %i2 |
| 22 | ; CHECK: bpgu %xcc, |
| 23 | define void @cmprr(i64* %p, i64 %x, i64 %y) { |
| 24 | entry: |
| 25 | %tobool = icmp ugt i64 %x, %y |
| 26 | br i1 %tobool, label %if.end, label %if.then |
| 27 | |
| 28 | if.then: |
| 29 | store i64 %x, i64* %p, align 8 |
| 30 | br label %if.end |
| 31 | |
| 32 | if.end: |
| 33 | ret void |
| 34 | } |