[PATCH] D150039: [InstCombine] Update instcombine for vectorOps to use new shufflevector semantics

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 7 12:02:33 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1262
+  if (!match(FirstIE->getOperand(0), m_Undef()) ||
+      match(FirstIE->getOperand(0), m_Poison()))
+    for (unsigned i = 0; i != NumElements; ++i)
----------------
I don't understand what is going on in this conditional. Why do we need the undef check here? We already checked above that either the base operand is poison or all elements are present.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150039



More information about the llvm-commits mailing list