This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64] Fix predicate and constraint mismatch in logical atomic operations
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Michael Collison <michael dot collison at linaro dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Sep 2014 21:01:07 -0700
- Subject: Re: [AArch64] Fix predicate and constraint mismatch in logical atomic operations
- Authentication-results: sourceware.org; auth=none
- References: <54238FEF dot 6030006 at linaro dot org>
On Wed, Sep 24, 2014 at 8:45 PM, Michael Collison
<michael.collison@linaro.org> wrote:
> On certain patterns in atomics.md the constraint 'n' is used in combination
> with the predicate atomic_op_operand. The constraint is too general and
> allows constants that are disallowed by the predicate. This causes an ICE In
> final_scan_insn when the insn cannot be split because the constraint and
> predicate do not match.
>
> Tested on aarch64-none-elf, aarch64-linux-gnu. Additionally the originally
> reporter of the bug, (doko@ubuntu.com), applied the patch and successfully
> bootstrapped and tested with no regressions.
Testcase?
>
> 2014-09-23 Michael Collison <michael.collison@linaro.org>
>
> * config/aarch64/iterators.md (lconst_atomic): New mode attribute to
> support constraints for CONST_INT in atomic operations.
> * config/aarch64/atomics.md
> (atomic_<atomic_optab><mode>): Use lconst_atomic constraint.
> (atomic_nand<mode>): Likewise.
> (atomic_fetch_<atomic_optab><mode>): Likewise.
> (atomic_fetch_nand<mode>): Likewise.
> (atomic_<atomic_optab>_fetch<mode>): Likewise.
> (atomic_nand_fetch<mode>): Likewise.
>
> --
> Michael Collison
> Linaro Toolchain Working Group
> michael.collison@linaro.org
>