HomePhabricator

[InstSimplify] select Cond, true, false --> Cond

Authored by spatel on Jan 9 2020, 6:02 AM.

Description

[InstSimplify] select Cond, true, false --> Cond

This is step 1 of damage control assuming that we need to remove several
over-reaching folds for select-of-booleans because they can cause
miscompiles as shown in D72396.

The scalar case seems obviously safe:
https://rise4fun.com/Alive/jSj

And I don't think there's any danger for vectors either - if the
condition is poisoned, then the select must be poisoned too, so undef
elements don't make any difference.

Differential Revision: https://reviews.llvm.org/D72412

Details

Committed
spatelJan 9 2020, 6:04 AM
Differential Revision
D72412: [InstSimplify] select Cond, true, false --> Cond
Parents
rG173b711e83d7: [ARM][MVE] MVE-I should not be disabled by -mfpu=none
Branches
Unknown
Tags
Unknown