public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/15197] New: [tree-ssa] no SRA of structs containing complex types
@ 2004-04-29  4:54 pinskia at gcc dot gnu dot org
  2004-04-29  6:11 ` [Bug optimization/15197] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-29  4:54 UTC (permalink / raw)
  To: gcc-bugs

An example which I came up when looking at PR 2692:
(Note that more opportunities for this comes up after my casting pass is installed)

struct dcomplex
{
  dcomplex(double  =0.0, double =0.0);
  dcomplex& operator*=(const dcomplex&);
  typedef __complex__ double _ComplexT;
  _ComplexT _M_value;
  dcomplex(_ComplexT __z) : _M_value(__z) { }
};
inline dcomplex
operator*(const dcomplex& __x, const dcomplex& __y)
{ return dcomplex (__x) *= __y; }
inline
dcomplex::dcomplex(double __r, double __i)
{
  __real__ _M_value = __r;
  __imag__ _M_value = __i;
}
  inline dcomplex&
  dcomplex::operator*=(const dcomplex& __z)
  {
    _ComplexT __t;
    __real__ __t = __real__ __z._M_value;
    __imag__ __t = __imag__ __z._M_value;
    _M_value *= __t;
    return *this;
  }
typedef dcomplex Complex8;
Complex8 m;
Complex8 g;
void determinant()
{
  Complex8 _m = m;
  Complex8 t = _m * _m;
  g = t;
}

-- 
           Summary: [tree-ssa] no SRA of structs containing complex types
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug optimization/15197] [tree-ssa] no SRA of structs containing complex types
  2004-04-29  4:54 [Bug optimization/15197] New: [tree-ssa] no SRA of structs containing complex types pinskia at gcc dot gnu dot org
@ 2004-04-29  6:11 ` pinskia at gcc dot gnu dot org
  2004-05-06  4:30 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-29  6:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |tree-ssa


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug optimization/15197] [tree-ssa] no SRA of structs containing complex types
  2004-04-29  4:54 [Bug optimization/15197] New: [tree-ssa] no SRA of structs containing complex types pinskia at gcc dot gnu dot org
  2004-04-29  6:11 ` [Bug optimization/15197] " pinskia at gcc dot gnu dot org
@ 2004-05-06  4:30 ` pinskia at gcc dot gnu dot org
  2004-05-27  5:23 ` [Bug tree-optimization/15197] " pinskia at gcc dot gnu dot org
  2004-07-09  7:36 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-06  4:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-06 04:29 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-06 04:30:00
               date|                            |


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/15197] [tree-ssa] no SRA of structs containing complex types
  2004-04-29  4:54 [Bug optimization/15197] New: [tree-ssa] no SRA of structs containing complex types pinskia at gcc dot gnu dot org
  2004-04-29  6:11 ` [Bug optimization/15197] " pinskia at gcc dot gnu dot org
  2004-05-06  4:30 ` pinskia at gcc dot gnu dot org
@ 2004-05-27  5:23 ` pinskia at gcc dot gnu dot org
  2004-07-09  7:36 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-27  5:23 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/15197] [tree-ssa] no SRA of structs containing complex types
  2004-04-29  4:54 [Bug optimization/15197] New: [tree-ssa] no SRA of structs containing complex types pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-05-27  5:23 ` [Bug tree-optimization/15197] " pinskia at gcc dot gnu dot org
@ 2004-07-09  7:36 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-09  7:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-09 07:36 -------
Fixed by RTH's rewrite to SRA.
  _m$_M_value$imag = IMAGPART_EXPR <m._M_value>;
  _m$_M_value$real = REALPART_EXPR <m._M_value>;
  IMAGPART_EXPR <g._M_value> = _m$_M_value$imag * _m$_M_value$real * 2.0e+0;
  REALPART_EXPR <g._M_value> = _m$_M_value$real * _m$_M_value$real - _m$_M_value$imag * _m$
_M_value$imag;
  return;

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.5.0


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-09  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29  4:54 [Bug optimization/15197] New: [tree-ssa] no SRA of structs containing complex types pinskia at gcc dot gnu dot org
2004-04-29  6:11 ` [Bug optimization/15197] " pinskia at gcc dot gnu dot org
2004-05-06  4:30 ` pinskia at gcc dot gnu dot org
2004-05-27  5:23 ` [Bug tree-optimization/15197] " pinskia at gcc dot gnu dot org
2004-07-09  7:36 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).