Fix gcc warnings of different enum and non-enum types in ternaries

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241567 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Denis Protivensky 2015-07-07 07:48:48 +00:00
parent a744879a65
commit 2b4a535b70
2 changed files with 9 additions and 9 deletions

View File

@ -261,7 +261,7 @@ void DecodeVPERM2X128Mask(MVT VT, unsigned Imm,
unsigned HalfMask = Imm >> (l * 4);
unsigned HalfBegin = (HalfMask & 0x3) * HalfSize;
for (unsigned i = HalfBegin, e = HalfBegin + HalfSize; i != e; ++i)
ShuffleMask.push_back(HalfMask & 8 ? SM_SentinelZero : i);
ShuffleMask.push_back(HalfMask & 8 ? SM_SentinelZero : (int)i);
}
}

View File

@ -21903,16 +21903,16 @@ matchIntegerMINMAX(SDValue Cond, EVT VT, SDValue LHS, SDValue RHS,
default: break;
case ISD::SETULT:
case ISD::SETULE:
Opc = hasUnsigned ? ISD::UMIN : 0u; break;
Opc = hasUnsigned ? ISD::UMIN : 0; break;
case ISD::SETUGT:
case ISD::SETUGE:
Opc = hasUnsigned ? ISD::UMAX : 0u; break;
Opc = hasUnsigned ? ISD::UMAX : 0; break;
case ISD::SETLT:
case ISD::SETLE:
Opc = hasSigned ? ISD::SMIN : 0u; break;
Opc = hasSigned ? ISD::SMIN : 0; break;
case ISD::SETGT:
case ISD::SETGE:
Opc = hasSigned ? ISD::SMAX : 0u; break;
Opc = hasSigned ? ISD::SMAX : 0; break;
}
// Check for x CC y ? y : x -- a min/max with reversed arms.
} else if (DAG.isEqualTo(LHS, Cond.getOperand(1)) &&
@ -21921,16 +21921,16 @@ matchIntegerMINMAX(SDValue Cond, EVT VT, SDValue LHS, SDValue RHS,
default: break;
case ISD::SETULT:
case ISD::SETULE:
Opc = hasUnsigned ? ISD::UMAX : 0u; break;
Opc = hasUnsigned ? ISD::UMAX : 0; break;
case ISD::SETUGT:
case ISD::SETUGE:
Opc = hasUnsigned ? ISD::UMIN : 0u; break;
Opc = hasUnsigned ? ISD::UMIN : 0; break;
case ISD::SETLT:
case ISD::SETLE:
Opc = hasSigned ? ISD::SMAX : 0u; break;
Opc = hasSigned ? ISD::SMAX : 0; break;
case ISD::SETGT:
case ISD::SETGE:
Opc = hasSigned ? ISD::SMIN : 0u; break;
Opc = hasSigned ? ISD::SMIN : 0; break;
}
}