[SCEV] Preserve NSW for AddRec multiplied by -1 if it cannot be signed minimum
This preserves NSW flag for AddRecs multiplied by -1 if we can prove via constant ranges that the AddRec cannot be signed minimum. An explanation: Let M be signed minimum. If AddRec's range contains M, then M * (-1) will stay M and (M + 1) * (-1) will be signed maximum, so we get a signed overflow. In all other cases if an AddRec didn't signed overflow, then AddRec * (-1) wouldn't too. Differential Revision: https://reviews.llvm.org/D148084
parent
c97b7bcf
Please register or sign in to comment