[llvm] [VectorCombine] Add Cmp and Select for shuffleToIdentity (PR #92794)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 04:32:38 PDT 2024
================
@@ -1832,12 +1842,17 @@ bool VectorCombine::foldShuffleToIdentity(Instruction &I) {
// Check the operator is one that we support. We exclude div/rem in case
// they hit UB from poison lanes.
- if (isa<BinaryOperator>(FrontV) &&
- !cast<BinaryOperator>(FrontV)->isIntDivRem()) {
+ if ((isa<BinaryOperator>(FrontV) &&
+ !cast<BinaryOperator>(FrontV)->isIntDivRem()) ||
----------------
artagnon wrote:
Use `dyn_cast` in place of `isa` + `cast`.
https://github.com/llvm/llvm-project/pull/92794
More information about the llvm-commits
mailing list