[llvm] [X86] Support encoding/decoding and lowering for APX variant SHL/SHR/SAR/SHLD/SHRD (PR #78853)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 21 22:26:43 PST 2024
================
@@ -1821,47 +1844,77 @@ defm SAR : MaskedShiftAmountPats<sra>;
// not tracking flags for these nodes.
multiclass MaskedRotateAmountPats<SDNode frag> {
// (rot x (and y, BitWidth - 1)) ==> (rot x, y)
- def : Pat<(frag GR8:$src1, (shiftMask8 CL)),
- (!cast<Instruction>(NAME # "8rCL") GR8:$src1)>;
- def : Pat<(frag GR16:$src1, (shiftMask16 CL)),
- (!cast<Instruction>(NAME # "16rCL") GR16:$src1)>;
- def : Pat<(frag GR32:$src1, (shiftMask32 CL)),
- (!cast<Instruction>(NAME # "32rCL") GR32:$src1)>;
+ // (rot x (and y, 63)) ==> (rot x, y)
----------------
KanRobert wrote:
Good catch. Done.
https://github.com/llvm/llvm-project/pull/78853
More information about the llvm-commits
mailing list