[LegalizeVectorOps] Use all ones mask when expanding i1 VP_SELECT.
authorCraig Topper <craig.topper@sifive.com>
Thu, 27 Apr 2023 15:26:11 +0000 (08:26 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 27 Apr 2023 15:26:16 +0000 (08:26 -0700)
commit0b5396b163b6ba014679a6af365747303b95cf97
treeba52c599a584b699e0f9635324f9fb5566efc4de
parent019e784bb19b4f4a8e4d4d9a3a604fba2d22ddf0
[LegalizeVectorOps] Use all ones mask when expanding i1 VP_SELECT.

We were previously using the condition as the mask. By the semantics
of VP operations, that means that anywhere the condition is false
returns poison and not the false operand.

Use an all ones mask instead.

No tests are affected because RISC-V drops the mask when lowering.

Reviewed By: fakepaper56

Differential Revision: https://reviews.llvm.org/D149310
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp