Skip to content

Commit 2ec47e5

Browse files
authored
[RISCV] Fix duplicate test cases for G_UNMERGE_VALUES (#94622)
`unmerge_i64` and `unmerge_i32` were exactly the same test cases. This PR would fix that, so `unmerge_i32` would actually unmerge a 32 bit value into two 16 bit values.
1 parent ff77f67 commit 2ec47e5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/test/CodeGen/RISCV/GlobalISel/legalizer/merge-unmerge-rv32.mir

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,14 @@ body: |
6868
; RV32: liveins: $x10
6969
; RV32-NEXT: {{ $}}
7070
; RV32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
71-
; RV32-NEXT: $x10 = COPY [[COPY]](s32)
71+
; RV32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
72+
; RV32-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
73+
; RV32-NEXT: $x10 = COPY [[AND]](s32)
7274
; RV32-NEXT: PseudoRET implicit $x10
7375
%0:_(s32) = COPY $x10
74-
%1:_(s64) = G_ZEXT %0(s32)
75-
%2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %1(s64)
76-
$x10 = COPY %2(s32)
76+
%2:_(s16), %3:_(s16) = G_UNMERGE_VALUES %0(s32)
77+
%4:_(s32) = G_ZEXT %2(s16)
78+
$x10 = COPY %4(s32)
7779
PseudoRET implicit $x10
7880
...
7981
---

0 commit comments

Comments
 (0)