[PATCH] D54121: [FPEnv] Add constrained FCMP intrinsic
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 8 07:21:40 PST 2018
cameron.mcinally added a comment.
In https://reviews.llvm.org/D54121#1291085, @andrew.w.kaylor wrote:
> In https://reviews.llvm.org/D54121#1290989, @cameron.mcinally wrote:
>
> > compareSignalingGreaterEqual(a,b) is equivalent to compareSignalingLessUnordered(b, a)
> >
>
>
> Is it? If a or b is NaN the first one will return false but the second will return true.
Ah, yeah, I botched that. Those tables show the negations:
(a >= b) negated is !(a >= b) [signaling and quiet] or (a ?< b) [quiet]
Which makes sense. There are 4 relations in our set: { LT, EQ, GT, UN }. So:
{ GT, EQ } is !{ LT, UN }
So, yeah, all 22 operations are distinct. Unless we want to try to pattern match NOT(compareXXX(a,b)). That's probably not safe to do though, in case the compare operation and NOT get broken up during optimizations.
Repository:
rL LLVM
https://reviews.llvm.org/D54121
More information about the llvm-commits
mailing list