[PATCH] D16658: AMDGPU: Add med3 intrinsics

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 07:17:08 PST 2016


tstellarAMD added a comment.

In http://reviews.llvm.org/D16658#338011, @arsenm wrote:

> In http://reviews.llvm.org/D16658#338002, @tstellarAMD wrote:
>
> > Why do we need intrinsics for these?
>
>
> For the integer ones, we should always be able to get away with the pattern, even if it sort of big, something like 
>  max(min(x, y), min(max(x, y), z))
>
> For the fmed3 case, in case we ever care about signaling nans, we would have to be more conservative on the pattern. It would probably be better to try to implement the pattern for the integer ones and leave the FP one.


Didn't you you add the integer patterns in another patch?


http://reviews.llvm.org/D16658





More information about the llvm-commits mailing list