Hi,
I read code in lower-subreg.c and found GCC only split some of
multi-word mode instructions, like load from memory into pseudo reg,
etc. The related code is in find_decomposable_subregs.

So for below example from PR56102:

double g = 1.0;
double func(int a, double d)
{
    if (a > 0)
    return 0.0 + g;
    else
    return 2.0 + d;
}

compiling with:
./arm-none-eabi-gcc -mthumb -mcpu=cortex-m0 -Os test.c -S -o test.S

If split is done for all DFmode insns, it will save us code size by
sharing constant pool in program.

My questions are:
1. Why don't split other multi-word insns?
2. Is it possible to do it in subreg2 pass, or in backend?
I know little about lower-subreg.c, did I miss something important?

Thanks very much.

--
Best Regards.

Reply via email to