User account creation filtered due to spam.

Bug 25529 - (unsigned * 2)/2 is not changed into unsigned &0x7FFFFFFF
Summary: (unsigned * 2)/2 is not changed into unsigned &0x7FFFFFFF
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization, TREE
Depends on:
Blocks: 19986
  Show dependency treegraph
 
Reported: 2005-12-22 06:26 UTC by Andrew Pinski
Modified: 2015-08-13 04:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-08-21 06:08:51


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2005-12-22 06:26:36 UTC
Testcase:
int f1(unsigned t)
{
  return (t*2)/2;
}


This is done in combine on the RTL level.
Comment 1 Andrew Pinski 2007-07-01 00:34:23 UTC
Related to PR 25530.
Comment 2 naveenh 2015-07-24 04:48:20 UTC
Author: naveenh
Date: Fri Jul 24 04:47:48 2015
New Revision: 226136

URL: https://gcc.gnu.org/viewcvs?rev=226136&root=gcc&view=rev
Log:
PR middle-end/25529
2015-07-24  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

gcc/testsuite/ChangeLog:
	* gcc.dg/pr25529.c: New test.

gcc/ChangeLog:
	* match.pd (trunc_div (mult @0 integer_pow2p@1) @1) : New simplifier.


Added:
    trunk/gcc/testsuite/gcc.dg/pr25529.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/match.pd
    trunk/gcc/testsuite/ChangeLog
Comment 3 naveenh 2015-08-13 04:37:55 UTC
Author: naveenh
Date: Thu Aug 13 04:37:22 2015
New Revision: 226847

URL: https://gcc.gnu.org/viewcvs?rev=226847&root=gcc&view=rev
Log:
2015-08-13  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

	PR middle-end/25529
	* match.pd (div (mult @0 @1) @1) : New simplifier.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/match.pd