if (Size < 32) {
int Val = (II->getValue() << (32-Size)) >> (32-Size);
if (Val != II->getValue()) {
- // If sign-extended doesn't fit, does it fit as unsigned?
- unsigned ValueMask = unsigned(MVT::getIntVTBitMask(VT));
- unsigned UnsignedVal = unsigned(II->getValue());
-
- if ((ValueMask & UnsignedVal) != UnsignedVal) {
- TP.error("Integer value '" + itostr(II->getValue())+
- "' is out of range for type '" +
- getEnumName(getTypeNum(0)) + "'!");
- }
- }
- }
- }
+ // If sign-extended doesn't fit, does it fit as unsigned?
+ unsigned ValueMask = unsigned(MVT::getIntVTBitMask(VT));
+ unsigned UnsignedVal = unsigned(II->getValue());
+
+ if ((ValueMask & UnsignedVal) != UnsignedVal) {
+ TP.error("Integer value '" + itostr(II->getValue())+
+ "' is out of range for type '" +
+ getEnumName(getTypeNum(0)) + "'!");
+ }
+ }
+ }
+ }
}
return MadeChange;
std::string Val = VariableMap[VarName];
bool ModifiedVal = false;
if (Val.empty()) {
- cerr << "Variable '" << VarName << " referenced but not defined "
- << "and not caught earlier!\n";
- abort();
+ cerr << "Variable '" << VarName << " referenced but not defined "
+ << "and not caught earlier!\n";
+ abort();
}
if (Val[0] == 'T' && Val[1] == 'm' && Val[2] == 'p') {
// Already selected this operand, just return the tmpval.
} else if (InputHasChain && !NodeHasChain) {
// One of the inner node produces a chain.
if (NodeHasOutFlag)
- emitCode("ReplaceUses(SDOperand(N.Val, " + utostr(NumPatResults+1) +
- "), SDOperand(ResNode, N.ResNo-1));");
- emitCode("ReplaceUses(SDOperand(N.Val, " + utostr(NumPatResults) +
- "), " + ChainName + ");");
+ emitCode("ReplaceUses(SDOperand(N.Val, " + utostr(NumPatResults+1) +
+ "), SDOperand(ResNode, N.ResNo-1));");
+ emitCode("ReplaceUses(SDOperand(N.Val, " + utostr(NumPatResults) +
+ "), " + ChainName + ");");
}
emitCode("return ResNode;");