summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-09-09 20:47:17 +0000
committerOwen Anderson <resistor@mac.com>2008-09-09 20:47:17 +0000
commit4a58bd331b419bb0221d52698c5983a4470f58cf (patch)
treeb6ba91ec94500c11c87f0a0e2680f1e012766851
parented3bb7888dc59a429d0c72a0e15cc15f854d16e7 (diff)
downloadbcm5719-llvm-4a58bd331b419bb0221d52698c5983a4470f58cf.tar.gz
bcm5719-llvm-4a58bd331b419bb0221d52698c5983a4470f58cf.zip
Clean this up, based on Evan's suggestions.
llvm-svn: 56009
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index d73bce74e6b..912dc322ff2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -33,14 +33,14 @@ unsigned FastISel::getRegForValue(Value *V) {
return Reg;
MVT::SimpleValueType VT = TLI.getValueType(V->getType()).getSimpleVT();
+ if (!TLI.isTypeLegal(VT))
+ return 0;
if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
if (CI->getValue().getActiveBits() > 64)
return TargetMaterializeConstant(CI,
MBB->getParent()->getConstantPool());
// Don't cache constant materializations. To do so would require
// tracking what uses they dominate.
- if (!TLI.isTypeLegal(VT))
- return false;
Reg = FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue());
} else if (isa<GlobalValue>(V)) {
return TargetMaterializeConstant(dyn_cast<Constant>(V),
OpenPOWER on IntegriCloud