This is an archive of the discontinued LLVM Phabricator instance.

[PPC] Fix assertion failure during binary encoding with -mcpu=pwr9
ClosedPublic

Authored by inouehrs on May 23 2017, 10:09 PM.

Details

Summary

clang -c -mcpu=pwr9 test/CodeGen/PowerPC/build-vector-tests.ll causes an assertion failure during the binary encoding.
The failure occurs when a D-form load instruction takes two register operands instead of a register + an immediate.

This patch fixes the problem and also adds an assertion to catch this failure earlier before the binary encoding (i.e. during lit test).
The fix is from Nemanja Ivanovic @nemanjai.

Diff Detail

Event Timeline

inouehrs created this revision.May 23 2017, 10:09 PM
kbarton accepted this revision.May 25 2017, 3:35 PM

Aside from a spelling mistake, LGTM.

lib/Target/PowerPC/PPCInstrInfo.cpp
1897

Spelling: registrer -> register

This revision is now accepted and ready to land.May 25 2017, 3:35 PM
inouehrs updated this revision to Diff 100584.May 29 2017, 12:04 AM

Fixed typo and rebased to the latest code base.

This revision was automatically updated to reflect the committed changes.
inouehrs marked an inline comment as done.