aarch64: Add an and/ior-based movk pattern [PR87763]
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 3 Feb 2020 21:43:44 +0000 (21:43 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 6 Feb 2020 17:27:00 +0000 (17:27 +0000)
commitbba0c624c8b1d6e54dc58091dd21b0c2ab000434
tree8ed844c674d1357b8f72de97999951e19879f18e
parentb65a1eb3fae53f2e1ea1ef8c1164f490d55855a1
aarch64: Add an and/ior-based movk pattern [PR87763]

This patch adds a second movk pattern that models the instruction
as a "normal" and/ior operation rather than an insertion.  It fixes
the third insv_1.c failure in PR87763, which was a regression from
GCC 8.

2020-02-06  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR target/87763
* config/aarch64/aarch64-protos.h (aarch64_movk_shift): Declare.
* config/aarch64/aarch64.c (aarch64_movk_shift): New function.
* config/aarch64/aarch64.md (aarch64_movk<mode>): New pattern.

gcc/testsuite/
PR target/87763
* gcc.target/aarch64/movk_2.c: New test.
gcc/ChangeLog
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/movk_2.c [new file with mode: 0644]