[PATCH] D100122: Update m_Undef to match vectors/aggrs with undefs and poisons mixed

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 17 04:11:26 PDT 2021


aqjune marked an inline comment as done.
aqjune added inline comments.


================
Comment at: llvm/include/llvm/IR/PatternMatch.h:92-100
+  static bool check(const Value *V) {
+    if (isa<UndefValue>(V))
+      return true;
+
+    if (auto *CA = dyn_cast<ConstantAggregate>(V))
+      return all_of(CA->operand_values(), check);
+
----------------
lebedev.ri wrote:
> I'm not sure i like recursion here.
> How about a worklist algorithm?
Thank you for the suggestion! I updated this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100122



More information about the llvm-commits mailing list