Skip to content

Commit 9969e7f

Browse files
PhilippvKtru
authored andcommitted
[RISCV] Fix typo in CV_SH_rr_inc pattern (#120246)
This typo in https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td#L701:L701 caused a compiler crash in 'RISC-V Assembly Printer' because CV_SH_ri_inc was selected, leading to `getImmOpValue` being called for a register operand. This bug did not affect the Assembler output and therefore does not trigger any existing unit tests, but is visible by examining the final MIR function. (cherry picked from commit e8ce6c4)
1 parent 97a1cb9 commit 9969e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ let Predicates = [HasVendorXCVmem, IsRV32], AddedComplexity = 1 in {
694694
def : CVStriPat<post_store, CV_SW_ri_inc>;
695695

696696
def : CVStrriPat<post_truncsti8, CV_SB_rr_inc>;
697-
def : CVStrriPat<post_truncsti16, CV_SH_ri_inc>;
697+
def : CVStrriPat<post_truncsti16, CV_SH_rr_inc>;
698698
def : CVStrriPat<post_store, CV_SW_rr_inc>;
699699

700700
def : CVStrrPat<truncstorei8, CV_SB_rr>;

0 commit comments

Comments
 (0)