This is an archive of the discontinued LLVM Phabricator instance.

[PPC] Avoid non-simple MVT in STBRX optimization
ClosedPublic

Authored by Carrot on Mar 14 2018, 3:55 PM.

Details

Summary

PR35402 triggered this case. It bswap and stores a 48bit value, current STBRX optimization transforms it into STBRX. Unfortunately 48bit is not a simple MVT, there is no PPC instruction to support it, and it can't be automatically expanded by llvm, so caused a crash.

This patch detects the non-simple MVT and returns early.

Diff Detail

Repository
rL LLVM

Event Timeline

Carrot created this revision.Mar 14 2018, 3:55 PM
echristo accepted this revision.Mar 14 2018, 5:24 PM

LGTM.

Thanks!

This revision is now accepted and ready to land.Mar 14 2018, 5:24 PM
This revision was automatically updated to reflect the committed changes.