[PATCH (3/7)] Widening multiply-and-accumulate pattern matching
Stubbs, Andrew
Andrew_Stubbs@mentor.com
Fri Jul 1 15:10:00 GMT 2011
On 01/07/11 14:30, Stubbs, Andrew wrote:
>> Got it now! Casts from signed to unsigned are not value-preserving, but
>> > they are "bit-preserving": s32->s64 obviously is, and s32->u64 has the
>> > same result bit-by-bit as the s64 result. The fact that s64 has an
>> > implicit 1111... in front, while an u64 has an implicit 0000... does not
>> > matter.
> But, the 1111... and 0000... are not implicit. They are very real, and
> if applied incorrectly will change the result, I think.
Wait, I'm clearly confused ....
When I try a s32->u64 conversion, the expand pass generates a
sign_extend insn.
Clearly it's the source type that determines the extension type, not the
destination type ... and I'm a dunce!
Thanks :)
Andrew
More information about the Gcc-patches
mailing list