[Bug rtl-optimization/108826] Inefficient address generation on POWER
kishan at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 2 12:42:01 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108826
--- Comment #16 from Kishan Parmar <kishan at gcc dot gnu.org> ---
(In reply to Kishan Parmar from comment #11)
> 239 (set (reg:DI 130)
> 240 (plus:DI (and:DI (ashift:DI (lshiftrt:DI (subreg:DI (reg:SI 125 [
> var ]) 0)
> 241 (const_int 6 [0x6]))
> 242 (const_int 2 [0x2]))
> 243 (const_int 20 [0x14]))
> 244 (const_int 800 [0x320])))
>
After simplifying above expression to
> 239 (set (reg:DI 130)
> 240 (plus:DI (and:DI (lshiftrt:DI (subreg:DI (reg:SI 125 [ var ]) 0)
> 241 (const_int 4 [0x4]))
> 242 (const_int 20 [0x14]))
> 243 (const_int 800 [0x320])))
>
We can split above insn.
Basically,
9 : B = A >> 6
11: C = B & 5
13: D = C + 200
14: E = D << 2
Can be transformed to,
B = A >> 4
C = B & 20
D = C + 800
More information about the Gcc-bugs
mailing list