Jonas Paulsson | 776a81a | 2018-01-15 15:41:26 +0000 | [diff] [blame] | 1 | # RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -start-before=postrapseudos %s -o - \ |
| 2 | # RUN: | FileCheck %s |
| 3 | # |
| 4 | # Check that integer load and test instructions are not emitted for unsigned |
| 5 | # comparisons unless checking for equality. That would be wrong, since the |
| 6 | # operands are implicitly treated as signed values. |
| 7 | |
| 8 | # Not legal: Logical comparison used for >= (CCMask is 10). |
| 9 | # CHECK-LABEL: fun0 |
| 10 | # CHECK-NOT: lt |
| 11 | --- |
| 12 | name: fun0 |
| 13 | tracksRegLiveness: true |
| 14 | body: | |
| 15 | bb.0 (): |
Puyan Lotfi | 43e94b1 | 2018-01-31 22:04:26 +0000 | [diff] [blame] | 16 | liveins: $r1d |
| 17 | renamable $r0l = L $r1d, 0, $noreg |
| 18 | CLFIMux killed renamable $r0l, 0, implicit-def $cc |
| 19 | BRC 14, 10, %bb.2, implicit $cc |
Jonas Paulsson | 776a81a | 2018-01-15 15:41:26 +0000 | [diff] [blame] | 20 | |
| 21 | bb.1 (): |
Puyan Lotfi | 43e94b1 | 2018-01-31 22:04:26 +0000 | [diff] [blame] | 22 | liveins: $r0l |
| 23 | ST killed renamable $r0l, $r15d, 164, $noreg |
Jonas Paulsson | 776a81a | 2018-01-15 15:41:26 +0000 | [diff] [blame] | 24 | |
| 25 | bb.2 (): |
Puyan Lotfi | 43e94b1 | 2018-01-31 22:04:26 +0000 | [diff] [blame] | 26 | liveins: $r0l |
| 27 | ST killed renamable $r0l, $r15d, 164, $noreg |
Jonas Paulsson | 776a81a | 2018-01-15 15:41:26 +0000 | [diff] [blame] | 28 | Return |
| 29 | ... |
| 30 | |
| 31 | # Legal: Logical comparison used for == (CCMask is 8). |
| 32 | # CHECK-LABEL: fun1 |
| 33 | # CHECK: lt |
| 34 | --- |
| 35 | name: fun1 |
| 36 | tracksRegLiveness: true |
| 37 | body: | |
| 38 | bb.0 (): |
Puyan Lotfi | 43e94b1 | 2018-01-31 22:04:26 +0000 | [diff] [blame] | 39 | liveins: $r1d |
| 40 | renamable $r0l = L $r1d, 0, $noreg |
| 41 | CLFIMux killed renamable $r0l, 0, implicit-def $cc |
| 42 | BRC 14, 8, %bb.2, implicit $cc |
Jonas Paulsson | 776a81a | 2018-01-15 15:41:26 +0000 | [diff] [blame] | 43 | |
| 44 | bb.1 (): |
Puyan Lotfi | 43e94b1 | 2018-01-31 22:04:26 +0000 | [diff] [blame] | 45 | liveins: $r0l |
| 46 | ST killed renamable $r0l, $r15d, 164, $noreg |
Jonas Paulsson | 776a81a | 2018-01-15 15:41:26 +0000 | [diff] [blame] | 47 | |
| 48 | bb.2 (): |
Puyan Lotfi | 43e94b1 | 2018-01-31 22:04:26 +0000 | [diff] [blame] | 49 | liveins: $r0l |
| 50 | ST killed renamable $r0l, $r15d, 164, $noreg |
Jonas Paulsson | 776a81a | 2018-01-15 15:41:26 +0000 | [diff] [blame] | 51 | Return |
| 52 | ... |