Debian Codegraph @

llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-threeway-cmp-rv32.mir

raw
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2 # RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - | FileCheck %s
3
4 ---
5 name: test_ucmp_i32
6 body: |
7 bb.1:
8 liveins: $x10, $x11
9
10 ; CHECK-LABEL: name: test_ucmp_i32
11 ; CHECK: liveins: $x10, $x11
12 ; CHECK-NEXT: {{ $}}
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
14 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
15 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY]](s32), [[COPY1]]
16 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY]](s32), [[COPY1]]
17 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ICMP]], [[ICMP1]]
18 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
19 ; CHECK-NEXT: PseudoRET implicit $x10
20 %0:_(s32) = COPY $x10
21 %1:_(s32) = COPY $x11
22 %2:_(s32) = G_SCMP %0(s32), %1
23 $x10 = COPY %2(s32)
24 PseudoRET implicit $x10
25
26 ...
27 ---
28 name: test_scmp_i32
29 alignment: 4
30 body: |
31 bb.1:
32 liveins: $x10, $x11
33
34 ; CHECK-LABEL: name: test_scmp_i32
35 ; CHECK: liveins: $x10, $x11
36 ; CHECK-NEXT: {{ $}}
37 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
38 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
39 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY]](s32), [[COPY1]]
40 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY]](s32), [[COPY1]]
41 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ICMP]], [[ICMP1]]
42 ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)
43 ; CHECK-NEXT: PseudoRET implicit $x10
44 %0:_(s32) = COPY $x10
45 %1:_(s32) = COPY $x11
46 %2:_(s32) = G_SCMP %0(s32), %1
47 $x10 = COPY %2(s32)
48 PseudoRET implicit $x10
49
50 ...