This is an archive of the discontinued LLVM Phabricator instance.

[ PowerPC ] Remove FeatureMFOCRF from the e500mc ProcessorModel.
ClosedPublic

Authored by trixirt on Sep 30 2015, 5:35 AM.

Details

Reviewers
hfinkel
Summary

On the e500, mfocrf is an illegal instruction.
Removing the FeatureMFOCRF from the ProcessorModel, disables it's default use for -mcpu=e500mc.

Add a testcase to verify the mfocrf insn is not used on the e500

Diff Detail

Event Timeline

trixirt updated this revision to Diff 36087.Sep 30 2015, 5:35 AM
trixirt retitled this revision from to [ PowerPC ] Remove FeatureMFOCRF from the e500mc ProcessorModel..
trixirt updated this object.
trixirt added a reviewer: hfinkel.
trixirt added a subscriber: llvm-commits.
hfinkel edited edge metadata.Sep 30 2015, 3:44 PM

This is fine, but we should have a test case.

Yes.
I will whip something up.
Tom

trixirt updated this revision to Diff 36469.Oct 4 2015, 8:53 AM
trixirt updated this object.
trixirt edited edge metadata.

A testcase distilled from the original problem.
Checks that mfocrf is not used.
Since checking for something not present is brittle, add a positve check.
The second check appends -mattr+mfocrf to the compile arg.
This manually adds back the removed feature and the generated code is
checked for the mfocrf insn.

hfinkel added inline comments.Oct 27 2015, 8:30 PM
test/CodeGen/PowerPC/e500-1.ll
5

New tests must use FileCheck, not grep.

Since it has been a month between reviews, I have moved onto other things.
I would hope that this change would not get stuck on the semantics of
the testcase.
The e500 is broken without this change.
Tom

Since it has been a month between reviews, I have moved onto other things.
I would hope that this change would not get stuck on the semantics of
the testcase.
The e500 is broken without this change.
Tom

We're all very busy. I can adjust the test case for you when I get an extra few minutes.

hfinkel accepted this revision.Nov 25 2015, 2:18 AM
hfinkel edited edge metadata.
This revision is now accepted and ready to land.Nov 25 2015, 2:18 AM
hfinkel closed this revision.Nov 25 2015, 2:18 AM

r254064