[PATCH] D38682: [LoopInterchange] Fix phi node ordering miscompile.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 15 04:28:26 PDT 2017


dmgreen added inline comments.


================
Comment at: test/Transforms/LoopInterchange/phi-ordering.ll:14
+; CHECK-LABEL: test
+; CHECK: add nsw i32 %k.031, 1
+entry:
----------------
fhahn wrote:
> Could you add a few more checks, making sure the loop structure is what we expect?
This depends on what we expect the loop structure to be :)

I originally had this compiling on thumbv6m, where the interchange here is almost certainly going to end up making things slower. The load/store to c would no longer be able to be pulled out of the inner loop. Hence the weak test check that would work even if the performance model here was fixes, and the interchange no longer done.

I've changed this test to v7a where I think vectorisation will make this interchange profitable, and added the loop structure checks you suggested.


https://reviews.llvm.org/D38682





More information about the llvm-commits mailing list