[ConstantFold] Don't fold and/or i1 poison to poison (NFC)
authorJuneyoung Lee <aqjune@gmail.com>
Mon, 30 Nov 2020 13:48:43 +0000 (22:48 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Mon, 30 Nov 2020 13:58:31 +0000 (22:58 +0900)
commit9c49dcc356eb4c59fc1353bbbaae6d3a56a656c1
treeb75e8082fa1566e497c78d7b34d17f85c44b29e2
parentc3d484673fa70bb4b2284689db76d36bbdf12f38
[ConstantFold] Don't fold and/or i1 poison to poison (NFC)

.. because it causes miscompilation when combined with select i1 -> and/or.

It is the select fold which is incorrect; but it is costly to disable the fold, so hack this one.

D92270
llvm/lib/IR/ConstantFold.cpp
llvm/test/Transforms/InstSimplify/ConstProp/poison.ll