We have an fneg instruction now and should use it instead of the fsub -0.0 idiom. Looks like we had no test that showed that we handled the negation cases here so I've added new tests.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/CodeGen/CGExprScalar.cpp | ||
---|---|---|
3350 | 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. |
clang/lib/CodeGen/CGExprScalar.cpp | ||
---|---|---|
3350 | Fine by me, although it's not clear why the assertion's restriction is required, then. |
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.