[PATCH] D48556: Fix asserts in AMDGCN fmed3 folding by handling more cases of NaN

Alan Baker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 12:04:06 PDT 2018


alan-baker created this revision.
alan-baker added reviewers: arsenm, tpr, dstuttard.
Herald added subscribers: llvm-commits, nhaehnle, wdng.

Better NaN handling for AMDGCN fmed3.

      

All operands are checked for NaN now. The checks were moved before the canonicalization to provide a better mapping from fclamp. Changed the behaviour of fmed3(x,y,NaN) to return max(x,y) instead of min(x,y) in light of this. Updated tests as a result and added some new cases to cover the fix.


Repository:
  rL LLVM

https://reviews.llvm.org/D48556

Files:
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48556.152742.patch
Type: text/x-patch
Size: 4071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180625/a5fa05f0/attachment.bin>


More information about the llvm-commits mailing list