Skip to content

Commit e8ce6c4

Browse files
authored
[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.
1 parent 16ef239 commit e8ce6c4

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
@@ -698,7 +698,7 @@ let Predicates = [HasVendorXCVmem, IsRV32], AddedComplexity = 1 in {
698698
def : CVStriPat<post_store, CV_SW_ri_inc>;
699699

700700
def : CVStrriPat<post_truncsti8, CV_SB_rr_inc>;
701-
def : CVStrriPat<post_truncsti16, CV_SH_ri_inc>;
701+
def : CVStrriPat<post_truncsti16, CV_SH_rr_inc>;
702702
def : CVStrriPat<post_store, CV_SW_rr_inc>;
703703

704704
def : CVStrrPat<truncstorei8, CV_SB_rr>;

0 commit comments

Comments
 (0)