Skip to content
Snippets Groups Projects
Commit 1d8ff0d2 authored by sayle's avatar sayle
Browse files

2006-02-26 Roger Sayle <roger@eyesopen.com>

	    James A. Morrison  <phython@gcc.gnu.org>

	PR middle-end/21137
	* fold-const.c (fold_binary) <EQ_EXPR>:  Fold ((X>>C1)&C2) eq/ne 0,
	when C2 is a power of two, as either (X&(C2<<C1)) eq/ne 0 if the
	new constant C2<<C1, or as (X<0) or (X,false) depending upon the
	signedness of the shift operation.

	* gcc.dg/fold-eqandshift-1.c: New test case.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111453 138bc75d-0d04-0410-961f-82ee72b054a4
parent 17e07532
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment