Introduce matching patterns for vbroadcast AVX instruction. The idea is to
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 17 Aug 2011 02:29:19 +0000 (02:29 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 17 Aug 2011 02:29:19 +0000 (02:29 +0000)
commit0e6d230abdbf6ba67a2676c118431a4df8fb15dd
treec45bfe0aafb8663f89ec7466a7fcce69a5802c16
parent666f500592b0d1b53f78155381434f4338d6999f
Introduce matching patterns for vbroadcast AVX instruction. The idea is to
match splats in the form (splat (scalar_to_vector (load ...))) whenever
the load can be folded. All the logic and instruction emission is
working but because of PR8156, there are no ways to match loads, cause
they can never be folded for splats. Thus, the tests are XFAILed, but
I've tested and exercised all the logic using a relaxed version for
checking the foldable loads, as if the bug was already fixed. This
should work out of the box once PR8156 gets fixed since MayFoldLoad will
work as expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137810 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrFragmentsSIMD.td
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/avx-vbroadcast.ll [new file with mode: 0644]