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 tree-optimization/16611] Terrible code generated for vector<bool>


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-17 22:49 -------
Lets look into the tree dump (which by the way looks like crap):
  __x = (struct _Bit_iterator *)v;
  __y = __x-><D10960>._M_offset;
  this = (struct _Bit_iterator_base *)&<D12708>;  <--- the address is not propagated so SRA is not 
working
  this->_M_p = __x-><D10960>._M_p;  <--- here
  this->_M_offset = __y; <--- her
  SR.334 = <D12708>.<D11089>._M_p;
  __tmp.<D11089>._M_offset = <D12708>.<D11089>._M_offset;
  __tmp.<D11089>._M_p = SR.334;
  this = (struct _Bit_iterator_base *)&__tmp; <--- here
  __n = (ptrdiff_t)(this->_M_offset + (unsigned int)(ptrdiff_t)x);
  this->_M_p = this->_M_p + (_Bit_type *)((unsigned int)(__n / 32) * 4);
  __n.345 = __n % 32;
  if (__n.345 < 0) goto <L1>; else goto <L2>;

<L1>:;
  this->_M_offset = (unsigned int)(__n.345 + 32); // <-- here
  this->_M_p = this->_M_p - 4B; // <-- here
  goto <bb 3> (<L3>);

<L2>:;
  this->_M_offset = (unsigned int)__n.345; // <-- here

<L3>:;
  return (int)(bool)(int)(bool)(int)(bool)((1 << (int)__tmp.<D11089>._M_offset & *__tmp.<D11089>.
_M_p) != 0); // <-- here

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|libstdc++                   |tree-optimization
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-17 22:49:01
               date|                            |


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


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