[SCEV] Use backedge SCEV of PHI only if its input is loop invariant
For the PHI node %1 = phi [%A, %entry], [%X, %latch] it is incorrect to use SCEV of backedge val %X as an exit value of PHI unless %X is loop invariant. This is because exit value of %1 is value of %X at one-before-last iteration of the loop. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D73181
Loading
Please register or sign in to comment