public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/114523] bpf: ssa-phiopt optimization generates unverifiable code.
Date: Thu, 28 Mar 2024 18:26:29 +0000 [thread overview]
Message-ID: <bug-114523-4-g9Mr5Xxake@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114523-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114523
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> The problem is the verifier:
> Mär 26 23:57:12 H systemd[1]: 17: (ac) w0 ^= w3 ;
> R0_w=scalar()
> R3_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=1,var_off=(0x0; 0x1))
> Mär 26 23:57:12 H systemd[1]: 18: (57) r0 &= 255 ;
> R0_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=255,var_off=(0x0; 0xff))
>
>
> it lost track of what the input of r0 was. It had the right result after the
> xor but then the bit_and didn't take into account the what was before it. It
> just used 0xff.
Or rather the verifier is keeping track of rN and rN_w seperately but GCC
produces code that uses both and that definitely confuses the verifier.
Mär 26 23:57:12 H systemd[1]: 16: (77) r3 >>= 63 ;
R3_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=1,var_off=(0x0; 0x1))
wait why did the verifier use r3_w here rather than just r3? that seems like
the issue and would fix this issue easier ...
next prev parent reply other threads:[~2024-03-28 18:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 17:45 [Bug target/114523] New: " cupertino.miranda at oracle dot com
2024-03-28 17:50 ` [Bug target/114523] " pinskia at gcc dot gnu.org
2024-03-28 17:52 ` pinskia at gcc dot gnu.org
2024-03-28 17:58 ` pinskia at gcc dot gnu.org
2024-03-28 18:05 ` pinskia at gcc dot gnu.org
2024-03-28 18:09 ` pinskia at gcc dot gnu.org
2024-03-28 18:13 ` pinskia at gcc dot gnu.org
2024-03-28 18:20 ` pinskia at gcc dot gnu.org
2024-03-28 18:26 ` pinskia at gcc dot gnu.org [this message]
2024-03-28 19:17 ` jemarch at gcc dot gnu.org
2024-03-28 19:29 ` pinskia at gcc dot gnu.org
2024-03-28 19:31 ` pinskia at gcc dot gnu.org
2024-03-28 21:01 ` [Bug target/114523] bpf: unverifable code due to subreg usage pinskia at gcc dot gnu.org
2024-03-28 21:06 ` jemarch at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-114523-4-g9Mr5Xxake@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).