select Cond, T, false --> Cond & T
select Cond, true, F --> Cond | F
This fixes regressions that would be visible if we remove known poison-unsafe transforms in instcombine mentioned here:
https://reviews.llvm.org/D72396#1810460
I'm not sure yet how to deal with the 'and-not' and 'or-not' variations.
Alive2 example for 1 of the tests:
http://volta.cs.utah.edu:8080/z/Ue2UE3
I would recommend making this more obvious: