forked from OSchip/llvm-project
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
This commit is contained in:
parent
48085b86ae
commit
032a5d2690
|
@ -747,8 +747,8 @@ bool DAGTypeLegalizer::ExpandOperand(SDNode *N, unsigned OpNo) {
|
||||||
DEBUG(cerr << "Expand node operand: "; N->dump(&DAG); cerr << "\n");
|
DEBUG(cerr << "Expand node operand: "; N->dump(&DAG); cerr << "\n");
|
||||||
SDOperand Res(0, 0);
|
SDOperand Res(0, 0);
|
||||||
|
|
||||||
if (TLI.getOperationAction(N->getOpcode(), N->getValueType(0)) ==
|
if (TLI.getOperationAction(N->getOpcode(), N->getOperand(OpNo).getValueType())
|
||||||
TargetLowering::Custom)
|
== TargetLowering::Custom)
|
||||||
Res = TLI.LowerOperation(SDOperand(N, 0), DAG);
|
Res = TLI.LowerOperation(SDOperand(N, 0), DAG);
|
||||||
|
|
||||||
if (Res.Val == 0) {
|
if (Res.Val == 0) {
|
||||||
|
|
Loading…
Reference in New Issue