[PATCH] D72010: [CodeGen] Use CreateFNeg in buildFMulAdd
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 30 12:52:01 PST 2019
rjmccall added inline comments.
================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3350
+ MulOp0 = Builder.CreateFNeg(MulOp0, "neg");
+ if (negAdd)
+ Addend = Builder.CreateFNeg(Addend, "neg");
----------------
craig.topper wrote:
> I removed the 'else' here because logically it didn't make sense that whether we looked at negAdd should be dependent on negMul being false. The assert at the beginning of the function still assures they are mutex. But the code shouldn't need that assumption.
Fine by me, although it's not clear why the assertion's restriction is required, then.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72010/new/
https://reviews.llvm.org/D72010
More information about the cfe-commits
mailing list