[PATCH] D50081: [ValueTracking] fix maxnum miscompile for cannotBeOrderedLessThanZero (PR37776)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 14:58:25 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D50081#1183166, @arsenm wrote:

> The nan, nan case may be constant folded, but I think this still needs to handle it correctly. A pass could still ask this on a call that hasn't been folded yet (although I guess this can't really be relied on for correctness anyway). The nan && nan case at least needs a comment


It's conservatively correct to return false, so I don't think maxnum is worth commenting specifically. For example, above here, we don't check for NaN inputs to the regular FP binops even though those would also return NaN (true). Should I add a general comment about that or leave it as-is?


https://reviews.llvm.org/D50081





More information about the llvm-commits mailing list