This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64/GCC] PR64304, miscompilation with -mgeneral-regs-only
- From: Jiong Wang <jiong dot wang at arm dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Jan 2015 11:17:53 +0000
- Subject: Re: [AArch64/GCC] PR64304, miscompilation with -mgeneral-regs-only
- Authentication-results: sourceware.org; auth=none
- References: <54B68BD7 dot 5020108 at arm dot com> <CAFqB+PyxcH-Hux4Pd06+Woi6SAPk5HnTAA4=_oBZJgxVHhM2VQ at mail dot gmail dot com>
On 16/01/15 10:50, Marcus Shawcroft wrote:
On 14 January 2015 at 15:31, Jiong Wang <jiong.wang@arm.com> wrote:
2015-01-15 Jiong. Wang (jiong.wang@arm.com)
gcc/
PR64304
* config/aarch64/aarch64.md (define_insn "*ashl<mode>3_insn"): Deleted.
(ashl<mode>3): Don't expand if operands[2] is not constant.
gcc/testsuite/
* gcc.target/aarch64/pr64304.c: New testcase.
@@ -3091,6 +3091,8 @@
DONE;
}
}
+ else
+ DONE;
}
)
Did you mean FAIL ?
exactly, thanks, we should use FAIL although DONE and FAIL work the same in this scenario.
I checked their definition, FAIL always return the initial value of _val which is NULL,
while DONE stop and return generated insns which for this pattern happen to be NULL also. that
explain why it's not exposed by testing.
#define FAIL return (end_sequence (), _val)
#define DONE return (_val = get_insns (), end_sequence (), _val)
In the current form this says the expander matched
by no RTL is required to implement the shift.
/Marcus