public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/35281] [4.3/4.4 Regression] multiply with 0 generated for 64*32->64 Date: Wed, 05 Mar 2008 11:11:00 -0000 [thread overview] Message-ID: <20080305111031.2496.qmail@sourceware.org> (raw) In-Reply-To: <bug-35281-10175@http.gcc.gnu.org/bugzilla/> ------- Comment #7 from ubizjak at gmail dot com 2008-03-05 11:10 ------- It looks that: 2006-11-03 Paolo Bonzini <bonzini@gnu.org> Steven Bosscher <steven@gcc.gnu.org> * fwprop.c: New file. ... * cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1, find_best_addr, canon_for_address, table_size): Remove. (new_basic_block, insert, remove_from_table): Remove references to table_size. (fold_rtx): Process SUBREGs and MEMs with equiv_constant, make simplification loop more straightforward by not calling fold_rtx recursively. (equiv_constant): Move here a small part of fold_rtx_subreg, do not call fold_rtx. Call avoid_constant_pool_reference to process MEMs. removed this functionality. Specifically this part: - /* If this is a constant pool reference, we can fold it into its - constant to allow better value tracking. */ - if (base && GET_CODE (base) == SYMBOL_REF - && CONSTANT_POOL_ADDRESS_P (base)) - { - rtx constant = get_pool_constant (base); - enum machine_mode const_mode = get_pool_mode (base); - rtx new; - - if (CONSTANT_P (constant) && GET_CODE (constant) != CONST_INT) - { - constant_pool_entries_cost = COST (constant); - constant_pool_entries_regcost = approx_reg_cost (constant); - } - - /* If we are loading the full constant, we have an - equivalence. */ - if (offset == 0 && mode == const_mode) - return constant; - - /* If this actually isn't a constant (weird!), we can't do - anything. Otherwise, handle the two most common cases: - extracting a word from a multi-word constant, and - extracting the low-order bits. Other cases don't seem - common enough to worry about. */ - if (! CONSTANT_P (constant)) - return x; - - if (GET_MODE_CLASS (mode) == MODE_INT - && GET_MODE_SIZE (mode) == UNITS_PER_WORD - && offset % UNITS_PER_WORD == 0 - && (new = operand_subword (constant, - offset / UNITS_PER_WORD, - 0, const_mode)) != 0) - return new; - - if (((BYTES_BIG_ENDIAN - && offset == GET_MODE_SIZE (GET_MODE (constant)) - 1) - || (! BYTES_BIG_ENDIAN && offset == 0)) - && (new = gen_lowpart (mode, constant)) != 0) - return new; - } This also explains why 4.2 doesn't fold HImode references ("Other cases don't seem common enough to worry about."). Can we have this functionality back, perhaps also for "Other cases", since there are people that worry about them? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35281
next prev parent reply other threads:[~2008-03-05 11:11 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-02-21 20:50 [Bug rtl-optimization/35281] New: [4.3 regression] " astrange at ithinksw dot com 2008-02-21 21:36 ` [Bug rtl-optimization/35281] " ubizjak at gmail dot com 2008-02-21 21:59 ` astrange at ithinksw dot com 2008-03-05 10:15 ` ubizjak at gmail dot com 2008-03-05 10:17 ` ubizjak at gmail dot com 2008-03-05 10:28 ` [Bug rtl-optimization/35281] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org 2008-03-05 10:33 ` ubizjak at gmail dot com 2008-03-05 11:11 ` ubizjak at gmail dot com [this message] 2008-03-05 13:22 ` bonzini at gnu dot org 2008-03-05 13:22 ` bonzini at gnu dot org 2008-03-10 14:15 ` bonzini at gnu dot org 2008-03-10 15:19 ` bonzini at gnu dot org 2008-03-11 16:49 ` bonzini at gnu dot org 2008-03-11 16:49 ` bonzini at gcc dot gnu dot org 2008-04-02 9:58 ` bonzini at gnu dot org 2008-04-02 11:25 ` [Bug rtl-optimization/35281] [4.3 " bonzini at gnu dot org 2008-04-03 5:38 ` bonzini at gcc dot gnu dot org 2008-06-06 15:02 ` rguenth at gcc dot gnu dot org 2008-07-14 16:08 ` bonzini at gnu dot org 2008-07-18 11:46 ` bonzini at gcc dot gnu dot org 2008-07-18 11:46 ` bonzini at gnu dot 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=20080305111031.2496.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).