[llvm] InstCombine: Fold shufflevector(select) and shufflevector(phi) (PR #113746)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 26 09:37:44 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)) {
----------------
dtcxzyw wrote:
```suggestion
if (isa<Constant>(RHS)) {
```
https://github.com/llvm/llvm-project/pull/113746
More information about the llvm-commits
mailing list