Skip to content
Snippets Groups Projects
Commit be4a6551 authored by Aldy Hernandez's avatar Aldy Hernandez
Browse files

irange: keep better track of powers of 2.

When setting the nonzero bits to a mask containing only one bit, set
the range immediately, as it can be devined from the mask.  This helps
us keep better track of powers of two.

For example, with this patch a nonzero mask of 0x8000 is set to a
range of [0,0][0x8000,0x8000] with a nonzero mask of 0x8000.

gcc/ChangeLog:

	* value-range.cc (irange::set_nonzero_bits): Set range when known.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/popcount6.c: New test.
parent 1db05e1a
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