[PATCH] D39830: [DAGCombine] Transform (A + -2.0*B*C) -> (A - (B+B)*C)

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 09:24:42 PST 2017


mcrosier added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9719
+  SDValue N0N0 = N0->getOperand(0);
+  SDValue N1N0 = N1->getOperand(0);
+  if ((isFMulNegTwo(N0N0) && N0N0.hasOneUse()) ||
----------------
What if N1 is a constant?  I suspect you'll run into an assertion as constants don't have operands.


https://reviews.llvm.org/D39830





More information about the llvm-commits mailing list