[SimplifyCFG] FoldBranchToCommonDest(): temporairly put back restrictions on...
[SimplifyCFG] FoldBranchToCommonDest(): temporairly put back restrictions on liveout uses of bonus instructions (PR48450) Even though d3820514 was mostly a correct fix for the external non-PHI users, it's not a *generally* correct fix, because the 'placeholder' values in those trivial PHI's we create shouldn't be *always* 'undef', but the PHI itself for the backedges, else we end up with wrong value, as the `@pr48450_2` test shows. But we can't just do that, because we can't check that the PHI can be it's own incoming value when coming from certain predecessor, because we don't have a dominator tree. So until we can address this correctness problem properly, ensure that we don't perform the transformation if there are such problematic external uses. Making dominator tree available there is going to be involved, since `-simplifycfg` pass currently does not preserve/update domtree...
Loading
Please sign in to comment