Skip to content
Commit 2b950962 authored by Serguei Katkov's avatar Serguei Katkov
Browse files

[GuardWidening] Fix the crash while replacing the users of poison.

When we replace poison with freeze poison it might appear
that user of poison is a constant (for example vector constant).

In this case we will get that constant will get non-constant operand.

Moreover replacing poison and GlobalValue everywhere in module seems
to be overkill. So the solution will be just make a replacement
only in instructions we visited (contributing to hoisted condition).
Moreover if user of posion is constant, this constant also should need
a freeze and it does not make sense to replace poison with frozen version,
just freeze another constant.

Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D147429
parent 6afe9721
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment