This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] fix potential verification errors
ClosedPublic

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

Details

Reviewers
kbarton
nemanjai
Summary

This patch fixes trivial mishandling of 64-bit instructions that may potentially cause verification errors with -verify-machineinstrs.
This patch should not bring functional changes.

Diff Detail

Event Timeline

inouehrs created this revision.Jun 14 2017, 8:57 AM
nemanjai accepted this revision.Jun 21 2017, 5:32 AM

Aside from the inline stylistic nit, this LGTM.

lib/Target/PowerPC/PPCRegisterInfo.cpp
378

Just a stylistic nit:

  • No braces in conditionals with a single statement

In fact, I'd probably define something like unsigned FramePtrReg = LP64 ? PPC::X31 : PPC::R31 just after line 375 and just use it (along with a ternary expression for the opcode) in this call to BuildMI().

This revision is now accepted and ready to land.Jun 21 2017, 5:32 AM