diff options
author | Tamar Christina <tamar.christina@arm.com> | 2023-12-24 19:18:53 +0000 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2023-12-24 19:30:09 +0000 |
commit | 1bcc07aeb47c0ed7eb50eac8a4e057d6336669ab (patch) | |
tree | 30d809ede8c1bf0830044c1b42a2bb97e5322fb6 /gcc/tree-vect-loop.cc | |
parent | 01f4251b8775c832a92d55e2df57c9ac72eaceef (diff) | |
download | gcc-1bcc07aeb47c0ed7eb50eac8a4e057d6336669ab.zip gcc-1bcc07aeb47c0ed7eb50eac8a4e057d6336669ab.tar.gz gcc-1bcc07aeb47c0ed7eb50eac8a4e057d6336669ab.tar.bz2 |
AArch64: Add implementation for vector cbranch for Advanced SIMD
Hi All,
This adds an implementation for conditional branch optab for AArch64.
For e.g.
void f1 ()
{
for (int i = 0; i < N; i++)
{
b[i] += a[i];
if (a[i] > 0)
break;
}
}
For 128-bit vectors we generate:
cmgt v1.4s, v1.4s, #0
umaxp v1.4s, v1.4s, v1.4s
fmov x3, d1
cbnz x3, .L8
and of 64-bit vector we can omit the compression:
cmgt v1.2s, v1.2s, #0
fmov x2, d1
cbz x2, .L13
gcc/ChangeLog:
* config/aarch64/aarch64-simd.md (cbranch<mode>4): New.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/sve/vect-early-break-cbranch.c: New test.
* gcc.target/aarch64/vect-early-break-cbranch.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions