[all-commits] [llvm/llvm-project] d79919: [ConstantFold] fold fsub -0.0, undef to undef rath...
RotateRight via All-commits
all-commits at lists.llvm.org
Fri Feb 21 05:13:03 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d799190851fdd94800428ba335f864ce5fd8135b
https://github.com/llvm/llvm-project/commit/d799190851fdd94800428ba335f864ce5fd8135b
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-02-21 (Fri, 21 Feb 2020)
Changed paths:
M llvm/lib/IR/ConstantFold.cpp
M llvm/test/Analysis/ConstantFolding/fp-undef.ll
Log Message:
-----------
[ConstantFold] 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, but this is an IR
change first because we already have fairly thorough tests in place
here.
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).
Differential Revision: https://reviews.llvm.org/D74713
More information about the All-commits
mailing list