mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 05:56:05 +00:00

This revision adds support for canonicalizing the following: ``` cond_br %cond, ^bb1(A, ..., N), ^bb1(A, ..., N) br ^bb1(A, ..., N) ``` If the operands to the successor are different and the cond_br is the only predecessor, we emit selects for the branch operands. ``` cond_br %cond, ^bb1(A), ^bb1(B) %select = select %cond, A, B br ^bb1(%select) ``` Differential Revision: https://reviews.llvm.org/D78682