[Bug target/109254] Bug in gcc (13.0.1) support for ARM SVE, which randomly modifies the prediction register
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 23 16:08:05 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109254
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
2023-03-23 Jakub Jelinek <jakub@redhat.com>
PR target/109254
* config/aarch64/aarch64.cc (aarch64_function_arg_regno_p): Also
return true for p0-p3.
--- gcc/config/aarch64/aarch64.cc.jj 2023-03-13 00:11:52.328213351 +0100
+++ gcc/config/aarch64/aarch64.cc 2023-03-23 16:57:29.957866005 +0100
@@ -7959,7 +7959,8 @@ bool
aarch64_function_arg_regno_p (unsigned regno)
{
return ((GP_REGNUM_P (regno) && regno < R0_REGNUM + NUM_ARG_REGS)
- || (FP_REGNUM_P (regno) && regno < V0_REGNUM + NUM_FP_ARG_REGS));
+ || (FP_REGNUM_P (regno) && regno < V0_REGNUM + NUM_FP_ARG_REGS)
+ || (PR_REGNUM_P (regno) && regno < P0_REGNUM + NUM_PR_ARG_REGS));
}
/* Implement FUNCTION_ARG_BOUNDARY. Every parameter gets at least
fixes this. Or do we want to return true for p0-p3 only if SVE is enabled?
Not familiar with SVE enough to turn the testcase into gcc.target/aarch64/sve
runtime tests (bet we need __attribute__((noipa)) on the function, but unsure
how to initialize the arguments in the caller and how to verify the result is
correct in it after the call.
More information about the Gcc-bugs
mailing list