[PATCH] D63933: [NewGVN] Add unary FNeg support to NewGVN pass

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 14:40:48 PDT 2019


cameron.mcinally marked 3 inline comments as done.
cameron.mcinally added inline comments.


================
Comment at: llvm/test/Transforms/NewGVN/fpmath.ll:46
 ; CHECK: @test5(double %x)
-; CHECK: %neg1 = fneg double %x, !fpmath !0
-; CHECK: %neg2 = fneg double %x, !fpmath !1
-; CHECK: %foo = fadd double %neg1, %neg2
+; CHECK: %neg1 = fneg double %x, !fpmath !1
+; CHECK: %foo = fadd double %neg1, %neg1
----------------
fhahn wrote:
> cameron.mcinally wrote:
> > cameron.mcinally wrote:
> > > fhahn wrote:
> > > > Can you update the test to check !1 points to the expected metadata?
> > > Sorry, missed this comment. Will submit a follow-up patch ASAP.
> > Actually, I'm not sure how to do that well. Would you point me to an example, please?
> > 
> > The metadata string is at the end of the file. I could check for it at the very end of all the tests. Is that what you're suggesting?
> > 
> > If I check the metadata in this particular test, that would prevent new tests from being added after this test, since it would throw off the CHECK line order.
> I think the most robust thing is to check it at the end of the file.
> 
> Ideally you would use a regex to match the ID in the CHECK lines for the operations and then check the value of the metadata at the bottom.
Submitted:

```
Author: mcinally
Date: Fri Jun 28 14:39:08 2019
New Revision: 364685
```

Just give me a heads up if you had something different in mind...


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63933





More information about the llvm-commits mailing list