Revision 1ff8c541 tcg/optimize.c

b/tcg/optimize.c
378 378
        op = gen_opc_buf[op_index];
379 379
        def = &tcg_op_defs[op];
380 380
        /* Do copy propagation */
381
        if (!(def->flags & (TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS))) {
382
            assert(op != INDEX_op_call);
381
        if (op == INDEX_op_call) {
382
            int nb_oargs = args[0] >> 16;
383
            int nb_iargs = args[0] & 0xffff;
384
            for (i = nb_oargs + 1; i < nb_oargs + nb_iargs + 1; i++) {
385
                if (temps[args[i]].state == TCG_TEMP_COPY) {
386
                    args[i] = find_better_copy(s, args[i]);
387
                }
388
            }
389
        } else {
383 390
            for (i = def->nb_oargs; i < def->nb_oargs + def->nb_iargs; i++) {
384 391
                if (temps[args[i]].state == TCG_TEMP_COPY) {
385 392
                    args[i] = find_better_copy(s, args[i]);

Also available in: Unified diff