public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "trt at acm dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/21643] GCC fails to merge ranges in comparison. Date: Wed, 18 May 2005 17:21:00 -0000 [thread overview] Message-ID: <20050518172136.10072.qmail@sourceware.org> (raw) In-Reply-To: <20050518123222.21643.dwmw2@infradead.org> ------- Additional Comments From trt at acm dot org 2005-05-18 17:21 ------- This is because fold-const.c only does ad-hoc re-association. Here is an example for fold_truthop (approx line 8805) /* Check for the possibility of merging component references. If our lhs is another similar operation, try to merge its rhs with our rhs. Then try to merge our lhs and rhs. */ if (TREE_CODE (arg0) == code && 0 != (tem = fold_truthop (code, type, TREE_OPERAND (arg0, 1), arg1))) return fold_build2 (code, type, TREE_OPERAND (arg0, 0), tem); A similar hack could be done for fold_range_test. (I wrote a helper fold_assoc (f, x, code, type, op1, op2) that does this in a more general way, but it in turn needed `find_assoc_p' and `commutes_p' functions, and handling EXPR_MINUS was onerous. It might be too slow for general use. Basically, it needs a fast way to check for common subexpressions to avoid pointless recursions.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643
next prev parent reply other threads:[~2005-05-18 17:21 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-05-18 12:32 [Bug rtl-optimization/21643] New: " dwmw2 at infradead dot org 2005-05-18 12:33 ` [Bug rtl-optimization/21643] " dwmw2 at infradead dot org 2005-05-18 12:39 ` [Bug tree-optimization/21643] " pinskia at gcc dot gnu dot org 2005-05-18 17:21 ` trt at acm dot org [this message] 2005-05-18 17:28 ` trt at acm dot org [not found] <bug-21643-4@http.gcc.gnu.org/bugzilla/> 2012-02-08 20:55 ` pinskia at gcc dot gnu.org 2012-10-31 8:46 ` jakub at gcc dot gnu.org 2012-10-31 8:52 ` jakub 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=20050518172136.10072.qmail@sourceware.org \ --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: 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).