This is an archive of the discontinued LLVM Phabricator instance.

Use X86ISD::VBROADCAST in place of v2f64 X86ISD::MOVDDUP when AVX2 is available
ClosedPublic

Authored by craig.topper on Oct 11 2017, 11:21 PM.

Details

Summary

This is particularly important for AVX512VL where we are better able to recognize the VBROADCAST loads to fold with other operations.

For AVX512VL we now use X86ISD::VBROADCAST for all of the patterns and remove the 128-bit X86ISD::VMOVDDUP.

We may be able to use this for AVX1 as well which would allow us to remove more isel patterns.

I also had to add X86ISD::VBROADCAST as a node to call combineShuffle for so that we treat it similar to X86ISD::MOVDDUP.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Oct 11 2017, 11:21 PM
RKSimon added inline comments.Oct 13 2017, 7:10 AM
test/CodeGen/X86/avx512vl-vbroadcast.ll
183 ↗(On Diff #118742)

Is a mask test needed as well?

Add masked fold test too

RKSimon accepted this revision.Oct 13 2017, 9:07 AM

LGTM

test/CodeGen/X86/sse3-schedule.ll
566 ↗(On Diff #118919)

Make this change separately if you can.

This revision is now accepted and ready to land.Oct 13 2017, 9:07 AM
This revision was automatically updated to reflect the committed changes.