aarch64: Expand any-or-plus to IOR or ADD
AArch64 backend now correctly expands bitwise operations, improving code generation and fixing regressions.
The AArch64 backend has been updated to correctly expand bitwise OR and XOR operations (aop
In Details
The aop<mode>3 expander in AArch64's .md files was defaulting to PLUS for SImode/DImode when operands were bitwise-disjoint, due to lack of a specific AArch64 instruction. This default interfered with correct handling of bitfield inserts and float conversions by misrepresenting the number of significant bits. This commit introduces a new expander that checks if the second operand is an immediate ADD or logical immediate, emitting IOR for logical immediates and ADD otherwise, thereby preserving the intended operation and fixing subsequent compilation issues.