[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 --- Comment #9 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:3753ceff562d8614a94a164b312f389812bd6cd8 commit r10-9641-g3753ceff562d8614a94a164b312f389812bd6cd8 Author: Jakub Jelinek Date: Wed Mar 31 10:46:01 2021 +0200 aarch64: Fix up *add3_poly_1 [PR99813] As mentioned in the PR, Uai constraint stands for aarch64_sve_scalar_inc_dec_immediate while Uav for aarch64_sve_addvl_addpl_immediate. Both *add3_aarch64 and *add3_poly_1 patterns use * return aarch64_output_sve_scalar_inc_dec (operands[2]); * return aarch64_output_sve_addvl_addpl (operands[2]); in that order, but the former with Uai,Uav order, while the latter with Uav,Uai instead. This patch swaps the constraints so that they match the output. Co-authored-by: Richard Sandiford 2021-03-31 Jakub Jelinek Richard Sandiford PR target/99813 * config/aarch64/aarch64.md (*add3_poly_1): Swap Uai and Uav constraints on operands[2] and similarly 0 and rk constraints on operands[1] corresponding to that. * g++.target/aarch64/sve/pr99813.C: New test. (cherry picked from commit c001c194a2f73fb32461b597e91a35f9bbcf4414)
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #8 from Jakub Jelinek --- Fixed.
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 --- Comment #7 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c001c194a2f73fb32461b597e91a35f9bbcf4414 commit r11-7924-gc001c194a2f73fb32461b597e91a35f9bbcf4414 Author: Jakub Jelinek Date: Wed Mar 31 10:46:01 2021 +0200 aarch64: Fix up *add3_poly_1 [PR99813] As mentioned in the PR, Uai constraint stands for aarch64_sve_scalar_inc_dec_immediate while Uav for aarch64_sve_addvl_addpl_immediate. Both *add3_aarch64 and *add3_poly_1 patterns use * return aarch64_output_sve_scalar_inc_dec (operands[2]); * return aarch64_output_sve_addvl_addpl (operands[2]); in that order, but the former with Uai,Uav order, while the latter with Uav,Uai instead. This patch swaps the constraints so that they match the output. Co-authored-by: Richard Sandiford 2021-03-31 Jakub Jelinek Richard Sandiford PR target/99813 * config/aarch64/aarch64.md (*add3_poly_1): Swap Uai and Uav constraints on operands[2] and similarly 0 and rk constraints on operands[1] corresponding to that. * g++.target/aarch64/sve/pr99813.C: New test.
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 Jakub Jelinek changed: What|Removed |Added Attachment #50487|0 |1 is obsolete|| --- Comment #6 from Jakub Jelinek --- Created attachment 50489 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50489=edit gcc11-pr99813.patch Retesting this overnight too.
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 --- Comment #5 from Jakub Jelinek --- Oops, totally missed that.
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 --- Comment #4 from rsandifo at gcc dot gnu.org --- Thanks for looking at this. I agree swapping the constraints for operand 2 looks like the right fix, and brings it into line with *add3_aarch64". I think we need to swap operand 1 too though, since Uai needs tied registers but Uav doesn't. I'll test with that change overnight.
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 Jakub Jelinek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Jakub Jelinek --- Created attachment 50487 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50487=edit gcc11-pr99813.patch Full untested fix.
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 --- Comment #2 from Jakub Jelinek --- I think the bug is in swapped constraints on add3_poly_1. We have: (define_constraint "Uai" "@internal A constraint that matches a VG-based constant that can be added by a single INC or DEC." (match_operand 0 "aarch64_sve_scalar_inc_dec_immediate")) (define_constraint "Uav" "@internal A constraint that matches a VG-based constant that can be added by a single ADDVL or ADDPL." (match_operand 0 "aarch64_sve_addvl_addpl_immediate")) and *add3_aarch64 has: Uai,Uav and matching output for those 2 constraints is: * return aarch64_output_sve_scalar_inc_dec (operands[2]); * return aarch64_output_sve_addvl_addpl (operands[2]);" Now, *add3_poly_1 has: Uav,Uai and matching output for those 2 constraints is: * return aarch64_output_sve_scalar_inc_dec (operands[2]); * return aarch64_output_sve_addvl_addpl (operands[2]); so IMHO, either we need to swap those 2 return lines, or do: --- gcc/config/aarch64/aarch64.md.jj2021-02-25 23:07:07.851319165 +0100 +++ gcc/config/aarch64/aarch64.md 2021-03-30 11:13:35.994077470 +0200 @@ -2051,7 +2051,7 @@ (match_operand:GPI 0 "register_operand" "=r,r,r,r,r,r,") (plus:GPI (match_operand:GPI 1 "register_operand" "%rk,rk,rk,rk,rk,0,rk") - (match_operand:GPI 2 "aarch64_pluslong_or_poly_operand" "I,r,J,Uaa,Uav,Uai,Uat")))] + (match_operand:GPI 2 "aarch64_pluslong_or_poly_operand" "I,r,J,Uaa,Uai,Uav,Uat")))] "TARGET_SVE && operands[0] != stack_pointer_rtx" "@ add\\t%0, %1, %2
[Bug target/99813] [11 Regression] SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813 ktkachov at gcc dot gnu.org changed: What|Removed |Added Known to work||10.2.1 Summary|SVE: Invalid assembly at|[11 Regression] SVE: |-O3 (multiplier out of |Invalid assembly at -O3 |range in incb instruction) |(multiplier out of range in ||incb instruction) Target Milestone|--- |11.0 CC||ktkachov at gcc dot gnu.org Priority|P3 |P1 Last reconfirmed||2021-03-29 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from ktkachov at gcc dot gnu.org --- Confirmed.