This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach combineToExtendBoolVectorInReg to create opportunities for using broadcast load instructions.
ClosedPublic

Authored by craig.topper on Mar 8 2020, 9:30 PM.

Details

Summary

If we're inserting a scalar that is smaller than the element
size of the final VT, the value of the extra bits doesn't matter.

Previously we any_extended in the scalar domain before inserting.

This patch changes this to use a broadcast of the original
scalar type and then a bitcast to the final type. This might
enable the use of a broadcast load.

This recovers regressions from 07d68c24aa19483e44db4336b0935b00a5d69949
and 9fcd212e2f678fdbdf304399a1e58ca490dc54d1 without relying on
alignment of the load.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 8 2020, 9:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2020, 9:30 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
RKSimon accepted this revision.Mar 9 2020, 7:59 AM

LGTM

llvm/lib/Target/X86/X86ISelLowering.cpp
44289

remove the comment?

This revision is now accepted and ready to land.Mar 9 2020, 7:59 AM
This revision was automatically updated to reflect the committed changes.