This is an archive of the discontinued LLVM Phabricator instance.

[MSP430] Fix PR32769: Select8 and Select16 need to have SR in Uses.
ClosedPublic

Authored by pftbest on Apr 24 2017, 11:19 PM.

Details

Summary

If Select pseudo instruction doesn't have use SR, then
CMP instructions are being marked as dead and later can be
removed by MachineCSE pass. This leads to incorrect code
generation.

Diff Detail

Repository
rL LLVM

Event Timeline

pftbest created this revision.Apr 24 2017, 11:19 PM
pftbest edited reviewers, added: efriedma; removed: eli.friedman.Apr 25 2017, 1:52 AM
efriedma edited edge metadata.Apr 25 2017, 11:32 AM

Looks fine, but someone who knows the MSP430 backend better should look at this.

lib/Target/MSP430/MSP430InstrInfo.td
125 ↗(On Diff #96506)

Not sure this comment adds anything.

asl accepted this revision.Apr 25 2017, 4:42 PM

In general, LGTM. I agree with Eli about irrelevance of comment.

This revision is now accepted and ready to land.Apr 25 2017, 4:42 PM
pftbest updated this revision to Diff 96651.Apr 25 2017, 5:08 PM

Removed the comment.

This revision was automatically updated to reflect the committed changes.