> -Original Message-
> From: Richard Sandiford
> Sent: Friday, September 23, 2022 5:43 AM
> To: Tamar Christina
> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw
> ; Marcus Shawcroft
> ; Kyrylo Tkachov
> Subject: Re: [PATCH 2/2]AArch64 Extend tbz p
Tamar Christina writes:
> Hi All,
>
> This adds additional recognition of & 1 into the tbz/tbnz pattern.
>
> Concretely with the mid-end changes this changes
>
> void g1(bool x)
> {
> if (__builtin_expect (x, 0))
> h ();
> }
>
> from
>
> tst w0, 255
> bne .L7
>
> to
>
Hi All,
This adds additional recognition of & 1 into the tbz/tbnz pattern.
Concretely with the mid-end changes this changes
void g1(bool x)
{
if (__builtin_expect (x, 0))
h ();
}
from
tst w0, 255
bne .L7
to
tbnzw0, #0, .L5
This pattern occurs ~120,0