diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-02-20 21:52:46 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-02-20 21:52:46 +0000 |
commit | 7365b44b8558c855531962c71ac0c42fea755f4a (patch) | |
tree | 4988bf2b00361e7f45544646c22f778a62eaa0ba | |
parent | 7fbea20b90d766c5175595d6c5a322602c59c8c0 (diff) | |
download | bcm5719-llvm-7365b44b8558c855531962c71ac0c42fea755f4a.tar.gz bcm5719-llvm-7365b44b8558c855531962c71ac0c42fea755f4a.zip |
[InstCombine] remove unneeded operand swap: NFCI
FMul is commutative, so complexity-based canonicalization should always
take care of the swap via SimplifyAssociativeOrCommutative().
llvm-svn: 325628
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp index 7e402eb2307..cb42d24cd34 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp @@ -549,9 +549,6 @@ Instruction *InstCombiner::visitFMul(BinaryOperator &I) { if (Value *V = SimplifyVectorOp(I)) return replaceInstUsesWith(I, V); - if (isa<Constant>(Op0)) - std::swap(Op0, Op1); - if (Value *V = SimplifyFMulInst(Op0, Op1, I.getFastMathFlags(), SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); |