Skip to content

Commit 9d3a576

Browse files
committed
[RISCV] Add explicit XLenVT cast to vector load/store patterns.
This seems to be needed to get the patterns to import into GISel properly. Unfortunately, it also adds ~400 bytes to the SelectionDAG table. I'm hoping if we remove i32 as a legal type for GPR registers, this will go down.
1 parent 3734fa8 commit 9d3a576

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ multiclass VPatUSLoadStoreSDNode<ValueType type,
3333
defvar load_instr = !cast<Instruction>("PseudoVLE"#sew#"_V_"#vlmul.MX);
3434
defvar store_instr = !cast<Instruction>("PseudoVSE"#sew#"_V_"#vlmul.MX);
3535
// Load
36-
def : Pat<(type (load GPR:$rs1)),
36+
def : Pat<(type (load (XLenVT GPR:$rs1))),
3737
(load_instr (type (IMPLICIT_DEF)), GPR:$rs1, avl,
3838
log2sew, TA_MA)>;
3939
// Store
40-
def : Pat<(store type:$rs2, GPR:$rs1),
40+
def : Pat<(store type:$rs2, (XLenVT GPR:$rs1)),
4141
(store_instr reg_class:$rs2, GPR:$rs1, avl, log2sew)>;
4242
}
4343

0 commit comments

Comments
 (0)