[Bug tree-optimization/68027] conditional statement and unnecessary register assignment

2015-10-20 Thread SztfG at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68027

--- Comment #4 from SztfG at yandex dot ru ---
I think this can be optimized in this way:

cmpl$100, %edi
jg  a1
jne a2
jmp a3

without any label jumps


[Bug tree-optimization/68027] conditional statement and unnecessary register assignment

2015-10-20 Thread SztfG at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68027

--- Comment #3 from SztfG at yandex dot ru ---
btw why nobody confirm my old reported bug about stack-allocated array missed
optimization https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66152 ?


[Bug tree-optimization/68027] conditional statement and unnecessary register assignment

2015-10-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68027

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-10-20
  Component|middle-end  |tree-optimization
Version|unknown |5.2.0
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Confirmed.  It's VRP doing this constant propagation and uncprop not undoing
it.
When we do not need to spill 'a' then re-using 'a' would be better but the
optimization is supposed to catch the more frequent case where we'd have to
spill 'a'.