OSDN Git Service

[AVX-512] Add test cases that show where we are using two subvector inserts to broadc...
authorCraig Topper <craig.topper@gmail.com>
Thu, 19 Jan 2017 07:37:45 +0000 (07:37 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 19 Jan 2017 07:37:45 +0000 (07:37 +0000)
commit9720a787a1c430ef1bf2ac2dc7d5564287612c3b
tree92e98e221cb1294fde1cb3acb88c63f0d81fe9ac
parentf1fe387ada0452c04f7e710b3790302988646717
[AVX-512] Add test cases that show where we are using two subvector inserts to broadcast a 128-bit subvector into a 512-bit vector. We'd be better off using something like SHUFF32X4.

If the subvector comes from a load, we convert to SUBV_BROADCAST and use a broadcast instruction. But if there is no load we keep the inserts. I think we should create the SUBV_BROADCAST even without the load and let isel use the fallback patterns that are used if the load can't be folded. This will use the SHUFF32X4 or similar instruction for the 128-bit into 512-bit case and a single insert for 128 into 256 or 256 into 512.

This should be fixed so subvector broadcast intrinsics can be replaced with native IR since some of those currently lower directly to SHUFF32X4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292475 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/X86/vector-shuffle-512-v16.ll
test/CodeGen/X86/vector-shuffle-512-v8.ll