[RISCV] Use SplatPat/SplatPat_simm5 to handle PseudoVMV_V_X_/PseudoVMV_V_I_ selection...
authorCraig Topper <craig.topper@sifive.com>
Mon, 8 Feb 2021 17:48:25 +0000 (09:48 -0800)
committerCraig Topper <craig.topper@sifive.com>
Mon, 8 Feb 2021 17:48:27 +0000 (09:48 -0800)
commitcc2c45dc54b324727a00be7218f387fcb53dd6c7
treedfd8b2e5e5d42b992a48bac246f4b263c2329f8b
parenta4b1df8af37236935427342f0d82f83b178f0842
[RISCV] Use SplatPat/SplatPat_simm5 to handle PseudoVMV_V_X_/PseudoVMV_V_I_ selection as well.

This ensures that we'll match immediates consistently regardless
of whether we match them as a standalone splat or as part of
another operation.

While I was there I added complexities to the simm5/uimm5 patterns so
we didn't have to assume that the 1 on the non-immediate was lower
than what tablegen inferred.

I had to make a minor tweak to tablegen to fix one place that
didn't expect to see a ComplexPattern that wasn't a "leaf".

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D96199
llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
llvm/utils/TableGen/CodeGenDAGPatterns.cpp