[llvm] [VectorCombine] Add Cmp and Select for shuffleToIdentity (PR #92794)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 02:52:42 PDT 2024
================
@@ -1742,6 +1742,10 @@ static Value *generateNewInstTree(ArrayRef<InstLane> Item, FixedVectorType *Ty,
if (auto *BI = dyn_cast<BinaryOperator>(I))
return Builder.CreateBinOp((Instruction::BinaryOps)BI->getOpcode(), Ops[0],
Ops[1]);
+ if (auto CI = dyn_cast<CmpInst>(I))
+ return Builder.CreateCmp(CI->getPredicate(), Ops[0], Ops[1]);
+ if (auto SI = dyn_cast<SelectInst>(I))
----------------
RKSimon wrote:
auto *SI
https://github.com/llvm/llvm-project/pull/92794
More information about the llvm-commits
mailing list