This is an archive of the discontinued LLVM Phabricator instance.

[X86] `lowerBuildVectorAsBroadcast()`: with AVX512VL, allow i64 broadcasts from constant pool
ClosedPublic

Authored by lebedev.ri on Apr 6 2022, 7:35 AM.

Diff Detail

Event Timeline

lebedev.ri created this revision.Apr 6 2022, 7:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 7:35 AM
lebedev.ri requested review of this revision.Apr 6 2022, 7:35 AM

There is a number of failures to fold the broadcast load into a folded load.
Is that a blocker? I'm not really sure what is going on with that.

llvm/test/CodeGen/X86/avx512-ext.ll
3048–3049

Folded load folding failure.

llvm/test/CodeGen/X86/fma-fneg-combine.ll
238–240

Folded load folding failure.

llvm/test/CodeGen/X86/sadd_sat_vec.ll
1222–1224

Folded load folding failure.

llvm/test/CodeGen/X86/vec_int_to_fp.ll
5695–5696

Folded load folding failure.

lebedev.ri updated this revision to Diff 420863.Apr 6 2022, 7:44 AM

Adjust check prefixes in one test to restore check lines.

RKSimon added inline comments.Apr 6 2022, 8:06 AM
llvm/lib/Target/X86/X86ISelLowering.cpp
9507

I think you need hasVLX() not hasAVX512() - that should fix the KNL (AVX512F only) regressions

lebedev.ri updated this revision to Diff 420872.Apr 6 2022, 8:13 AM
lebedev.ri marked an inline comment as done.
lebedev.ri retitled this revision from [X86] `lowerBuildVectorAsBroadcast()`: with AVX512, allow i64 broadcasts from constant pool to [X86] `lowerBuildVectorAsBroadcast()`: with AVX512VL, allow i64 broadcasts from constant pool.

Require AVX512VL, not just plain AVX512F.

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

D'oh. Thanks!

RKSimon accepted this revision.Apr 6 2022, 8:28 AM

LGTM - although diff with context would have been useful! Cheers.

This revision is now accepted and ready to land.Apr 6 2022, 8:28 AM
This revision was landed with ongoing or failed builds.Apr 6 2022, 8:34 AM
This revision was automatically updated to reflect the committed changes.