Page MenuHomePhabricator

[X86] Add RDRND to Goldmont. Add MOVBE to all Atom CPUs
ClosedPublic

Authored by craig.topper on Jun 29 2017, 4:04 PM.

Details

Summary

This adds to RDNRND to Goldmont as I believe it has that feature in addition to RDSEED.

I don't know how to test the MOVBE part since we don't have a MOVBE macro nor do we need one. The backend will already infer the feature from the CPU name. We do have a command line switch to force it on and off regardless of CPU. So really I don't even think this change is necessary, I just found it inconsistent that the movbe handling existed for the command line option, but was not bound to any CPU.

Diff Detail

Event Timeline

craig.topper created this revision.Jun 29 2017, 4:04 PM
RKSimon accepted this revision.Jun 30 2017, 9:30 AM

LGTM with a couple of comments.

On the LLVM side, X86.td GoldMont class looks like it needs RDRAND as well.

lib/Basic/Targets.cpp
3310

Is it worth doing the reordering first as an NFC? Then add MOVBE?

This revision is now accepted and ready to land.Jun 30 2017, 9:30 AM

There's a separate review for X86.d https://reviews.llvm.org/D34828