[PATCH] D32208: [GVN] Don't coerce non-integral pointers to integers or vice versa

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 07:19:23 PDT 2017


davide accepted this revision.
davide added inline comments.
This revision is now accepted and ready to land.


================
Comment at: test/Transforms/NewGVN/non-integral-pointers.ll:25-28
+; CHECK-LABEL: @f1(
+; CHECK-NOT: inttoptr
+; CHECK-NOT: ptrtoint
+ entry:
----------------
sanjoy wrote:
> davide wrote:
> > I think a test made only of `CHECK-NOT` is a little brittle. Can you expand it a bit?
> I could expand it to CHECK for what GVN generates here (IIRC it does not do anything), but that would mislead the reader about the purpose of this test.  This test is really intended to check that GVN did //not// generate `inttoptr` or `ptrtoint`, so I think a `CHECK-NOT` based test is appropriate here.
Yes, it shouldn't do anything. Probably load coercion tests should cover other cases so, after a second look, I guess your `CHECK` lines are fine.


https://reviews.llvm.org/D32208





More information about the llvm-commits mailing list