diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-08-16 07:58:25 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-08-16 07:58:25 +0100 |
commit | 959d6529df206c1983be14383da081f374416e47 (patch) | |
tree | 6f6f93086702c24bd5e456e4ab1b83c9bad984a2 /ar-lib | |
parent | 22c6a11686d3f20f8682c2fbe9e33867a7e8af0e (diff) | |
download | gcc-releases/gcc-13.zip gcc-releases/gcc-13.tar.gz gcc-releases/gcc-13.tar.bz2 |
aarch64: Fix bogus cnot optimisation [PR114603]releases/gcc-13
aarch64-sve.md had a pattern that combined:
cmpeq pb.T, pa/z, zc.T, #0
mov zd.T, pb/z, #1
into:
cnot zd.T, pa/m, zc.T
But this is only valid if pa.T is a ptrue. In other cases, the
original would set inactive elements of zd.T to 0, whereas the
combined form would copy elements from zc.T.
gcc/
PR target/114603
* config/aarch64/aarch64-sve.md (@aarch64_pred_cnot<mode>): Replace
with...
(@aarch64_ptrue_cnot<mode>): ...this, requiring operand 1 to be
a ptrue.
(*cnot<mode>): Require operand 1 to be a ptrue.
* config/aarch64/aarch64-sve-builtins-base.cc (svcnot_impl::expand):
Use aarch64_ptrue_cnot<mode> for _x operations that are predicated
with a ptrue. Represent other _x operations as fully-defined _m
operations.
gcc/testsuite/
PR target/114603
* gcc.target/aarch64/sve/acle/general/cnot_1.c: New test.
(cherry picked from commit 67cbb1c638d6ab3a9cb77e674541e2b291fb67df)
Diffstat (limited to 'ar-lib')
0 files changed, 0 insertions, 0 deletions