[llvm] InstCombine: Fold shufflevector(select) and shufflevector(phi) (PR #113746)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 10:18:21 PDT 2024
================
@@ -2900,6 +2900,17 @@ Instruction *InstCombinerImpl::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
if (Instruction *I = foldIdentityPaddedShuffles(SVI))
return I;
+ if (Constant *C = dyn_cast<Constant>(RHS)) {
----------------
MatzeB wrote:
Good point! Will go with `match(RHS, M_Constant())` instead as that seems to match the style of the surrounding code pattern.
https://github.com/llvm/llvm-project/pull/113746
More information about the llvm-commits
mailing list