[Bug tree-optimization/126705] `ctz(a*3)` should be simplified into `ctz(a)`

"pinskia at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126705

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #1)
> This is an example of what something which is not optimized on aarch64:
> ```
> int f12(unsigned t)
> {
>     unsigned t1 = t *3;
>     if (t1)
>       return __builtin_ctz(t*3);
>     return 32;
> }
> ```

```
int f(unsigned t)
{
    t *= 3;
    if (t) // gets optimized to using the original t.
      return __builtin_ctz(t);
    return 32;
}
```
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.