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

[Bug middle-end/40141] [4.3 Regression] accessing aliased __m128 miscompiles



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-14 11:04 -------
Confirmed.  That's the SMTs do not include ref-all stuff bug so DCE removes
the initialization.

extern void abort (void);
typedef int __m128 __attribute__((vector_size(16), may_alias));
typedef float floatA __attribute__((may_alias));

int main()
{
  __m128 x = { 0, 0, 0, 0 };
  int i;
  for (i = 0; i < 4; ++i) {
      const float xx = ((floatA*)&x)[i];
      if (xx != 0.f)
        abort ();
  }
  return 0;
}

works without may_alias on __m128 for a strange reason.

I'll find the patch that fixed this.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
          Component|c                           |middle-end
     Ever Confirmed|0                           |1
           Keywords|                            |alias, wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2009-05-14 11:04:20
               date|                            |
            Summary|accessing aliased __m128    |[4.3 Regression] accessing
                   |miscompiles                 |aliased __m128 miscompiles
   Target Milestone|---                         |4.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40141


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