[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |12.0 Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from Andrew Pinski --- Fixed.
[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 --- Comment #7 from CVS Commits --- The master branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:db95ac7745b284d1fd667ee6262b4afc778fe074 commit r12-2395-gdb95ac7745b284d1fd667ee6262b4afc778fe074 Author: Andrew Pinski Date: Sat Jul 17 01:16:28 2021 -0700 [AARCH64] Fix PR 101205: csinv does not have an zero_extend version So the problem is even though there was a csneg with a zero_extend in the front, there was not one for csinv. This fixes it by extending that pattern. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. gcc/ChangeLog: PR target/101205 * config/aarch64/aarch64.md (csneg3_uxtw_insn): Rename to ... (*cs3_uxtw_insn4): and extend to NEG_NOT. gcc/testsuite/ChangeLog: PR target/101205 * gcc.target/aarch64/csinv-neg-1.c: New test.
[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 Andrew Pinski changed: What|Removed |Added Keywords||patch URL||https://gcc.gnu.org/piperma ||il/gcc-patches/2021-July/57 ||5514.html --- Comment #6 from Andrew Pinski --- Finally went through.
[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 --- Comment #5 from Andrew Pinski --- Created attachment 51169 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51169=edit full patch Patch which I sent but the company mail relay server looks broken.
[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > The fix actually might be simplier than I had expected because csneg is > already implement, just need to extend it to csinv also like so: Yep that works. time to test it.
[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 --- Comment #3 from Andrew Pinski --- The fix actually might be simplier than I had expected because csneg is already implement, just need to extend it to csinv also like so: diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index f12a0bebd3d..8cd259fca9c 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -4203,15 +4203,15 @@ (define_insn "*csinv3_insn" [(set_attr "type" "csel")] ) -(define_insn "csneg3_uxtw_insn" +(define_insn "*cs3_uxtw_insn4" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI (if_then_else:SI (match_operand 1 "aarch64_comparison_operation" "") - (neg:SI (match_operand:SI 2 "register_operand" "r")) + (NEG_NOT:SI (match_operand:SI 2 "register_operand" "r")) (match_operand:SI 3 "aarch64_reg_or_zero" "rZ"] "" - "csneg\\t%w0, %w3, %w2, %M1" + "cs\\t%w0, %w3, %w2, %M1" [(set_attr "type" "csel")] )
[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 --- Comment #2 from Andrew Pinski --- The problem is csinv3si_insn, csinv3_uxtw_insn2, nor csinv3_uxtw_insn3 would match as those have the zero_extend inside the if/then/else rather on the outside which is being matched here: Trying 36 -> 19: 36: r94:SI={(cc:CC==0)?~r100:SI:r101:SI} REG_DEAD r100:SI REG_DEAD cc:CC REG_DEAD r101:SI 19: x0:DI=zero_extend(r94:SI) REG_DEAD r94:SI Failed to match this instruction: (set (reg/i:DI 0 x0) (zero_extend:DI (if_then_else:SI (eq (reg:CC 66 cc) (const_int 0 [0])) (not:SI (reg:SI 100)) (reg:SI 101
[Bug target/101205] csinv does not have an zero_extend version
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101205 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-07-16 Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #1 from Andrew Pinski --- Mine.