[SimplifyCFG] Replace condition value when threading
authorNikita Popov <npopov@redhat.com>
Fri, 29 Apr 2022 07:48:21 +0000 (09:48 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 29 Apr 2022 07:50:27 +0000 (09:50 +0200)
commit884e9a877b378f5bf03f3c85a25b7a139ef6c8d8
tree430226c036bb1d9cd64cbb0ce523540ef8c2776e
parent6830ebb07eb9065dca0215e5ae6b22a24d35a745
[SimplifyCFG] Replace condition value when threading

Replace the condition value with the known constant value on the
threaded edge. This happens implicitly with phi threading because
we replace with the incoming value, but not for non-phi threading.
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/jump-threading.ll