[PATCH] D144447: [Clang] Teach buildFMulAdd to peek through fneg to find fmul.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 21 23:26:18 PST 2023


craig.topper added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3738
-  assert(!(negMul && negAdd) && "Only one of negMul and negAdd should be set.");
-
   Value *MulOp0 = MulOp->getOperand(0);
----------------
kpn wrote:
> If I'm reading this right it looks like the assert() wasn't needed before. Do we know why it was added in the first place?
I don't. I've added @lhames who wrote the code originally, but's been 10 years.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144447



More information about the cfe-commits mailing list