This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeVectorOps] Use all ones mask when expanding i1 VP_SELECT.
ClosedPublic

Authored by craig.topper on Apr 26 2023, 4:51 PM.

Details

Summary

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.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 26 2023, 4:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2023, 4:51 PM
craig.topper requested review of this revision.Apr 26 2023, 4:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2023, 4:51 PM
This revision is now accepted and ready to land.Apr 26 2023, 6:30 PM