This is the mail archive of the gcc@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]

PR 12828


ppc has some patterns that look like this:

(insn 67 66 68 0x0 (parallel [
            (set (reg:DF 129)  (float:DF (reg:SI 128)))
             ......
            (clobber (mem:DF (plus:SI (reg/f:SI 114 virtual-stack-vars)
                        (const_int 262144 [0x40000])) [0 S8 A8]))
            ......

where the stack temp it needs is recorded only inside the clobber
(the splitter creates insns from it later).
This particular one has a large offset due to large stack arrays elsewhere.
That offset is too big to fit in the immediate field, so
instantiate_virtual_regs() changes this to


(insn 228 66 67 6 0x0 (set (reg:SI 194)
        (const_int 262176 [0x40020])) -1 (nil)
    (nil))

(insn 67 228 68 6 0x40586630 (parallel [
            (set (reg:DF 129)  (float:DF (reg:SI 128)))
            ......
            (clobber (mem:DF (plus:SI (reg/f:SI 30 r30)
                        (reg:SI 194)) [0 S8 A8]))
           ........

This confuses the loop optimizer: when pulling the set of R129 out of a loop,
it does not know there's a dependency on R194. It looks like there ought to
be a USE of R194 inside the parallel, but I see no reason that instantiate_virtual_regs
can assume such a pattern exists (it doesn't now). I could change the loop
optimizer to look inside CLOBBER(MEM, but I'm concerned that similar problems
could exist elsewhere. What's the right approach here?



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