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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 08:41:36 PST 2022


foad added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1166
+  if (auto *EI = dyn_cast<ExtractElementInst>(&Op))
+      if (!isa<Constant>(EI->getIndexOperand()))
+          return nullptr;
----------------
This whole check belongs in visitExtractElementInst, not here.


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