[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-09-04 Thread patchapp at dberlin dot org


--- Comment #16 from patchapp at dberlin dot org  2006-09-05 01:09 ---
Subject: Bug number PR 26069

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00117.html


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-08-26 Thread pinskia at gcc dot gnu dot org


--- Comment #10 from pinskia at gcc dot gnu dot org  2006-08-26 06:41 
---
(In reply to comment #8)
 Richard, Roger's patch for VIEW_CONVERT_EXPR folding hit mainline now.
And VCE is documented as being undefined for types of different sizes.
maybe we can produce VIEW_CONVERT_EXPRchar[sizeof(type)], expr[0] but I don't
know if that solves the issue in the bug report.

I am going to look into producing the VCE as above for types which have the
same aliasing set or 0 and are either the same size or the outer one is a
factor of the larger one.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-08-26 Thread pinskia at gcc dot gnu dot org


--- Comment #11 from pinskia at gcc dot gnu dot org  2006-08-26 14:40 
---
A related testcase is:
int f(short a)
{
  unsigned short b = *(unsigned short*)a;
  return b;

}
 Which should be optimized into --
int f1(short a)
{
  unsigned short b = a;
  return b;
}


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-08-26 Thread pinskia at gcc dot gnu dot org


--- Comment #12 from pinskia at gcc dot gnu dot org  2006-08-26 16:41 
---
A fix for this runs into another bug which I am about to file.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-08-26 Thread pinskia at gcc dot gnu dot org


--- Comment #13 from pinskia at gcc dot gnu dot org  2006-08-26 16:51 
---
(In reply to comment #12)
 A fix for this runs into another bug which I am about to file.
I did not file it but did send an email about the problem:
http://gcc.gnu.org/ml/gcc/2006-08/msg00510.html


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-08-26 Thread pinskia at gcc dot gnu dot org


--- Comment #14 from pinskia at gcc dot gnu dot org  2006-08-26 23:04 
---
And I found a fix for that so trying to work on the orginal testcase again.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-08-26 Thread pinskia at gcc dot gnu dot org


--- Comment #15 from pinskia at gcc dot gnu dot org  2006-08-26 23:20 
---
(In reply to comment #14)
 And I found a fix for that so trying to work on the orginal testcase again.
Actually I am going to submit a patch for the problem in comment #11 and then I
will fix the rest of the bug report.  The memcpy issue should be filed
seperately as it is harder to fix than the orginal issue.


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-05-24 Thread mmitchel at gcc dot gnu dot org


--- Comment #9 from mmitchel at gcc dot gnu dot org  2006-05-25 02:33 
---
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.1.1   |4.1.2


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-04-18 Thread bonzini at gnu dot org


--- Comment #8 from bonzini at gnu dot org  2006-04-18 16:22 ---
Richard, Roger's patch for VIEW_CONVERT_EXPR folding hit mainline now.


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-02-23 Thread mmitchel at gcc dot gnu dot org


--- Comment #7 from mmitchel at gcc dot gnu dot org  2006-02-24 00:26 
---
This issue will not be resolved in GCC 4.1.0; retargeted at GCC 4.1.1.


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.0.3   |4.1.1


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-02-14 Thread mmitchel at gcc dot gnu dot org


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-02-06 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2006-02-06 10:34 ---
*** Bug 26116 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||gianni at mariani dot ws


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-02-06 Thread gianni at mariani dot ws


--- Comment #6 from gianni at mariani dot ws  2006-02-06 16:52 ---
Just another data point.

I tried both the original tell_endian() and the tell_endian_good() functions on
the MS Visual Studio 2003 compiler and both generated:

 ?tell_endian@@YADXZ:
   0:   b0 01   mov$0x1,%al
   2:   c3  ret


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-02-03 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2006-02-03 11:55 ---
While propagating easily works, we don't fold VIEW_CONVERT_EXPR at all.  I
remember a patch of Roger which did folding of vector constants or so, but
can't find it anymore.


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-02-02 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2006-02-02 14:56 ---
One may be able to teach forwprop about this optimization, i.e. turn

  x = 1;
  x.0_3 = (char *) x;
  D.1522_4 = *x.0_3;

into

  D.1522_4 = VIEW_CONVERT_EXPR char (x);

if that has the right semantics.  CCP fold may then be able to optimize it.


-- 


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



[Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] Runtime endian-ness check is no longer optimized out.

2006-02-01 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-02 05:19 ---
If you used GCC's extension of using an union as not violating aliasing rules,
it works there but does not with using the portable ways:
bool tell_endian() {
  unsigned x = 1;
  return *(char*)x;
}

bool tell_endian1()
{
  char a;
  int x = 1;
  __builtin_memcpy(a, x, 1);
  return a;
}
bool tell_endian_good()
{
  union{int i;char c;}a;
  a.i = 1;
  return a.c;
}
-

Only tell_endian_good produces good result.

This looks like the removal of addressof RTL caused this.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|major   |normal
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   GCC host triplet|linux-x86-elf   |
 GCC target triplet|linux-x86-elf   |
   Keywords||missed-optimization
   Last reconfirmed|-00-00 00:00:00 |2006-02-02 05:19:37
   date||
Summary|Runtime endian-ness check is|[4.0/4.1/4.2 Regression]
   |no longer optimized out.|Runtime endian-ness check is
   ||no longer optimized out.
   Target Milestone|--- |4.0.3


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