projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a843b8d
)
Don't select binary instructions with illegal types.
author
Dan Gohman
<gohman@apple.com>
Tue, 26 Aug 2008 20:52:40 +0000
(20:52 +0000)
committer
Dan Gohman
<gohman@apple.com>
Tue, 26 Aug 2008 20:52:40 +0000
(20:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55383
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/FastISel.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/FastISel.cpp
b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 8188928353208b00bd5b65dcf2a0ca08517497cb..965fc0228689cca86d4025bb4e1dab07b8240cf3 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/
lib/CodeGen/SelectionDAG/FastISel.cpp
@@
-30,6
+30,12
@@
bool FastISel::SelectBinaryOp(Instruction *I, ISD::NodeType ISDOpcode,
if (VT == MVT::Other || !VT.isSimple())
// Unhandled type. Halt "fast" selection and bail.
return false;
+ // We only handle legal types. For example, on x86-32 the instruction
+ // selector contains all of the 64-bit instructions from x86-64,
+ // under the assumption that i64 won't be used if the target doesn't
+ // support it.
+ if (!TLI.isTypeLegal(VT))
+ return false;
unsigned Op0 = ValueMap[I->getOperand(0)];
if (Op0 == 0)