This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] fix potential verification errors on CFENCE8
ClosedPublic

Authored by inouehrs on Jun 14 2017, 8:57 AM.

Details

Summary

This patch fixes a potential verification error (64-bit register operands for cmpw) with -verify-machineinstrs while expanding CFENCE8 into cmp + bc + isync.
As far as I read the references, we can use cmpd (or any compare instruction) for this purpose.
http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html

Diff Detail

Repository
rL LLVM

Event Timeline

inouehrs created this revision.Jun 14 2017, 8:57 AM
inouehrs updated this revision to Diff 102666.Jun 15 2017, 6:22 AM
  • added patch for test cases, which I forgot to include in the first version
timshen accepted this revision.Jun 15 2017, 9:36 AM

cmpd should work as well. Both cmpw and cmpd are mnemonics of the instruction cmp, so I don't expect a performance difference.

This revision is now accepted and ready to land.Jun 15 2017, 9:36 AM
This revision was automatically updated to reflect the committed changes.