diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 33f4591b66..d73bce74e6 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -39,6 +39,8 @@ unsigned FastISel::getRegForValue(Value *V) { 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), |