[X86] Correct the conversion of VALIGND/Q intrinsics to shufflevector.
authorCraig Topper <craig.topper@sifive.com>
Sun, 27 Jun 2021 02:02:26 +0000 (19:02 -0700)
committerCraig Topper <craig.topper@sifive.com>
Sun, 27 Jun 2021 02:06:00 +0000 (19:06 -0700)
commit7a112356e4a19c0e63f533548fa95a03a5537fb9
treea56449701f23a223de2617831ee08dbc7d0fa4bc
parent699d47472c3f7c5799fe75486689545179cfba03
[X86] Correct the conversion of VALIGND/Q intrinsics to shufflevector.

We need to mask the immediate to the width of a single vector
rather than 2 vectors. If we use the width of 2 vectors then
any shift larger than the length of 1 vector is going to overflow
the shuffle indices.

Fixes PR50895.
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/X86/avx512vl-builtins.c