Skip to content

Commit 4c66180

Browse files
committed
[RISCV] Use COPY to create artificial 64-bit uses in RISCVOptWInstrs's tests
In reflection of 4dd5d96, we can now use COPY to physical registers to create artificial 64-bit uses to prevent RISCVOptWInstrs from optimizing away sext in absent of the IsSignExtendingOpW flag. NFCI.
1 parent d460c1d commit 4c66180

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

llvm/test/CodeGen/RISCV/opt-w-instrs.mir

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,20 @@ name: fcvtmod_w_d
66
tracksRegLiveness: true
77
body: |
88
bb.0.entry:
9-
liveins: $x10, $x11
9+
liveins: $x10
1010
1111
; CHECK-ZFA-LABEL: name: fcvtmod_w_d
12-
; CHECK-ZFA: liveins: $x10, $x11
12+
; CHECK-ZFA: liveins: $x10
1313
; CHECK-ZFA-NEXT: {{ $}}
1414
; CHECK-ZFA-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $x10
15-
; CHECK-ZFA-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
1615
; CHECK-ZFA-NEXT: [[FCVTMOD_W_D:%[0-9]+]]:gpr = nofpexcept FCVTMOD_W_D [[COPY]], 1
17-
; CHECK-ZFA-NEXT: [[ADD:%[0-9]+]]:gpr = ADD [[COPY1]], [[FCVTMOD_W_D]]
18-
; CHECK-ZFA-NEXT: $x10 = COPY [[ADD]]
19-
; CHECK-ZFA-NEXT: $x11 = COPY [[FCVTMOD_W_D]]
16+
; CHECK-ZFA-NEXT: $x10 = COPY [[FCVTMOD_W_D]]
2017
; CHECK-ZFA-NEXT: PseudoRET
2118
%0:fpr64 = COPY $x10
22-
%1:gpr = COPY $x11
2319
24-
%2:gpr = nofpexcept FCVTMOD_W_D %0, 1
25-
%3:gpr = ADD %1, %2
26-
%4:gpr = ADDIW %2, 0
27-
$x10 = COPY %3
28-
$x11 = COPY %4
20+
%1:gpr = nofpexcept FCVTMOD_W_D %0, 1
21+
%2:gpr = ADDIW %1, 0
22+
$x10 = COPY %2
2923
PseudoRET
3024
...
3125

0 commit comments

Comments
 (0)