You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
double d;
short s;
char c;
d = c;
d = s;
c = d;
s = d;
The x86 backend fails to generate any of the 4 above expressions.
It also fails with "unsigned char" and "unsigned short" (but it works for int, unsigned int, long, unsigned long)
It also fails if "double" is replaced by "float"
All these expressions request the backend to implement templates such as:
I8TOF64, I16TOF64, F64TOI8, F64TOI16 which do not exist in current version.
For expressions converting char/short to double, it could be handy to do an implicit integer promotion and then rely to the existing I32TOF64 or U32TOF64 templates.
Same for "float" which could be promoted to double before being converted.
The text was updated successfully, but these errors were encountered:
This is a fair point. I have given this some thought, and requiring the backend to implement all combinations, might be practical. An idea would be to create extra patterns in the instruction selector to use existing conversions like you suggested. If a backend implements a direct conversion, this would take precedence when it has a lower cost.
double d;
short s;
char c;
d = c;
d = s;
c = d;
s = d;
The x86 backend fails to generate any of the 4 above expressions.
It also fails with "unsigned char" and "unsigned short" (but it works for int, unsigned int, long, unsigned long)
It also fails if "double" is replaced by "float"
All these expressions request the backend to implement templates such as:
I8TOF64, I16TOF64, F64TOI8, F64TOI16 which do not exist in current version.
For expressions converting char/short to double, it could be handy to do an implicit integer promotion and then rely to the existing I32TOF64 or U32TOF64 templates.
Same for "float" which could be promoted to double before being converted.
The text was updated successfully, but these errors were encountered: