[PATCH] D66688: [LoopVectorize] Leverage speculation safety to avoid masked.loads

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 09:37:24 PDT 2019


fhahn added a comment.

Thanks for the patch, looks good with the outstanding comments addressed. Additionally, it would be great to have a few more negative test cases (ptr operand not safe to speculatively execute, dynamic bounds, access in predicated block outside of loop).



================
Comment at: lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:997
+          }
+          // If the generic version didn't work, try to use SCEV to prove
+          // bounds on the access and discharge them against the allocation.
----------------
We only use the generic version (isSafeToSpeculativelyExecute) for pointer operands, right?


================
Comment at: lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:1020
         SafePointes.insert(Ptr);
+    continue;
   }
----------------
This is not needed, right?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66688





More information about the llvm-commits mailing list