[Bug rtl-optimization/82628] [8 Regression] wrong code at -Os on x86_64-linux-gnu in the 32-bit mode
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 20 13:14:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82628
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #3)
> Looks like combine failure to me:
>
> I don't think that combining:
>
> (set (reg:CC 17 flags)
> (compare:CC (subreg:SI (reg/v:DI 89 [ d ]) 0)
> (const_int 1 [0x1])))
>
> with
>
> (insn 20 19 21 4 (parallel [
> (set (reg:CCGZ 17 flags)
> (compare:CCGZ (reg:SI 94)
> (plus:SI (ltu:SI (reg:CC 17 flags)
> (const_int 0 [0]))
> (subreg:SI (reg/v:DI 89 [ d ]) 4))))
> (clobber (scratch:SI))
>
> should result in unconditional jump:
>
> (set (pc)
> (label_ref 16))
Please note two different subregs of the same register. Maybe somewhere combine
figures out that two different subregs of the same register are the same (which
are not - see the offsets!) and removes insn due to the invalid
"simplification".
Segher?
More information about the Gcc-bugs
mailing list