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/42382] _Bool foo &= bar; vs _Bool foo = foo && bar; vs _Bool foo = foo & bar; emitted code different


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-27 20:40:47 UTC ---
Fixed in 4.7.0:

<bb 2>:
  D.2697_1 = rand ();
  foo_2 = D.2697_1 != 0;
  D.2698_3 = rand ();
  bar_4 = D.2698_3 != 0;
  D.2711_30 = bar_4 & foo_2;
  D.2700_9 = (int) bar_4;
  D.2699_10 = (int) D.2711_30;
  printf ("%u %u\n", D.2699_10, D.2700_9);
  D.2702_11 = rand ();
  foo_12 = D.2702_11 != 0;
  D.2703_13 = rand ();
  bar_14 = D.2703_13 != 0;
  D.2712_7 = bar_14 & foo_12;
  D.2700_19 = (int) bar_14;
  D.2699_20 = (int) D.2712_7;
  printf ("%u %u\n", D.2699_20, D.2700_19);
  D.2704_21 = rand ();
  foo_22 = D.2704_21 != 0;
  D.2705_23 = rand ();
  bar_24 = D.2705_23 != 0;
  D.2706_25 = bar_24 & foo_22;
  D.2700_28 = (int) bar_24;
  D.2699_29 = (int) D.2706_25;
  printf ("%u %u\n", D.2699_29, D.2700_28);


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