[PATCH] D44521: [InstSimplify] fp_binop X, NaN --> NaN

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 08:42:13 PDT 2018


spatel created this revision.
spatel added reviewers: majnemer, arsenm, efriedma, lattner.
Herald added subscribers: tpr, nhaehnle, wdng, mcrosier.

Building on the recent clarification of FP in IR and identical to current undef operand folding, fold any FP binop with a NaN operand to NaN.

I don't know what to do with the AMDGPU tests that expected to use a NaN FP constant as an int value.


https://reviews.llvm.org/D44521

Files:
  lib/Analysis/InstructionSimplify.cpp
  test/CodeGen/AMDGPU/imm.ll
  test/CodeGen/AMDGPU/imm16.ll
  test/CodeGen/AMDGPU/immv216.ll
  test/CodeGen/AMDGPU/jump-address.ll
  test/Transforms/InstSimplify/fp-nan.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44521.138564.patch
Type: text/x-patch
Size: 16798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180315/d4dcefad/attachment.bin>


More information about the llvm-commits mailing list