public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-2015] Less strip_offset in IVOPTs Date: Wed, 21 Jun 2023 12:01:54 +0000 (GMT) [thread overview] Message-ID: <20230621120154.B707A3858C74@sourceware.org> (raw) https://gcc.gnu.org/g:b54d0f29590d21991f519c5b70cc74e6309aa2f6 commit r14-2015-gb54d0f29590d21991f519c5b70cc74e6309aa2f6 Author: Richard Biener <rguenther@suse.de> Date: Wed Jun 21 12:08:01 2023 +0200 Less strip_offset in IVOPTs This avoids one strip_offset use in add_iv_candidate_for_use where we know it operates on a sizetype quantity. * tree-ssa-loop-ivopts.cc (add_iv_candidate_for_use): Use split_constant_offset for the POINTER_PLUS_EXPR case. Diff: --- gcc/tree-ssa-loop-ivopts.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc index 957a3001e16..6671ff6db5a 100644 --- a/gcc/tree-ssa-loop-ivopts.cc +++ b/gcc/tree-ssa-loop-ivopts.cc @@ -3585,9 +3585,10 @@ add_iv_candidate_for_use (struct ivopts_data *data, struct iv_use *use) step = fold_convert (sizetype, step); record_common_cand (data, base, step, use); /* Also record common candidate with offset stripped. */ - base = strip_offset (base, &offset); - if (maybe_ne (offset, 0U)) - record_common_cand (data, base, step, use); + tree alt_base, alt_offset; + split_constant_offset (base, &alt_base, &alt_offset); + if (!integer_zerop (alt_offset)) + record_common_cand (data, alt_base, step, use); } /* At last, add auto-incremental candidates. Make such variables
reply other threads:[~2023-06-21 12:01 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230621120154.B707A3858C74@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).