PHIOPT: Value-replacement check undef
commita30d2e6bd0b965e7687f58530a767a3c3b079158
authorAndrew Pinski <quic_apinski@quicinc.com>
Mon, 29 Apr 2024 03:21:02 +0000 (28 20:21 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Tue, 30 Apr 2024 16:11:55 +0000 (30 09:11 -0700)
tree526b9e2f4da08b9b37631449c7fdc46673e5a7fb
parent611815e0233302e1fcccca113e6f865fa450b7ae
PHIOPT: Value-replacement check undef

While moving value replacement part of PHIOPT over
to use match-and-simplify, I ran into the case where
we would have an undef use that was conditional become
unconditional. This prevents that. I can't remember at this
point what the testcase was though.

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

gcc/ChangeLog:

* tree-ssa-phiopt.cc (value_replacement): Reject undef variables
so they don't become unconditional used.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/tree-ssa-phiopt.cc