Page MenuHomePhabricator

[Reassociate] Handle unary FNeg in the Reassociate pass

Authored by cameron.mcinally on Jun 17 2019, 10:33 AM.

Diff Detail


Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2019, 10:33 AM

Correct comment. Should be 'nnan', not 'nnan and nsz'.

craig.topper added inline comments.Jun 17 2019, 7:52 PM
1974 ↗(On Diff #205152)

Update comment

1987 ↗(On Diff #205152)

If User is a unary FNeg, I assume isCommutative would be false and this getOperand call will access an operand that doesn't exist.

cameron.mcinally marked 3 inline comments as done.Jun 18 2019, 7:19 AM
cameron.mcinally added inline comments.
1974 ↗(On Diff #205152)

Bah, these two changes weren't supposed to be a part of this patch. Just an oversight and will update...

cameron.mcinally marked an inline comment as done.

Remove unintentional changes. Also fix up a poor naming choice.

arsenm accepted this revision.Jun 18 2019, 5:21 PM
This revision is now accepted and ready to land.Jun 18 2019, 5:21 PM
This revision was automatically updated to reflect the committed changes.