[PATCH] D11559: Prevent the scalarizer from caching incorrect entries
hfinkel@anl.gov via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 22:52:17 PDT 2015
hfinkel accepted this revision.
This revision is now accepted and ready to land.
================
Comment at: test/Transforms/Scalarizer/cache-bug.ll:16
@@ +15,3 @@
+; CHECK: %pos.i0 = phi i32 [ 0, %entry ], [ %pos.i01, %loop ]
+; CHECK: %pos.i1 = phi i32 [ %inc, %entry ], [ %inc.pos.y, %loop ]
+; CHECK: %i = phi i32 [ 0, %entry ], [ %new.i, %loop ]
----------------
We don't need to check the entire output here, we only need to check for the function name, this line, and perhaps the absence of the bad output (just to make it clear what is being tested). I'd write this:
; CHECK-LABEL: @func
; CHECK-NOT: phi i32 [ %x, %entry ], [ %inc.pos.y, %loop ]
; CHECK: phi i32 [ %inc, %entry ], [ %inc.pos.y, %loop ]
; CHECK: ret void
The problem with including the whole output verbatim is that any future simplifications, or even changes to how the variables are named, will break the test.
Otherwise, LGTM.
http://reviews.llvm.org/D11559
More information about the llvm-commits
mailing list