[PATCH] D16658: AMDGPU: Add med3 intrinsics
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 18:59:34 PST 2016
arsenm added a comment.
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.
More information about the llvm-commits