Displaying 3 results from an estimated 3 matches for "unsignedval".
2008 Feb 09
4
[LLVMdev] tblgen and sign-extended constants too large for type
...range for type '" +
- getEnumName(getTypeNum(0)) + "'!");
+ 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)) + "'!");
+ }
+ }
2008 Feb 12
0
[LLVMdev] tblgen and sign-extended constants too large for type
...; +
> - getEnumName(getTypeNum(0)) + "'!");
> + 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)) + "'!"...
2008 Feb 12
0
[LLVMdev] tblgen and sign-extended constants too large for type
...; +
> - getEnumName(getTypeNum(0)) + "'!");
> + 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)) + "'!"...