[PATCH] D63138: [Analysis] add isSplatValue() for vectors in IR

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 11:28:23 PDT 2019


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/VectorUtils.cpp:333
+    if (isa<UndefValue>(V))
+      return true;
+    // FIXME: Constant splat analysis does not allow undef elements.
----------------
This seems potentially problematic, as there's no guarantee that all (independent) undef values will be chosen to be the same value down the line.

I don't know if this is a problem in the context where this is intended to be used though. Is isSplatValue() going to be used heuristically (for profitability) or is it necessary for transformation correctness?


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

https://reviews.llvm.org/D63138





More information about the llvm-commits mailing list