MatzeB added a subscriber: MatzeB. MatzeB added a comment. Without looking at anything in the patch. For the example given, wouldn't it be enough to create some DAGCombine style rules: x = PHI(OP(y, c), OP(z, c)) => x = op(PHI(z, z), c) ? Repository: rL LLVM https://reviews.llvm.org/D24805