Skip to content
Snippets Groups Projects
Commit d6c4badf authored by Richard Sandiford's avatar Richard Sandiford
Browse files

Handle POLY_INT_CSTs in get_nonzero_bits

This patch extends get_nonzero_bits to handle POLY_INT_CSTs,
The easiest (but also most useful) case is that the number
of trailing zeros in the runtime value is at least the number
of trailing zeros in each individual component.

In principle, we could do this for coeffs 1 and above only,
and then OR in ceoff 0.  This would give ~0x11 for [14, 32], say.
But that's future work.

gcc/
	* tree-ssanames.cc (get_nonzero_bits): Handle POLY_INT_CSTs.
	* match.pd (with_possible_nonzero_bits): Likewise.

gcc/testsuite/
	* gcc.target/aarch64/sve/cnt_fold_4.c: New test.
parent ec8e8d35
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