public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/10050] ifcvt is not smart enough
       [not found] <bug-10050-4@http.gcc.gnu.org/bugzilla/>
@ 2012-02-07 21:05 ` pinskia at gcc dot gnu.org
  2023-05-26  1:01 ` [Bug middle-end/10050] " pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-07 21:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-07 21:05:24 UTC ---
Note this optimized I think is invalid with the C11/C++11 memory model.


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

* [Bug middle-end/10050] ifcvt is not smart enough
       [not found] <bug-10050-4@http.gcc.gnu.org/bugzilla/>
  2012-02-07 21:05 ` [Bug rtl-optimization/10050] ifcvt is not smart enough pinskia at gcc dot gnu.org
@ 2023-05-26  1:01 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-26  1:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |middle-end

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note for func2 we get:

  if (flag.0_2 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870912]:
  pretmp_18 = *a_10(D);
  pretmp_20 = MEM[(int *)a_10(D) + 4B];
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 536870913]:
  *a_10(D) = _9;
  MEM[(int *)a_10(D) + 4B] = _1;

  <bb 5> [local count: 1073741824]:
  # prephitmp_19 = PHI <pretmp_18(3), _9(4)>
  # prephitmp_21 = PHI <pretmp_20(3), _1(4)>

the conditional stores are correct if not supplying -fallow-store-data-races . 
Now GCC does not optimize this even with -fallow-store-data-races but maybe it
could.

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

end of thread, other threads:[~2023-05-26  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10050-4@http.gcc.gnu.org/bugzilla/>
2012-02-07 21:05 ` [Bug rtl-optimization/10050] ifcvt is not smart enough pinskia at gcc dot gnu.org
2023-05-26  1:01 ` [Bug middle-end/10050] " pinskia at gcc dot gnu.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).