[llvm] [InstCombine] Fold fcmp ogt (x - y), 0 into fcmp ogt x, y #85245 (PR #85506)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 20 04:08:13 PDT 2024
jayfoad wrote:
> @jayfoad, I was looking for F.getDenormalType but couldn't find it. Instead, I tried using F->getDenormalMode(LHSI->getType()->getScalarType()->getFltSemantics()) == DenormalMode::getIEEE(), but I haven't seen any difference in the tests after making the change.
You would need to take a test where your optimization _does_ apply and then make a copy of it with an attribute like this, and show that the optimization does _not_ apply to it:
```
define float @foo(...) "denormal-fp-math"="dynamic,dynamic" {
...
}
```
See the LangRef for the allowed values of the `denormal-fp-math` attribute. The default is `ieee,ieee` and if you specify anything else it should block your optimization.
https://github.com/llvm/llvm-project/pull/85506
More information about the llvm-commits
mailing list