summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-29 19:29:08 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-29 19:29:08 +0000
commit032a5d2690af895812345b54e734df333bfc942e (patch)
treedd68801b30f3fc79bf5f631804efe98d27fff396 /llvm/lib/CodeGen
parent48085b86aec1572010f640df92a8050ded2117a0 (diff)
downloadbcm5719-llvm-032a5d2690af895812345b54e734df333bfc942e.tar.gz
bcm5719-llvm-032a5d2690af895812345b54e734df333bfc942e.zip
When expanding an operand, it's not the result value
type that matters but the operand type. This fixes 2008-01-08-IllegalCMP.ll which crashed with the new legalize infrastructure because SETCC with result type i8 and operand type i64 was being custom expanded by the X86 backend. With this fix, the gcc build gets as far as the first libcall. llvm-svn: 46525
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp
index ec8d6faf484..282137273d9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp
@@ -747,8 +747,8 @@ bool DAGTypeLegalizer::ExpandOperand(SDNode *N, unsigned OpNo) {
DEBUG(cerr << "Expand node operand: "; N->dump(&DAG); cerr << "\n");
SDOperand Res(0, 0);
- if (TLI.getOperationAction(N->getOpcode(), N->getValueType(0)) ==
- TargetLowering::Custom)
+ if (TLI.getOperationAction(N->getOpcode(), N->getOperand(OpNo).getValueType())
+ == TargetLowering::Custom)
Res = TLI.LowerOperation(SDOperand(N, 0), DAG);
if (Res.Val == 0) {
OpenPOWER on IntegriCloud