[PATCH] D141806: [X86] `canonicalizeShuffleWithBinOps()`: support `VS[HR][LA]I` opcodes (unary shuffles only)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 16 06:18:08 PST 2023
RKSimon added a comment.
Thanks for looking at this!
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:40436
// likely to kick in. Shuffles of splats are expected to be removed.
- return ISD::isBuildVectorAllOnes(Op.getNode()) ||
+ return Op.getOpcode() == ISD::TargetConstant ||
+ ISD::isBuildVectorAllOnes(Op.getNode()) ||
----------------
Instead of checking for ISD::TargetConstant specifically, could you use a helper to indicate whether to ignore a specific operandno for specific opcodes - that would allow us to extend this to the non-immediate versions of the sse shifts as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141806/new/
https://reviews.llvm.org/D141806
More information about the llvm-commits
mailing list