https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125728
Mikael Pettersson <mikpelinux at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpelinux at gmail dot com
--- Comment #1 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Started with r16-160-ge6f89d78c1a752:
commit e6f89d78c1a7528e93458278e35d365544a18c26 (HEAD)
Author: Andrew Pinski <[email protected]>
Date: Wed Feb 5 14:44:25 2025 -0800
simplify-rtx: Simplify `(zero_extend (and x CST))` -> (and (subreg x) CST)
This adds the simplification of a ZERO_EXTEND of an AND. This optimization
was already handled in combine via combine_simplify_rtx and the handling
there of compound_operations (ZERO_EXTRACT).
Build and tested for aarch64-linux-gnu.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* simplify-rtx.cc (simplify_context::simplify_unary_operation_1)
<case ZERO_EXTEND>:
Add simplifcation for and with a constant.
However, I cannot reproduce it on sparc64 (another strict-alignment target), so
I suspect a target bug.