mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
[InstSimplify] fsub nnan x, x -> 0.0 is valid without ninf
Both inf - inf and (-inf) - (-inf) are NaN, so it's already covered by nnan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -854,8 +854,8 @@ static Value *SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF,
|
||||
return X;
|
||||
}
|
||||
|
||||
// fsub nnan ninf x, x ==> 0.0
|
||||
if (FMF.noNaNs() && FMF.noInfs() && Op0 == Op1)
|
||||
// fsub nnan x, x ==> 0.0
|
||||
if (FMF.noNaNs() && Op0 == Op1)
|
||||
return Constant::getNullValue(Op0->getType());
|
||||
|
||||
return nullptr;
|
||||
|
Reference in New Issue
Block a user