This is an archive of the discontinued LLVM Phabricator instance.

Replace assert with early-out in tryEmitFMulAdd
AbandonedPublic

Authored by scanon on Nov 20 2015, 3:49 PM.

Details

Summary

r253269 exposed a pre-existing issue in tryEmitFMulAdd, where we would assert if a fusable operation had operands with multiple uses (we didn't see it previously because FP_CONTRACT was off by default). Fix this issue by changing the assert into an early-out where we simply won't try to fuse.

Once this is done, we can try again at enabling FP_CONTRACT ON as a default.

Diff Detail

Event Timeline

scanon updated this revision to Diff 40840.Nov 20 2015, 3:49 PM
scanon retitled this revision from to Replace assert with early-out in tryEmitFMulAdd.
scanon updated this object.
scanon added reviewers: hfinkel, resistor, lhames.
scanon added a subscriber: cfe-commits.

Friendly ping.

Is it possible to have a test which covers this change?

lib/CodeGen/CGExprScalar.cpp
2568

I'd use auto *LHSBinOp here, the type is obvious from the right hand side.

2570–2575

I think use_empty() is more canonical than hasNUses(0) in this situation.

2573

Ditto here.

scanon abandoned this revision.Dec 2 2015, 5:17 PM

Abandoned for D15165.