[ValueTracking] Make isGuaranteedNotToBeUndef() more precise (#76160)

Currently isGuaranteedNotToBeUndef() is the same as
isGuaranteedNotToBeUndefOrPoison(). This function is used in places
where we only care about undef (due to multi-use issues), not poison.

Make it more precise by only considering instructions that can create
undef (like loads or call), and ignore those that can only create
poison. In particular, we can ignore poison-generating flags.

This means that inferring more flags has less chance to pessimize other
transforms.

GitOrigin-RevId: a134abf4be132cfff2fc5132d6226db919c0865b
2 files changed