[PATCH] D63065: [InstSimplify] Fix addo/subo undef folds (PR42209)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 16 01:28:00 PDT 2019


nikic added a comment.

@lebedev.ri Not familiar with what exactly alive proves, but assuming you're using two separate proofs for a reason: It is possible to make the result zero, yes. But only if the overflow flag is chosen as true (rather than false) //at the same time//. Both result & overflow need to be checked together for the result to be meaningful.

(Additionally, if alive models udiv semantics correctly, any transformation will be correct by definition (IUB) after a udiv 0 -- I'm assuming that's not how it works though.)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63065/new/

https://reviews.llvm.org/D63065





More information about the llvm-commits mailing list