This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Don't crash on larger splats that can be achieved through 1-byte splats
ClosedPublic

Authored by nemanjai on Jul 19 2017, 4:11 PM.

Details

Summary

There's code in the back end to ensure that we leave nodes that are 1-byte splats as-is so that they'd match the XXSPLTISB instruction. However, the code doesn't handle a situation where the value being splat is a larger value that happens to have repeating bytes. This patch addresses those situation by adding v16i8 constant splat and bitcasting it to the target type.

This fixes PR33808.

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai created this revision.Jul 19 2017, 4:11 PM
echristo edited edge metadata.Jul 19 2017, 5:02 PM

Seems reasonable...

Seems reasonable...

Is this an equivalent of a LGTM? :)

hfinkel accepted this revision.Aug 2 2017, 4:59 AM

Seems reasonable...

Is this an equivalent of a LGTM? :)

LGTM (too).

This revision is now accepted and ready to land.Aug 2 2017, 4:59 AM
echristo accepted this revision.Aug 2 2017, 2:00 PM

Yep.

This revision was automatically updated to reflect the committed changes.