[InstCombine] tmp alloca bypass: ensure that the replacement dominates all alloca uses
After 077bff39, isDereferenceableForAllocaSize() can recurse into selects, which is causing a problem for the new test case, reduced from https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20210412/904154.html because the replacement (the select) is defined after the first use of an alloca, so we'd end up with a verifier error. Now, this new check is too restrictive. We likely can handle *some* cases, by trying to sink all uses of an alloca to after the the def.
Loading
Please register or sign in to comment