OSDN Git Service

[X86] Separate the memory size of vzext_load/vextract_store from the element size...
authorCraig Topper <craig.topper@intel.com>
Mon, 15 Jul 2019 02:02:31 +0000 (02:02 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 15 Jul 2019 02:02:31 +0000 (02:02 +0000)
commit685668bc06abd96fc10c540a7d1d46f61749fdd2
tree98a3d3e980a37fc43c21f8579b303e48fe2b4ca4
parentae3eca0e819dac1729983ab33e01d49ca4b6904d
[X86] Separate the memory size of vzext_load/vextract_store from the element size of the result type. Use them improve the codegen of v2f32 loads/stores with sse1 only.

Summary:
SSE1 only supports v4f32. But does have instructions like movlps/movhps that load/store 64-bits of memory.

This patch breaks the connection between the node VT of the vzext_load/vextract_store patterns and the memory VT. Enabling a v4f32 node with a 64-bit memory VT. I've used i64 as the memory VT here. I've written the PatFrag predicate to just check the store size not the specific VT. I think the VT will only matter for CSE purposes. We could use v2f32, but if we want to start using these operations in more places a simple integer type might make the most sense.

I'd like to maybe use this same thing for SSE2 and later as well, but that will need more work to be supported by EltsFromConsecutiveLoads to avoid regressing lit tests. I'd maybe also like to combine bitcasts with these load/stores nodes now that the types are disconnected. And I'd also like to consider canonicalizing (scalar_to_vector + load) to vzext_load.

If you want I can split the mechanical tablegen stuff where I added the 32/64 off from the sse1 change.

Reviewers: spatel, RKSimon

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64528

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366034 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrAVX512.td
lib/Target/X86/X86InstrFragmentsSIMD.td
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/sse-intrinsics-fast-isel.ll
test/CodeGen/X86/vector-shuffle-sse1.ll