Fold:
shuffle (splat-shuffle), undef, M --> splat-shuffle
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
4123 ↗ | (On Diff #93603) | We should only perform this if the result has the same number of elements as the source - please add a type check for RetTy == Op0->getType() |
lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
4123 ↗ | (On Diff #93603) | Good catch. |
test/Transforms/InstSimplify/shufflevector.ll | ||
---|---|---|
60 ↗ | (On Diff #93790) | Add a TODO for this? |
Comment Actions
- Following another enlightening comment from Simon, generalize to when the non-splat operand is not selected from.
- Added the symmetrical case. Not relying on canonical form has a toll of duplication - will refactor in a follow-up patch.
Comment Actions
Thanks! LGTM - with one (optional) minor.
lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
4087 ↗ | (On Diff #93799) | This part can be done as an NFC pre-commit. |