[llvm-commits] [llvm] r55982 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Owen Anderson
resistor at mac.com
Mon Sep 8 23:32:02 PDT 2008
Author: resistor
Date: Tue Sep 9 01:32:02 2008
New Revision: 55982
URL: http://llvm.org/viewvc/llvm-project?rev=55982&view=rev
Log:
Check for type legality before materializing integer constants in fast isel. With this change,
all of MultiSource/Applications passes on Darwin/X86 under FastISel.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55982&r1=55981&r2=55982&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Sep 9 01:32:02 2008
@@ -39,6 +39,8 @@
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),
More information about the llvm-commits
mailing list