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 rtl-optimization/77499] [7 Regression] Regression after code-hoisting, due to combine pass failing to evaluate known value range


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

--- Comment #7 from avieira at gcc dot gnu.org ---
if-convert is a no go here, for the reason Andrew pointed out, sorry missed
that comment!

So I dont know... Only thing I can think of is better "value-range"-like
analysis for combine, but that might be too costly?

The fact is that for the code-hoisting to work here, the pseudo for r112 has to
be shared among both code-paths, so unless you add an extra move:

BB0:
r112:SI = r0:SI

BB 1:
...
r116:SI=r112:SI 0>>0x1
rNEW:SI=zero_extend(r116:SI#0)
...
if CC goto BB2 else BB Extra
BB 2:
r127:SI=rNEW:SI^r129:SI
r112:SI=zero_extend(r127:SI#0)
if LOOP: goto BB1 else BB exit
BB EXTRA:
r112:SI=rNEW:SI
if LOOP: goto BB1 else BB exit

And you end up with an extra move rather than a zero_extend. But maybe the move
can be optimized away in later stages? Or maybe put in the same conditional
execution block as the XOR...

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