This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ARM] Fix new constraints and attributes of SI/HI data movement patterns



On 29/09/16 09:45, Matthew Wahab wrote:
The patch at https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01975.html
added constraints and "arch" attributes to some data movement patterns,
to fix wrongly generating MOVW instructions when not supported by the
targets. This was needed to fix a broken build but also resulted in MOVW
instructions not being generated when they should be.

This patch fixes the code-gen problems by removing the new attributes
from *arm_movsi_vfp and *thumb2_movsi_vfp since they are unnecessary.
It changes the rest of the added arch attributes from "t2", which
specifies a Thumb-2 target, to the weaker "v6t2" which specifies a
target that supports Thumb-2.

Tested for arm-none-linux-gnueabihf with native bootstrap and make check
on ARMv8-A and for arm-none-eabi with cross-compiled check-gcc on an
ARMv8.2-A emulator.

There is one unrelated failure in gcc.target/arm/fp16-aapcs-3.c, which
is a recently added test for the FP16 ARM alternative format. This has
    dg-require-effective-target arm_fp16_ok
which is true for +fp16 because that implies mfp16-format=ieee. The test
should instead be requiring
    dg-require-effective-target arm_fp16_alternative_ok
I'll send a patch to fix this.

Ok for trunk?

Ok.
Thanks for the fixup,
Kyrill


Matthew

gcc/
2016-09-29  Matthew Wahab  <matthew.wahab@arm.com>

    * config/arm/arm.md (*arm_movsi_insn): Replace "t2" arch attribute
    with "v6t2".  Move "arch" attribute above "pool_range".
    * config/arm/vfp.md (*arm_movhi_vfp): Likewise.
    (*thumb2_movhi_vfp): Likewise.
    (*arm_movhi_fp16): Likewise.
    (*thumb2_movhi_fp16): Likewise.
    (*arm_movsi_vfp): Remove "arch" attribute.
    (*thumb2_movsi_vfp): Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]