[PATCH] D73057: [InstCombine] fneg(X + C) --> -C - X

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 10:48:58 PST 2020


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/fneg.ll:407
 
-; TODO: -(x + C) --> -C - x
+; -(x + C) --> -C - x
 
----------------
cameron.mcinally wrote:
> Nit: are lowercase variables the standard format for tests? I see that they're uppercase in the source comments.
There's no official standard for tests, but most IR tests seem to use lowercase. There are even (or at least used to be) tests that mixed variables that only differed in case (%x and %X), but that's obviously not good for scripts or humans.

Source code has a standard:
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
(there was a recent proposal for changing variable names to be lowerCamel, but seems to have died?)

Usually, I just copy the code comment to the test file for easier grepping, so I'm not sure why I changed it here. :)
If anyone has a preference, I can update to it.


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

https://reviews.llvm.org/D73057





More information about the llvm-commits mailing list