i386: Add combine splitters to allow combining multiple insns into reg1 = const;...
authorJakub Jelinek <jakub@redhat.com>
Fri, 4 Dec 2020 17:44:31 +0000 (18:44 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 4 Dec 2020 17:44:31 +0000 (18:44 +0100)
commitac2a6962b91128e700ee52db686dcdb2bab93790
treecf15a76a7c3fff60cad9088ca46693240a9ad595
parent33be07be9e46f15b9556521050356c47460651ee
i386: Add combine splitters to allow combining multiple insns into reg1 = const; reg2 = rotate (reg1, reg3 & cst) [PR96226]

As mentioned in the PR, we can combine ~(1 << x) into -2 r<< x, but we give
up in the ~(1 << (x & 31)) cases, as *<rotate_insn><mode>3_mask* don't allow
immediate operand 1 and find_split_point prefers to split (x & 31) instead
of the constant.

With these combine splitters we help combine decide how to split those
insns.

2020-12-04  Jakub Jelinek  <jakub@redhat.com>

PR target/96226
* config/i386/i386.md (splitter after *<rotate_insn><mode>3_mask,
splitter after *<rotate_insn><mode>3_mask_1): New combine splitters.

* gcc.target/i386/pr96226.c: New test.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr96226.c [new file with mode: 0644]