[PATCH] D67553: [InstSimplify] Match 1.0 and 0.0 for both operands in SimplifyFMAMul

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 07:44:19 PDT 2019


lebedev.ri added a comment.

LG



================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4561
                               const SimplifyQuery &Q, unsigned MaxRecurse) {
   // fmul X, 1.0 ==> X
   if (match(Op1, m_FPOne()))
----------------
I'm wondering if 
```
{
if(isa<Constant>(Op0)) std::swap(Op0, Op1);
```
would be simpler?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67553/new/

https://reviews.llvm.org/D67553





More information about the llvm-commits mailing list