https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77499
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
Component|rtl-optimization |middle-end
Target|arm-none-eabi |arm-none-eabi aarch64
--- Comment #28 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For aarch64, the problem is expansion:
(insn 31 30 32 5 (set (reg:SI 123)
(const_int -20191 [0xffffffffffffb121])) "/app/example.cpp":10:5 -1
(nil))
(insn 32 31 33 5 (set (reg:SI 122)
(xor:SI (reg/v:SI 103 [ x ])
(reg:SI 123))) "/app/example.cpp":10:5 -1
(nil))
(insn 33 32 34 5 (set (reg/v:SI 103 [ x ])
(zero_extend:SI (subreg:HI (reg:SI 122) 0))) "/app/example.cpp":10:5 -1
(nil))
It is also kinda of strange for arm too:
(insn 30 29 31 5 (set (reg:SI 114)
(const_int 45345 [0xb121])) "/app/example.cpp":10:5 -1
(nil))
(insn 31 30 32 5 (set (reg:HI 113)
(subreg:HI (reg:SI 114) 0)) "/app/example.cpp":10:5 -1
(expr_list:REG_EQUAL (const_int -20191 [0xffffffffffffb121])
(nil)))
(insn 32 31 33 5 (set (reg:SI 115)
(xor:SI (reg/v:SI 96 [ x ])
(subreg:SI (reg:HI 113) 0))) "/app/example.cpp":10:5 -1
(nil))
(insn 33 32 34 5 (set (reg/v:SI 96 [ x ])
(zero_extend:SI (subreg:HI (reg:SI 115) 0))) "/app/example.cpp":10:5 -1
(nil))
I wonder if we could do better at the expansion for the xor and that would get
the right thing.