[llvm-commits] [AVX PATCH] Add VBROADCASTSS selection

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Wed Sep 21 11:12:57 PDT 2011


Hi Zvi,

On Wed, Sep 21, 2011 at 8:58 AM, Rackover, Zvi <zvi.rackover at intel.com> wrote:
> Hi Bruno et al,
>
>
>
> This patch adds selection of the vbroadcastss/vbroadcastsd instructions,
> fixes the avx-vbroadcast.ll test and improves generated code in a few other
> test cases.
>
> However, for one test case, avx-splat.ll::funcC, the generated code worsens
> and the test fails.
>
>
>
> Please review the attached patch and commit if acceptable.

We already have vbroadcast support (isVectorBroadcast in
ISelLowering), it's disabled because of PR8156, but should be
re-enabled once this is solved. About your patch, handling it in
BUILD_VECTOR isn't the way to go because you only want to match a
scalar_to_vector+loads, for the other cases you don't want it. If the
actual code doesn't catch any cases you might be looking at, please
modify that function or add a x86 target specific dag combine to
handle them. To test the actual code before PR8156 gets solved replace
MayFoldLoad with RelaxedMayFoldLoad locally.


-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc



More information about the llvm-commits mailing list