This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][NFC] Refactor patterns for Multiply Add instructions
ClosedPublic

Authored by Jimerlife on Apr 7 2022, 8:30 PM.

Details

Summary

Refactor patterns for Multiply Add instructions

Diff Detail

Event Timeline

Jimerlife created this revision.Apr 7 2022, 8:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 8:30 PM
Jimerlife requested review of this revision.Apr 7 2022, 8:30 PM
frasercrmck added inline comments.Apr 12 2022, 9:57 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
1091

We're losing the wti in wti.RegClass:$rd, vti.RegClass:$rs1 here by moving to VPatWidenMultiplyAddVL_VV_VX. I'm not sure why this isn't an error.

craig.topper added inline comments.Apr 12 2022, 10:01 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
1091

Doesn't VPatWidenMultiplyAddVL_VV_VX also use wti.RegClass:$rd, vti.RegClass:$rs1?

frasercrmck added inline comments.Apr 12 2022, 10:03 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
1091

Oh dear, yes of course. I think I was looking at VPatMultiplyAddVL_VV_VX by mistake.

LGTM, but I'll let Fraser also approve.

frasercrmck accepted this revision.Apr 13 2022, 12:04 AM

LGTM too, thanks for the cleanup

This revision is now accepted and ready to land.Apr 13 2022, 12:04 AM
Jimerlife added inline comments.Apr 13 2022, 1:08 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
1091

VPatWidenMultiplyAddVL_VV_VX also used wti.RegClass:$rd, vti.RegClass:$rs1

This revision was landed with ongoing or failed builds.Apr 14 2022, 1:15 AM
This revision was automatically updated to reflect the committed changes.