[all-commits] [llvm/llvm-project] a253a2: [SDAG] fold fsub -0.0, undef to undef rather than NaN

RotateRight via All-commits all-commits at lists.llvm.org
Sun Feb 23 08:37:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a253a2a793cda34d1f6421ee9b7ca76a03fdfc59
      https://github.com/llvm/llvm-project/commit/a253a2a793cda34d1f6421ee9b7ca76a03fdfc59
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-02-23 (Sun, 23 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/X86/vec_fneg.ll

  Log Message:
  -----------
  [SDAG] fold fsub -0.0, undef to undef rather than NaN

A question about this behavior came up on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-February/139003.html
...and as part of backend improvements in D73978.

We decided not to implement a more general change that would have
folded any FP binop with nearly arbitrary constant + undef operand
to undef because that is not theoretically correct (even if it is
practically correct).

This is the SDAG-equivalent to the IR change in D74713.




More information about the All-commits mailing list