diff options
| author | Owen Anderson <resistor@mac.com> | 2008-09-09 06:32:02 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-09-09 06:32:02 +0000 |
| commit | 8529085f4f3187d61b2b0cb38c721816ade5da61 (patch) | |
| tree | 3f6d41014a90332e21931f9bac57ba735f6e428c /llvm/lib | |
| parent | 7aedcf151c0bf869862c6dc40a4d7caae2835313 (diff) | |
| download | bcm5719-llvm-8529085f4f3187d61b2b0cb38c721816ade5da61.tar.gz bcm5719-llvm-8529085f4f3187d61b2b0cb38c721816ade5da61.zip | |
Check for type legality before materializing integer constants in fast isel. With this change,
all of MultiSource/Applications passes on Darwin/X86 under FastISel.
llvm-svn: 55982
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 33f4591b66a..d73bce74e6b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/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), |

