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] more simplify_subreg SIMD bugs


I don't think I know what's going on here. What's the test case?

Testcase attached. powerpc-eabispe.


The skinny of the problem is:

(insn 37 34 38 0x0 (set (reg:V2SF 141)
        (subreg:V2SF (reg/v:V2SI 134 [ a ]) 0)) -1 (nil)

CSE tries to substitute the original constant vector into insn 37 ala:

(insn 37 blah (set (reg:V2SF 141)
	(subreg:V2SF (const_vector:V2SI [
        		    (const_int 0 [0x0])
        			(const_int 2147483647 [0x7fffffff])

...and if you see the logic in simplify_subreg(), you'll see insn 37 eventually being turned into:

(insn 37 7 38 0 0x1230dc0 (set (reg:V2SF 141 [ a ])
        (const_vector:V2SF [
                (const_double:SF 0.0 [0x0.0p+0])
                (const_double:SF 0.0 [0x0.0p+0])
            ])) 983 {*movv2sf_internal} (nil)

...because we drop down to...

  /* Attempt to simplify constant to non-SUBREG expression.  */
  if (CONSTANT_P (op))

...where poop rolls down hill.

I hope this makes the patch obviously OK ;-).
Aldy


Attachment: f.c
Description: Text document


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