[PATCH] D13740: Catch combine opportunities for redundant imuls

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 23:57:18 PDT 2015


delena added a comment.

I agree with this change. I think it should be profitable also for FP operations.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2213
@@ +2212,3 @@
+              (isConstantSplatVector(OtherOp->getOperand(1).getNode(), Val) ||
+               isa<ConstantSDNode>(OtherOp->getOperand(1).getNode())) &&
+              OtherOp->getOperand(0).getNode() == MulVar) {
----------------
You can use isConstOrConstSplat() .


http://reviews.llvm.org/D13740





More information about the llvm-commits mailing list