[PATCH] D37989: InstCombine: Insert missing canonicalizes

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 11:04:11 PST 2017



> On Nov 27, 2017, at 14:02, via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> huh, minnum and maxnum return canonicalized values?
> 
> that’s interesting, because on our target, they don’t (our min/max acts as a select operation insomuch as it cannot modify the selectands).
> 
> what determines which operations canonicalize and which don’t?

That’s what IEEE-754 2008 says:

minNum(x, y) is the canonicalized number x if x<y, y if y<x, the canonicalized number if one operand is a number and the other a quiet NaN. Otherwise it is either x or y, canonicalized (this means results might differ among implementations). When either x or y is a signalingNaN, then the result is according to 6.2. 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171127/138205d0/attachment.html>


More information about the llvm-commits mailing list