[patch][simplify-rtx] Fix 16-bit -> 64-bit multiply and accumulate

Joseph S. Myers joseph@codesourcery.com
Wed May 25 12:34:00 GMT 2011


On Wed, 25 May 2011, Andrew Stubbs wrote:

> So, you're saying that promoting a regular multiply to a widening multiply
> isn't a valid transformation anyway? I suppose that does make sense. I knew

In general, yes.  RTL always has modulo semantics (except for division and 
remainder by -1); all optimizations based on undefinedness of overflow (in 
the absence of -fwrapv) happen at tree/GIMPLE level, where signed and 
unsigned types are still distinct.  (So you could promote a regular 
multiply of signed types at GIMPLE level in the absence of 
-fwrapv/-ftrapv, but not at RTL level and not for unsigned types at GIMPLE 
level.)

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list