[PATCH] D42385: [InstSimplify] (X * Y) / Y --> X for relaxed floating-point ops
Noel Grandin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 00:57:46 PST 2018
grandinj added inline comments.
================
Comment at: lib/Analysis/InstructionSimplify.cpp:4300
+ if (FMF.allowReassoc() && match(Op0, m_c_FMul(m_Value(X), m_Specific(Op1))))
+ return X;
+
----------------
for these kinds of identities, should we not be matching
(X * A * B * ....) / X
?
i.e. whereever we are searching inside a group, we should scan until we hit a non-associative operator or an operator of different precedence ?
https://reviews.llvm.org/D42385
More information about the llvm-commits
mailing list