This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] lowerShuffleAsBroadcast - improve load folding by avoiding bitcasts
ClosedPublic

Authored by RKSimon on Mar 3 2019, 2:16 PM.

Details

Summary

AVX1 broadcasts were failing as we were adding bitcasts that caused MayFoldLoad's hasOneUse to return false.

This patch stops introducing bitcasts so early and also replaces the broadcast index scaling through bitcasts (which can't succeed in some cases) to instead just keep track of the bitoffset which can be converted back to the broadcast index later on.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Mar 3 2019, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2019, 2:16 PM

ping - I can split the bitoffset changes from the bitcast removal if useful

This revision is now accepted and ready to land.Mar 12 2019, 3:43 PM
This revision was automatically updated to reflect the committed changes.