[ARM] Cleanup logical DImode operations

Programming / Compilers / GCC - wilco [138bc75d-0d04-0410-961f-82ee72b054a4] - 22 August 2019 14:52 EDT

Cleanup the logical DImode operations since the current implementation is way too complicated. Thumb-1, Thumb-2, VFP/Neon and iwMMXt all work differently, resulting in a bewildering number of expansions, patterns and splits across several md files. All this complexity is counterproductive and results in inefficient code.

A much simpler approach is to split these operations early in the expander so that optimizations and register allocation are applied on the 32-bit halves. Codegeneration is unchanged on Thumb-1 and Arm/Thumb-2 without Neon or iwMMXt (which already expand these instructions early). With Neon these changes save ~1000 instructions from the PR77308 testcase, mostly by significantly reducing register pressure and spilling.

Bootstrap OK on arm-none-linux-gnueabihf --with-cpu=cortex-a57

gcc/
- config/arm/arm.md (split and/eor/ior): Remove Neon check. (split not): Add DImode not splitter. (anddi3): Remove pattern. (anddi3_insn): Likewise. (anddi_zesidi_di): Likewise. (anddi_sesdi_di): Likewise. (anddi_notdi_di): Likewise. (anddi_notzesidi_di): Likewise. (anddi_notsesidi_di): Likewise. (iordi3): Likewise. (iordi3_insn): Likewise. (iordi_zesidi_di): Likewise. (iordi_sesidi_di): Likewise. (xordi3): Likewise. (xordi3_insn): Likewise. (xordi_sesidi_di): Likewise. (xordi_zesidi_di): Likewise. (one_cmpldi2): Likewise. (one_cmpldi2_insn): Likewise.
- config/arm/constraints.md: Remove De, Df, Dg constraints.
- config/arm/iwmmxt.md (iwmmxt_iordi3): Remove general register alternative. (iwmmxt_xordi3): Likewise. (iwmmxt_anddi3): Likewise.
- config/arm/neon.md (orndi3_neon): Remove pattern. (anddi_notdi_di): Likewise.
- config/arm/predicates.md (arm_anddi_operand_neon): Remove. (arm_iordi_operand_neon): Likewise. (arm_xordi_operand_neon): Likewise.
- config/arm/thumb2.md(iordi_notdi_di): Remove pattern. (iordi_notzesidi_di): Likewise. (iordi_notdi_zesidi): Likewise. (iordi_notsesidi_di): Likewise.

5eddd2756d0 [ARM] Cleanup logical DImode operations
gcc/ChangeLog | 36 +++
gcc/config/arm/arm.md | 511 +-----------------------------------------
gcc/config/arm/constraints.md | 18 --
gcc/config/arm/iwmmxt.md | 45 ++--
gcc/config/arm/neon.md | 54 -----
gcc/config/arm/predicates.md | 17 --
gcc/config/arm/thumb2.md | 97 --------
7 files changed, 65 insertions(+), 713 deletions(-)

Upstream: gcc.gnu.org


  • Share