[PATCH] D137934: [InstCombine] Fold extractelt with select of constants

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 04:55:45 PST 2022


spatel accepted this revision.
spatel added a comment.

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:409
+  // an unreachable assertion if it doesn't find a constant operand.
+  if (SelectInst *SI = dyn_cast<SelectInst>(EI.getVectorOperand()))
+    if (SI->getCondition()->getType()->isIntegerTy() &&
----------------
nit: use "auto *" with `dyn_cast` to be consistent with the surrounding code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137934/new/

https://reviews.llvm.org/D137934



More information about the llvm-commits mailing list