public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106329] New: No optimization for SVE pfalse predicate
@ 2022-07-16 20:16 yyc1992 at gmail dot com
  0 siblings, 0 replies; only message in thread
From: yyc1992 at gmail dot com @ 2022-07-16 20:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106329

            Bug ID: 106329
           Summary: No optimization for SVE pfalse predicate
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yyc1992 at gmail dot com
  Target Milestone: ---

If a known-all-false predicate is used on an SVE intrinsic, the result should
be fully no-op, undefined, zeroing and no actual instruction (other than
potentially returning a zero) should be generated. This does not seem to be
happening even when a `svpfalse_b()` is explicitly passed in as the predicate.

As an example,

```
svfloat64_t add(svfloat64_t a, svfloat64_t b)
{
    return svadd_x(svpfalse_b(), a, b);
}
```

is being compiled to
```
        pfalse  p0.b
        fadd    z0.d, p0/m, z0.d, z1.d
        ret
```

when it could simply be an empty function.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-16 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-16 20:16 [Bug target/106329] New: No optimization for SVE pfalse predicate yyc1992 at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).