[PATCH] D52934: [FPEnv] PatternMatcher support for checking FNEG ignoring signed zeros

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 11:38:13 PDT 2018


cameron.mcinally added a comment.

In https://reviews.llvm.org/D52934#1258981, @lebedev.ri wrote:

> `NSW` is a flag *on an instruction*. It's not a 'fneg operation of NSZ instruction'.
>  Suffix variants are cleaner IMO. Would be great to stick to them, and migrate the rest.


I don't feel strongly either way, but will point out one inconsistency...

The only suffixes in IRBuilder are on CreateFxxxFMF(...). Those are instructions that copy over FastMath flags. That sounds like it falls into your "is a flag on an instruction" bucket and should have a prefix instead of a suffix. But again, there are subtle differences there. For example, CreateFxxxFMF(...) takes the flags as an input and CreateNSWyyy(...) has a fixed value for the flag.

Anyone else feel strongly about the prefix/suffix decision? I don't work in this part of LLVM enough to have a strong opinion.


Repository:
  rL LLVM

https://reviews.llvm.org/D52934





More information about the llvm-commits mailing list