This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][Power10] Fix XXSPLI32DX not correctly exploiting specific cases
ClosedPublic

Authored by Conanap on Jan 28 2021, 10:40 AM.

Details

Summary

Some cases may be transformed into 32 bit splats before hitting the boolean statement, which may cause incorrect behaviour and provide XXSPLTI32DX with the incorrect values of splat. The condition was reversed so that the shortcut prevents this problem.

Diff Detail

Event Timeline

Conanap created this revision.Jan 28 2021, 10:40 AM
Conanap requested review of this revision.Jan 28 2021, 10:40 AM
nemanjai accepted this revision.Jan 28 2021, 10:47 AM

LGTM as long as the nits are addressed on the commit.

llvm/lib/Target/PowerPC/PPCISelLowering.cpp
8611
// Check the type first to short-circuit so we don't modify APSplatBits if
// this block isn't executed.
8617

We can get rid of this now that the problem is fixed (i.e. this can go back to just being an else).

llvm/test/CodeGen/PowerPC/p10-splatImm32.ll
104

Get rid of this test case now. It is redundant.

114

Get rid of this comment now, the FIXME has been addressed.

This revision is now accepted and ready to land.Jan 28 2021, 10:47 AM
lei accepted this revision.Jan 28 2021, 10:47 AM
lei added a subscriber: lei.

LGTM

This revision was landed with ongoing or failed builds.Jan 28 2021, 12:17 PM
This revision was automatically updated to reflect the committed changes.
Conanap marked 4 inline comments as done.