[PATCH] D38765: Don't replace constants with constants in GVN

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 20:52:37 PDT 2017


davide added inline comments.


================
Comment at: test/Transforms/GVN/no-crash-on-undef-assume.ll:1
+; RUN: opt < %s -gvn -S
+
----------------
alexcrichton wrote:
> davide wrote:
> > check the output?
> Oh I wasn't quite sure what this should be checking, this is basically just asserting it doesn't crash (today this test case crashes w/ asserts enabled)
you could probably just pipe the output to `FileCheck %s` and insert some check lines (please see any other test in tree).
The reason is twofold:
1) if some xform changes this pattern, then we notice (imagine, e.g., at some point we decide to not strip calls to assume [I think this is what happens now])
2) you could replace `opt` with `/bin/true` and the test will still pass (while checking the output with filecheck makes this test more robust.

Thanks!


https://reviews.llvm.org/D38765





More information about the llvm-commits mailing list