Skip to content
Snippets Groups Projects
Commit 72e652f3 authored by Andrew Pinski's avatar Andrew Pinski
Browse files

MATCH: Fix zero_one_valued_p not to match signed 1 bit integers

So for the attached testcase, we assumed that zero_one_valued_p would
be the value [0,1] but currently zero_one_valued_p matches also
signed 1 bit integers.
This changes that not to match that and fixes the 2 new testcases at
all optimization levels.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Note the GCC 13 patch will be slightly different due to the changes
made to zero_one_valued_p.

	PR tree-optimization/110165
	PR tree-optimization/110166

gcc/ChangeLog:

	* match.pd (zero_one_valued_p): Don't accept
	signed 1-bit integers.

gcc/testsuite/ChangeLog:

	* gcc.c-torture/execute/pr110165-1.c: New test.
	* gcc.c-torture/execute/pr110166-1.c: New test.
parent 45b7da5f
No related branches found
No related tags found
No related merge requests found
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