[AArch64][GlobalISel] Fix crash during legalization of a vector G_SELECT with scalar...
authorAmara Emerson <amara@apple.com>
Tue, 17 Nov 2020 20:09:31 +0000 (12:09 -0800)
committerAmara Emerson <amara@apple.com>
Tue, 1 Dec 2020 00:37:49 +0000 (16:37 -0800)
commit87ff156414370043cf149e0c77513c5227b336b1
treecbfcecf6f2ab960010d47d6e57aa0552eee76b43
parent871f96eed3797061c8b1c82fb77d077d110a2da7
[AArch64][GlobalISel] Fix crash during legalization of a vector G_SELECT with scalar mask.

The lowering of vector selects needs to first splat the scalar mask into a vector
first.

This was causing a crash when building oggenc in the test suite.

Differential Revision: https://reviews.llvm.org/D91655
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-select.mir