[PATCH] D107580: [VectorCombine] Support AND/UREM indices that require freezing.

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 09:40:04 PDT 2021


nlopes added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:843-844
+  if (isGuaranteedNotToBePoison(Idx, &AC)) {
+    if (ValidIndices.contains(computeConstantRange(Idx, true, &AC, CtxI, 0)))
+      return ScalarizationResult::safe();
+    return ScalarizationResult::unsafe();
----------------
lebedev.ri wrote:
> @nlopes I wanted to check what can we do for potentially OOB insertions,
> and i guess this is an alive2 problem:
> https://alive2.llvm.org/ce/z/VhUXF-
> https://alive2.llvm.org/ce/z/qHk9Wv
> ?
Both tests look correct to me.
The 2nd one is funny because the 'and' doesn't do anything. A proper masking should be 'and 7'.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107580



More information about the llvm-commits mailing list