aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2012-01-17 01:54:07 +0000
committerPete Cooper <peter_cooper@apple.com>2012-01-17 01:54:07 +0000
commitf57e1c29dde4666ea4ec397dde72f991e5b9f854 (patch)
treefe5f8eaf7c7e4126d7b807997a0a6cf00ff78e35 /lib/CodeGen/SelectionDAG
parent1752e45de9914cb52d748c1052ecd2f1414bced4 (diff)
downloadexternal_llvm-f57e1c29dde4666ea4ec397dde72f991e5b9f854.zip
external_llvm-f57e1c29dde4666ea4ec397dde72f991e5b9f854.tar.gz
external_llvm-f57e1c29dde4666ea4ec397dde72f991e5b9f854.tar.bz2
Changed flag operand of ISD::FP_ROUND to TargetConstant as it should not get checked for legalisation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 6270e45..105c337 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -197,7 +197,7 @@ static SDValue getCopyFromParts(SelectionDAG &DAG, DebugLoc DL,
// FP_ROUND's are always exact here.
if (ValueVT.bitsLT(Val.getValueType()))
return DAG.getNode(ISD::FP_ROUND, DL, ValueVT, Val,
- DAG.getIntPtrConstant(1));
+ DAG.getTargetConstant(1, TLI.getPointerTy()));
return DAG.getNode(ISD::FP_EXTEND, DL, ValueVT, Val);
}
@@ -2691,7 +2691,8 @@ void SelectionDAGBuilder::visitFPTrunc(const User &I) {
SDValue N = getValue(I.getOperand(0));
EVT DestVT = TLI.getValueType(I.getType());
setValue(&I, DAG.getNode(ISD::FP_ROUND, getCurDebugLoc(),
- DestVT, N, DAG.getIntPtrConstant(0)));
+ DestVT, N,
+ DAG.getTargetConstant(0, TLI.getPointerTy())));
}
void SelectionDAGBuilder::visitFPExt(const User &I){