[SCCP] Only handle unknown lattice values in resolvedUndefsIn()
authorNikita Popov <npopov@redhat.com>
Tue, 21 Jun 2022 08:34:41 +0000 (10:34 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 1 Jul 2022 07:14:37 +0000 (09:14 +0200)
commit9b994593cc2aec4c4979400ec747965bd3823bc0
tree0903873ce603397cca257bd1100ef2405cdae5c0
parent4a782252127761b60d33e74f9d9acb0aad6f742f
[SCCP] Only handle unknown lattice values in resolvedUndefsIn()

This is a minor refinement of resolvedUndefsIn(), mostly for clarity.
If the value of an instruction is undef, then that's already a legal
final result -- we can safely rauw such an instruction with undef.
We only need to mark unknown values as overdefined, as that's the
result we get for an instruction that has not been processed because
it has an undef operand.

Differential Revision: https://reviews.llvm.org/D128251
llvm/lib/Transforms/Utils/SCCPSolver.cpp
llvm/test/Transforms/SCCP/PR26044.ll
llvm/test/Transforms/SCCP/ipsccp-phi-one-pred-dead.ll