Skip to content

Commit

Permalink
[RISCV] Fix using undefined variable %pt2 in mask-reg-alloc.mir testc…
Browse files Browse the repository at this point in the history
…ase (#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.
```
  • Loading branch information
tclin914 authored Nov 7, 2023
1 parent df1e394 commit 4306cfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/RISCV/rvv/mask-reg-alloc.mir
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ body: |
%3:vr = COPY $v3
%4:vmv0 = COPY %0
%pt1:vrnov0 = IMPLICIT_DEF
%5:vrnov0 = PseudoVMERGE_VIM_M1 %pt2, killed %2, 1, %4, 1, 3
%5:vrnov0 = PseudoVMERGE_VIM_M1 %pt1, killed %2, 1, %4, 1, 3
%6:vmv0 = COPY %1
%pt2:vrnov0 = IMPLICIT_DEF
%7:vrnov0 = PseudoVMERGE_VIM_M1 %pt2, killed %3, 1, %6, 1, 3
Expand Down

0 comments on commit 4306cfd

Please sign in to comment.