[GlobalISel][Legalizer] Fix lowerSelect() not sign-extending the mask value.
authorAmara Emerson <amara@apple.com>
Mon, 19 Sep 2022 23:21:55 +0000 (00:21 +0100)
committerAmara Emerson <amara@apple.com>
Tue, 20 Sep 2022 15:40:34 +0000 (16:40 +0100)
commit78833a43e8d84e9650faa28ef8ee4517fbd7a11b
tree7c60582ff1d3793a775a5013fb00d4cede0e9f48
parentc521a052f9bf7e418011f98a662be2c434d350ba
[GlobalISel][Legalizer] Fix lowerSelect() not sign-extending the mask value.

I'm not sure why the SEXT_INREG was gated on a bitwidth check of the mask
vs element size.

This fixes a miscompile in chromium's skia library.

Differential Revision: https://reviews.llvm.org/D134236
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-select.mir