1 # RUN: llc -mtriple=s390x-linux-gnu -mcpu=z14 -start-before=postrapseudos %s \
2 # RUN: -o - | FileCheck %s
4 # Test that the CC values of logical adds and subs can be used in compare
5 # elimination in the cases of EQ/NE.
9 # CHECK-NEXT: locrhe %r2, %r3
10 # CHECK-NEXT: alr %r3, %r2
11 # CHECK-NEXT: locrnhe %r2, %r3
12 # CHECK-NEXT: alr %r3, %r2
13 # CHECK-NEXT: chi %r3, 0
14 # CHECK-NEXT: locrle %r2, %r3
15 # CHECK-NEXT: alr %r3, %r2
16 # CHECK-NEXT: chi %r3, 0
17 # CHECK-NEXT: locrhe %r2, %r3
18 # CHECK-NEXT: slrk %r3, %r2, %r3
19 # CHECK-NEXT: locrh %r2, %r3
20 # CHECK-NEXT: slrk %r3, %r2, %r3
21 # CHECK-NEXT: locrnhe %r2, %r3
22 # CHECK-NEXT: slrk %r3, %r2, %r3
23 # CHECK-NEXT: chi %r3, 0
24 # CHECK-NEXT: locrle %r2, %r3
25 # CHECK-NEXT: slrk %r3, %r2, %r3
26 # CHECK-NEXT: chi %r3, 0
27 # CHECK-NEXT: locrhe %r2, %r3
31 define i32 @fun0(i32 %arg1, i32 %arg2) { bb: ret i32 0 }
38 renamable $r3l = ALRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
39 CHIMux renamable $r3l, 0, implicit-def $cc
40 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 8, implicit killed $cc
42 renamable $r3l = ALRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
43 CHIMux renamable $r3l, 0, implicit-def $cc
44 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 6, implicit killed $cc
46 renamable $r3l = ALRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
47 CHIMux renamable $r3l, 0, implicit-def $cc
48 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 12, implicit killed $cc
50 renamable $r3l = ALRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
51 CHIMux renamable $r3l, 0, implicit-def $cc
52 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 10, implicit killed $cc
54 renamable $r3l = SLRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
55 CHIMux renamable $r3l, 0, implicit-def $cc
56 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 8, implicit killed $cc
58 renamable $r3l = SLRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
59 CHIMux renamable $r3l, 0, implicit-def $cc
60 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 6, implicit killed $cc
62 renamable $r3l = SLRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
63 CHIMux renamable $r3l, 0, implicit-def $cc
64 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 12, implicit killed $cc
66 renamable $r3l = SLRK renamable $r2l, killed renamable $r3l, implicit-def dead $cc
67 CHIMux renamable $r3l, 0, implicit-def $cc
68 renamable $r2l = LOCR killed renamable $r2l, killed renamable $r3l, 14, 10, implicit killed $cc