blob: c83291376e122ec4f1fe3866dcd2eddce19860db [file] [log] [blame]
Jonas Paulsson776a81a2018-01-15 15:41:26 +00001# 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---
12name: fun0
13tracksRegLiveness: true
14body: |
15 bb.0 ():
Puyan Lotfi43e94b12018-01-31 22:04:26 +000016 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 Paulsson776a81a2018-01-15 15:41:26 +000020
21 bb.1 ():
Puyan Lotfi43e94b12018-01-31 22:04:26 +000022 liveins: $r0l
23 ST killed renamable $r0l, $r15d, 164, $noreg
Jonas Paulsson776a81a2018-01-15 15:41:26 +000024
25 bb.2 ():
Puyan Lotfi43e94b12018-01-31 22:04:26 +000026 liveins: $r0l
27 ST killed renamable $r0l, $r15d, 164, $noreg
Jonas Paulsson776a81a2018-01-15 15:41:26 +000028 Return
29...
30
31# Legal: Logical comparison used for == (CCMask is 8).
32# CHECK-LABEL: fun1
33# CHECK: lt
34---
35name: fun1
36tracksRegLiveness: true
37body: |
38 bb.0 ():
Puyan Lotfi43e94b12018-01-31 22:04:26 +000039 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 Paulsson776a81a2018-01-15 15:41:26 +000043
44 bb.1 ():
Puyan Lotfi43e94b12018-01-31 22:04:26 +000045 liveins: $r0l
46 ST killed renamable $r0l, $r15d, 164, $noreg
Jonas Paulsson776a81a2018-01-15 15:41:26 +000047
48 bb.2 ():
Puyan Lotfi43e94b12018-01-31 22:04:26 +000049 liveins: $r0l
50 ST killed renamable $r0l, $r15d, 164, $noreg
Jonas Paulsson776a81a2018-01-15 15:41:26 +000051 Return
52...