On 10/24/2016 01:28 AM, Richard Biener wrote:
[ big snip ]
If so, then I wouldn't bother. I only mention it because I've found
that model is sometimes easier on the implementation side. I don't
consider it a big deal.
+ /* Update all statements in stmts.
+ if stmt is lhs = op1 TRUNC_DIV_EXPR op2, change to lhs =
+ if stmt is lhs = op1 TRUNC_MOD_EXPR op2, change to lhs =
I'd just emit a copy from RES to the appropriate lhs operand just after
divmod and delete the now unnecessary TRUNC_DIV_EXPR and TRUNC_MOD_EXPR
That sounds like a good idea.
Um sorry, not sure if I understood this part.
t1 = x / y;
t2 = x % y;
do we want to transform it to:
complex_tmp = DIVMOD (x, y);
div_tmp = REALPART_EXPR<complex_tmp>
mod_tmp = IMAGPART_EXPR<complex_tmp>
complex_tmp = DIVMOD (x, y)
t1 = REALPART_EXPR (complex_tmp)
t2 = IMAGPART_EXPR (compex_tmp)
Then remove the
t1 = x/y
t2 = x%y
OTOH implementation-wise that's more complicated.