HomePhabricator

[InstSimplify] Fix addo/subo with undef (PR43188)

Authored by nikic on Sun, Jan 3, 9:51 AM.

Description

[InstSimplify] Fix addo/subo with undef (PR43188)

We can't fold the first result to undef, because not all values
may be reachable under the constraint that no overflow occurred.
Use the same folds we do for saturated math instead.

Proofs:
uaddo: https://alive2.llvm.org/ce/z/zf55N_
saddo: https://alive2.llvm.org/ce/z/a_xPgS
usubo: https://alive2.llvm.org/ce/z/DmRqwt
ssubo: https://alive2.llvm.org/ce/z/8ag7U-

Details

Committed
nikicSun, Jan 3, 9:51 AM
Parents
rGc6ad00d70985: [InstSimplify] Return poison for out of bounds extractelement
Branches
Unknown
Tags
Unknown