]> git.ipfire.org Git - thirdparty/gcc.git/commit
MATCH: Fix zero_one_valued_p's convert pattern
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 12 Nov 2023 04:33:28 +0000 (20:33 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Mon, 4 Dec 2023 17:30:53 +0000 (09:30 -0800)
commit886f256ce3be4aa85f30af88558f0dfcb8003300
treed36a298aa209cd6aa3c491595293c94f6b8b3f10
parentb544ec681bdc9c48587d2e014f9559674097738a
MATCH: Fix zero_one_valued_p's convert pattern

While working on PR 111972, I was getting a regression
due to zero_one_valued_p matching a signed 1 bit integer
when it came to convert. This patch fixes that by checking
the outer type too.

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

gcc/ChangeLog:

* match.pd (zero_one_valued_p): For convert
make sure type is not a signed 1-bit integer.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/match.pd