[PATCH] D68265: [InstCombine] Simplify fma multiplication to nan for undef or nan operands.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 05:31:50 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL373459: [InstCombine] Simplify fma multiplication to nan for undef or nan operands. (authored by fhahn, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D68265?vs=222578&id=222807#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68265/new/
https://reviews.llvm.org/D68265
Files:
llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Index: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
===================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp
@@ -4592,6 +4592,9 @@
static Value *SimplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
const SimplifyQuery &Q, unsigned MaxRecurse) {
+ if (Constant *C = simplifyFPOp({Op0, Op1}))
+ return C;
+
// fmul X, 1.0 ==> X
if (match(Op1, m_FPOne()))
return Op0;
@@ -4626,9 +4629,6 @@
if (Constant *C = foldOrCommuteConstant(Instruction::FMul, Op0, Op1, Q))
return C;
- if (Constant *C = simplifyFPOp({Op0, Op1}))
- return C;
-
// Now apply simplifications that do not require rounding.
return SimplifyFMAFMul(Op0, Op1, FMF, Q, MaxRecurse);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68265.222807.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191002/9a17bf1c/attachment.bin>
More information about the llvm-commits
mailing list