mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Consider expression "0.0 - X" as the negation of X if
- this expression is explicitly marked no-signed-zero, or - no-signed-zero of this expression can be derived from some context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171922 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -211,7 +211,7 @@ public:
|
||||
private:
|
||||
bool ShouldChangeType(Type *From, Type *To) const;
|
||||
Value *dyn_castNegVal(Value *V) const;
|
||||
Value *dyn_castFNegVal(Value *V) const;
|
||||
Value *dyn_castFNegVal(Value *V, bool NoSignedZero=false) const;
|
||||
Type *FindElementAtOffset(Type *Ty, int64_t Offset,
|
||||
SmallVectorImpl<Value*> &NewIndices);
|
||||
Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
|
||||
|
@@ -516,8 +516,8 @@ Value *InstCombiner::dyn_castNegVal(Value *V) const {
|
||||
// instruction if the LHS is a constant negative zero (which is the 'negate'
|
||||
// form).
|
||||
//
|
||||
Value *InstCombiner::dyn_castFNegVal(Value *V) const {
|
||||
if (BinaryOperator::isFNeg(V))
|
||||
Value *InstCombiner::dyn_castFNegVal(Value *V, bool IgnoreZeroSign) const {
|
||||
if (BinaryOperator::isFNeg(V, IgnoreZeroSign))
|
||||
return BinaryOperator::getFNegArgument(V);
|
||||
|
||||
// Constants can be considered to be negated values if they can be folded.
|
||||
|
Reference in New Issue
Block a user