aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-09-09 06:32:02 +0000
committerOwen Anderson <resistor@mac.com>2008-09-09 06:32:02 +0000
commitd09a49a5a03e9e8d4ed5b7b143cd0dd85a117d10 (patch)
tree06293318dc77b5c59ffb5fdde429e16af13bca33 /lib/CodeGen/SelectionDAG/FastISel.cpp
parent0646fff6a9f095348a5cd7cee9417305290435de (diff)
downloadexternal_llvm-d09a49a5a03e9e8d4ed5b7b143cd0dd85a117d10.zip
external_llvm-d09a49a5a03e9e8d4ed5b7b143cd0dd85a117d10.tar.gz
external_llvm-d09a49a5a03e9e8d4ed5b7b143cd0dd85a117d10.tar.bz2
Check for type legality before materializing integer constants in fast isel. With this change,
all of MultiSource/Applications passes on Darwin/X86 under FastISel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 33f4591..d73bce7 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),