diff options
author | Owen Anderson <resistor@mac.com> | 2008-09-09 20:47:17 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-09-09 20:47:17 +0000 |
commit | 4a58bd331b419bb0221d52698c5983a4470f58cf (patch) | |
tree | b6ba91ec94500c11c87f0a0e2680f1e012766851 | |
parent | ed3bb7888dc59a429d0c72a0e15cc15f854d16e7 (diff) | |
download | bcm5719-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.cpp | 4 |
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), |