[PATCH] D54468: [LoadStoreVectorizer] Fix infinite loop in reorder.

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 12 10:53:06 PST 2019


volkan added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:494
       if (!OBB.dominates(IM, I)) {
+        if (auto *S = SimplifyInstruction(IM, SQ.getWithInstruction(IM))) {
+          IW->setOperand(i, S);
----------------
Could you add a comment explaining why we are doing this? Also, do we really need to simplify the operands for each instruction in the list? Should we check if it's a gep before trying to simplify? 


================
Comment at: test/Transforms/LoadStoreVectorizer/AArch64/reorder-infinite-loop.ll:15
+entry:
+  %0 = load i32, i32* @a, align 1
+  %rem = urem i32 %0, 1
----------------
Nit: You can run -instnamer on the test in order to assign names to these instructions.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D54468





More information about the llvm-commits mailing list