OSDN Git Service

[X86][AVX] Add test case showing incorrect extraction from VBROADCAST_LOAD on AVX2...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 7 Jul 2020 17:29:58 +0000 (18:29 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 7 Jul 2020 17:32:32 +0000 (18:32 +0100)
commit6cff71e92e644adf5eab8cb411e5ac053746bbac
treece9c2b5e58f79f08bf951316deefbd5957d74d76
parent3030e6b94b21f4d37ada6bef7cde6920415409d8
[X86][AVX] Add test case showing incorrect extraction from VBROADCAST_LOAD on AVX2 targets

On AVX2 we tend to lower BUILD_VECTOR of constants as broadcasts if we can, in this case a <2 x i16> non-uniform constant has been lowered as a <4 x i32> broadcast.

The test case shows that the extraction folding code has incorrectly extracted the wrong part (lower WORD) of the resulting i32 memory source.

Found by internal fuzzing tests.
llvm/test/CodeGen/X86/extractelement-load.ll