[PATCH] D157030: InstCombine: Fold out scale-if-denormal pattern
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 09:27:35 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3427
+ // This pattern appears in code with denormal range checks after it's
+ // assumed denormals are treated as zero. This drops a canonicalization.
+
----------------
goldstein.w.n wrote:
> What do you mean by "This drops a canonicalization"? Causes us to miss it?
>
> Can you also describe the "scale-if-equals-zero" pattern. Mostly for my sake, not familiar with it. If another reviewer is they might be better fit for this patch.
Before this you always get a value that goes through a multiply, which if we strictly followed FP behavior would require quieting a signaling nan and flushing denormals. By replacing with a direct x reference, that doesn't happen (but per the langref is allowed without strictfp)
The pattern is covered by the select, the multiply if equal 0 pattern
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157030/new/
https://reviews.llvm.org/D157030
More information about the llvm-commits
mailing list