From 2c26cfdef73be39959add636f3f90d836d66bdca Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 7 Feb 2022 15:52:13 -0800 Subject: [PATCH] [RISCV] Use splat_vector instead of SplatPat in widening FP instruction patterns. NFCI We use splat_vector for FP nodes without VL, not SplatPat which handles splat_vector and integer VMV_V_X_VL. Reduces isel table size by a few hundred bytes. --- llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td index 54665e7..a5de97d 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td @@ -399,7 +399,7 @@ multiclass VPatWidenBinaryFPSDNode_VV_VF { vti.Vti.RegClass:$rs2, vti.Vti.RegClass:$rs1, vti.Vti.AVL, vti.Vti.Log2SEW)>; def : Pat<(op (vti.Wti.Vector (fpext_oneuse (vti.Vti.Vector vti.Vti.RegClass:$rs2))), - (vti.Wti.Vector (fpext_oneuse (vti.Vti.Vector (SplatPat vti.Vti.ScalarRegClass:$rs1))))), + (vti.Wti.Vector (fpext_oneuse (vti.Vti.Vector (splat_vector vti.Vti.ScalarRegClass:$rs1))))), (!cast(instruction_name#"_V"#vti.Vti.ScalarSuffix#"_"#vti.Vti.LMul.MX) vti.Vti.RegClass:$rs2, vti.Vti.ScalarRegClass:$rs1, vti.Vti.AVL, vti.Vti.Log2SEW)>; @@ -414,7 +414,7 @@ multiclass VPatWidenBinaryFPSDNode_WV_WF { vti.Wti.RegClass:$rs2, vti.Vti.RegClass:$rs1, vti.Vti.AVL, vti.Vti.Log2SEW)>; def : Pat<(op (vti.Wti.Vector vti.Wti.RegClass:$rs2), - (vti.Wti.Vector (fpext_oneuse (vti.Vti.Vector (SplatPat vti.Vti.ScalarRegClass:$rs1))))), + (vti.Wti.Vector (fpext_oneuse (vti.Vti.Vector (splat_vector vti.Vti.ScalarRegClass:$rs1))))), (!cast(instruction_name#"_W"#vti.Vti.ScalarSuffix#"_"#vti.Vti.LMul.MX) vti.Wti.RegClass:$rs2, vti.Vti.ScalarRegClass:$rs1, vti.Vti.AVL, vti.Vti.Log2SEW)>; -- 2.7.4