[Bug tree-optimization/15826] don't use "if" to extract a single bit bit-field.

wschmidt at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 1 14:29:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15826

--- Comment #15 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
My preference is to see the test properly resolved. :)  I don't think you
should just XFAIL the powerpc64le case without understanding why it fails, as
that tends to leave the XFAIL in place forever.

Here is pr15826.c.211t.optimized on powerpc64le with -O2.  Hopefully that will
help you see what's going on.  Please let me know if there is other data I can
gather that will be useful.  Thanks!

Bill

;; Function foo (foo, funcdef_no=0, decl_uid=2355, cgraph_uid=0,
symbol_order=0)

foo (struct s * p)
{
  unsigned int _4;
  unsigned int _5;
  unsigned int _7;

  <bb 2>:
  _4 = BIT_FIELD_REF <*p_3(D), 32, 0>;
  _5 = _4 & 1;
  _7 = _5;
  return _7;

}



;; Function bar (bar, funcdef_no=1, decl_uid=2358, cgraph_uid=1,
symbol_order=1)

bar (struct s * p)
{
  <unnamed-unsigned:1> _3;
  unsigned int _4;

  <bb 2>:
  _3 = p_2(D)->bit;
  _4 = (unsigned int) _3;
  return _4;

}



;; Function andrew (andrew, funcdef_no=2, decl_uid=2361, cgraph_uid=2,
symbol_order=2)

andrew (struct s * p)
{
  unsigned int _4;
  unsigned int _5;
  unsigned int _6;

  <bb 2>:
  _4 = BIT_FIELD_REF <*p_3(D), 32, 0>;
  _5 = _4 & 1;
  _6 = _5;
  return _6;

}


More information about the Gcc-bugs mailing list