This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fix the splat immediate in PPCMIPeephole depending on if we have an Altivec and VSX splat instruction.
ClosedPublic

Authored by amyk on Jul 11 2021, 11:35 PM.

Details

Summary

An assertion of the following can occur because Altivec and VSX splats use a different operand number for the immediate:

int64_t llvm::MachineOperand::getImm() const: Assertion `isImm() && "Wrong MachineOperand accessor"' failed.

This patch updates PPCMIPeephole.cpp assign the correct splat immediate.

Diff Detail

Event Timeline

amyk created this revision.Jul 11 2021, 11:35 PM
amyk requested review of this revision.Jul 11 2021, 11:35 PM
nemanjai accepted this revision.Jul 12 2021, 3:08 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Jul 12 2021, 3:08 AM
This revision was landed with ongoing or failed builds.Jul 12 2021, 2:20 PM
This revision was automatically updated to reflect the committed changes.