Skip to content

Commit 4306cfd

Browse files
authored
[RISCV] Fix using undefined variable %pt2 in mask-reg-alloc.mir testcase (#70764)
First PseudoVMERGE_VIM_M1 should use %pt1 as its operand instead of %pt2. I found this error when I add LiveIntervals analysis pass in my downstream. And it crashes with the message: ``` Use of %7 does not have a corresponding definition on every path: 112r %6:vrnov0 = PseudoVMERGE_VIM_M1 %pt2:vrnov0(tied-def 0), %2:vr, 1, %4:vmv0, 1, 3 LLVM ERROR: Use not jointly dominated by defs. ```
1 parent df1e394 commit 4306cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/test/CodeGen/RISCV/rvv/mask-reg-alloc.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ body: |
2828
%3:vr = COPY $v3
2929
%4:vmv0 = COPY %0
3030
%pt1:vrnov0 = IMPLICIT_DEF
31-
%5:vrnov0 = PseudoVMERGE_VIM_M1 %pt2, killed %2, 1, %4, 1, 3
31+
%5:vrnov0 = PseudoVMERGE_VIM_M1 %pt1, killed %2, 1, %4, 1, 3
3232
%6:vmv0 = COPY %1
3333
%pt2:vrnov0 = IMPLICIT_DEF
3434
%7:vrnov0 = PseudoVMERGE_VIM_M1 %pt2, killed %3, 1, %6, 1, 3

0 commit comments

Comments
 (0)