]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Fix and improve insn constraint for V2QI arithmetic/shift insns
authorUros Bizjak <ubizjak@gmail.com>
Wed, 6 Mar 2024 19:53:50 +0000 (20:53 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 6 Mar 2024 19:54:43 +0000 (20:54 +0100)
commit74e8cc28eda9b1d75588fcd4017a735911b9d2b4
treeddd9f7444eb467c04b7ff048a833bc73d745f169
parent59554a50be8ebbd52e8a6348a92110af182e1874
i386: Fix and improve insn constraint for V2QI arithmetic/shift insns

optimize_function_for_size_p predicate is not stable during optab selection,
because it also depends on node->count/node->frequency of the current function,
which are updated during IPA, so they may change between early opts and
late opts.  Use optimize_size instead - optimize_size implies
optimize_function_for_size_p (cfun), so if a named pattern uses
"&& optimize_size" and the insn it splits into uses
optimize_function_for_size_p (cfun), it shouldn't fail.

PR target/114232

gcc/ChangeLog:

* config/i386/mmx.md (negv2qi2): Enable for optimize_size instead
of optimize_function_for_size_p.  Explictily enable for TARGET_SSE2.
(negv2qi SSE reg splitter): Enable for TARGET_SSE2 only.
(<plusminus:insn>v2qi3): Enable for optimize_size instead
of optimize_function_for_size_p.  Explictily enable for TARGET_SSE2.
(<plusminus:insn>v2qi SSE reg splitter): Enable for TARGET_SSE2 only.
(<any_shift:insn>v2qi3): Enable for optimize_size instead
of optimize_function_for_size_p.
gcc/config/i386/mmx.md