Page MenuHomePhabricator

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

Authored by spatel on Jan 8 2020, 1:37 PM.

Details

Summary

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.

Diff Detail

Event Timeline

spatel created this revision.Jan 8 2020, 1:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2020, 1:37 PM
lebedev.ri accepted this revision.Jan 8 2020, 2:40 PM

LG
This is okay for vectors

This revision is now accepted and ready to land.Jan 8 2020, 2:40 PM
This revision was automatically updated to reflect the committed changes.