This is an archive of the discontinued LLVM Phabricator instance.

[AVX512] Don't mark EXTLOAD as legal with AVX512. Continue using custom lowering.
ClosedPublic

Authored by craig.topper on Oct 9 2017, 9:15 PM.

Details

Summary

This was impeding our ability to combine the extending shuffles with other shuffles as you can see from the test changes.

There's one special case that needed to be added to use VZEXT directly for v8i8->v8i64 since the custom lowering requires v64i8.

Event Timeline

craig.topper created this revision.Oct 9 2017, 9:15 PM
RKSimon added inline comments.Oct 10 2017, 4:19 AM
test/CodeGen/X86/avx2-vbroadcast.ll
260–261

How come this managed to fold the load but AVX2 didn't?

Rebase after fixing broadcast_mem_v4i16_v16i16 for AVX2.

RKSimon added inline comments.Oct 13 2017, 7:08 AM
test/CodeGen/X86/vec_int_to_fp.ll
2635–2636

Missing fold?

2635–2636

Missing fold?

2961

Missing fold?

2974

Missing fold?

Rebase after fixing some of the folding problems.

delena added inline comments.Oct 14 2017, 2:10 PM
lib/Target/X86/X86ISelLowering.cpp
18427

Do we have a test for this case?

test/CodeGen/X86/avx512-shuffles/broadcast-vector-int.ll
353–356

I'm not sure that masked instruction is the best solution. May be converting it to a shuffle will give better results. Can this sequence be resolved with "pinsertd"? you are loading two elements, but using only one of them, right?

367–370

load {a0, a1}
%shuf = { a0, a1, a0, a1}
%res = { a0, 0, 0, 0, 0}

  • can we do the same with one "vmovd" instruction ?
craig.topper added inline comments.Oct 14 2017, 2:21 PM
lib/Target/X86/X86ISelLowering.cpp
18427

Yes there were test cases that failed without this. I don't remember specifically which ones.

test/CodeGen/X86/avx2-vbroadcast.ll
257

Looks like there's still a folding problem here

craig.topper added inline comments.Oct 14 2017, 11:11 PM
test/CodeGen/X86/avx512-shuffles/broadcast-vector-int.ll
367–370

This test is trying to test broadcasts, the fact the test was using a constant mask is a test problem which I've fixed in r315848

Rebase after fixing the constant select conditions and other recent improvements.

delena accepted this revision.Oct 14 2017, 11:38 PM
This revision is now accepted and ready to land.Oct 14 2017, 11:38 PM
This revision was automatically updated to reflect the committed changes.