summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-10-03 20:58:04 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-10-03 20:58:04 +0000
commitb15b97ef9ad80ae57dbd22414ef677888dd4e430 (patch)
tree3746d73c43c7c1faa8684f6d81141811a0bbe6c9 /clang/lib/CodeGen
parentf543a75be1f4c6d01445b90d37dd4e4185872df5 (diff)
downloadbcm5719-llvm-b15b97ef9ad80ae57dbd22414ef677888dd4e430.tar.gz
bcm5719-llvm-b15b97ef9ad80ae57dbd22414ef677888dd4e430.zip
Always initialize FPContractable.
false is used as a baseline here, we may want to allow contraction in some of the cases. Found by valgrind. llvm-svn: 165156
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 6d25642d02b..0d68ff5a69c 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -1261,6 +1261,7 @@ EmitAddConsiderOverflowBehavior(const UnaryOperator *E,
BinOp.RHS = NextVal;
BinOp.Ty = E->getType();
BinOp.Opcode = BO_Add;
+ BinOp.FPContractable = false;
BinOp.E = E;
return EmitOverflowCheckedBinOp(BinOp);
}
@@ -1446,6 +1447,7 @@ Value *ScalarExprEmitter::VisitUnaryMinus(const UnaryOperator *E) {
BinOp.LHS = llvm::Constant::getNullValue(BinOp.RHS->getType());
BinOp.Ty = E->getType();
BinOp.Opcode = BO_Sub;
+ BinOp.FPContractable = false;
BinOp.E = E;
return EmitSub(BinOp);
}
@@ -1681,6 +1683,7 @@ LValue ScalarExprEmitter::EmitCompoundAssignLValue(
OpInfo.RHS = Visit(E->getRHS());
OpInfo.Ty = E->getComputationResultType();
OpInfo.Opcode = E->getOpcode();
+ OpInfo.FPContractable = false;
OpInfo.E = E;
// Load/convert the LHS.
LValue LHSLV = EmitCheckedLValue(E->getLHS(), CodeGenFunction::TCK_Store);
OpenPOWER on IntegriCloud