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 tree-optimization/116569] [15 Regression] ICE in to_constant, at poly-int.h:592
Date: Fri, 06 Sep 2024 09:41:53 +0000 [thread overview]
Message-ID: <bug-116569-4-Zw3S1T6zpP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-116569-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116569
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #8)
> (In reply to Jennifer Schmitz from comment #7)
> > Thanks for the quick reply. I tried
> >
> > (simplify
> > (minus (convert1? @0) (convert2? (mult:c (trunc_div @@0 @@1) @1)))
> > (if (INTEGRAL_TYPE_P (type)
> > || (VECTOR_INTEGER_TYPE_P (type)
> > && optimize_vectors_before_lowering_p ()))
> > (convert (trunc_mod @0 @1))))
> >
> > and the result is that the test case still ICEs, but fold-minus-1.c passes.
>
> Try:
> INTEGRAL_TYPE_P (type)
> || (VECTOR_INTEGER_TYPE_P (type)
> && (optimize_vectors_before_lowering_p ()
> || target_supports_op_p (type, TRUNC_MOD_EXPR, optab_vector)))
Oh wait the problem is this is before lowering but SVE vectors can't be
lowered.
I think maybe the lowering pass should handle the case where:
!target_supports_op_p (type, TRUNC_MOD_EXPR, optab_vector) &&
target_supports_op_p (type, TRUNC_DIV_EXPR, optab_vector) &&
target_supports_op_p (type, MULT_EXPR, optab_vector) && target_supports_op_p
(type, MINUS_EXPR, optab_vector)
And expand TRUNC_MOD_EXPR there.
I am thinking about adding a similar thing for MIN/MAX too.
next prev parent reply other threads:[~2024-09-06 9:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 12:14 [Bug tree-optimization/116569] New: " ktkachov at gcc dot gnu.org
2024-09-02 12:14 ` [Bug tree-optimization/116569] " ktkachov at gcc dot gnu.org
2024-09-02 13:03 ` acoplan at gcc dot gnu.org
2024-09-02 13:51 ` rguenth at gcc dot gnu.org
2024-09-02 21:57 ` pinskia at gcc dot gnu.org
2024-09-06 4:10 ` pinskia at gcc dot gnu.org
2024-09-06 9:23 ` jschmitz at gcc dot gnu.org
2024-09-06 9:28 ` pinskia at gcc dot gnu.org
2024-09-06 9:35 ` jschmitz at gcc dot gnu.org
2024-09-06 9:37 ` pinskia at gcc dot gnu.org
2024-09-06 9:41 ` pinskia at gcc dot gnu.org [this message]
2024-09-06 9:52 ` pinskia at gcc dot gnu.org
2024-09-06 10:12 ` ktkachov at gcc dot gnu.org
2024-09-06 11:22 ` rguenth at gcc dot gnu.org
2024-09-06 11:23 ` rguenth at gcc dot gnu.org
2024-09-18 11:07 ` cvs-commit at gcc dot gnu.org
2024-09-18 11:09 ` jschmitz 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-116569-4-Zw3S1T6zpP@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).