[PATCH] D74713: [ConstantFold] fold most FP ops with undef operand to undef rather than NaN

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 11:53:23 PST 2020


efriedma added a comment.

> Is that enough to say the result is undef?

Theoretically, no.  To take a simple integer example, suppose you have "max(undef, 1)".  You can toggle any of the bits separately, but you can't produce 0, so converting it to "undef" is wrong.  Alive2 does these sorts of proofs if you want mechanical verification (although I don't think it handles fp).

Practically, I doubt anyone would notice if "1e100+undef" produced an impossible result.


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

https://reviews.llvm.org/D74713





More information about the llvm-commits mailing list