[PATCH] D31788: [ConstantFolding] Add folding for various math '__<func>_finite' routines generated from -ffast-math
Andy Kaylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 13:35:37 PDT 2017
andrew.w.kaylor added inline comments.
================
Comment at: lib/Analysis/ConstantFolding.cpp:1467
+ }
+ }
}
----------------
andrew.w.kaylor wrote:
> This needs an 'else return false'.
After a little more thought, I think I prefer this to 'else return false':
```
// The '12' here is the length of the shortest name that can match.
// We need to check the size before looking at Name[1] and Name[2]
// so we may as well check a limit that will eliminate mismatches.
if (Name.size() < 12 || Name[1] != '_')
return false;
switch (Name[2]) {
<...>
```
Does that look OK?
https://reviews.llvm.org/D31788
More information about the llvm-commits
mailing list