This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, tree-ssa] PR54295 Incorrect value extension in widening multiply-accumulate


On 17/08/12 15:47, Richard Earnshaw wrote:
If we don't have a 16x16->64 mult operation then after step 1 we'll
still have a MULT_EXPR, not a WIDEN_MULT_EXPR, so when we reach step2
there's nothing to short circuit.

Unless, of course, you're expecting us to get

step1 -> 16x16->32 widen mult
step2 -> widen64(step1) + acc64

No, given a u16xu16->u64 operation in the code, and that the arch doesn't have such an opcode, I'd expect to get


step1 -> (u32)u16 x (u32)u16 -> u64

Likewise, 8x8->32 might give (16)8x(16)8->32.

The code can't see that the widening operation is non-optimal without looking beyond into its inputs.

Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]