[PATCH] D24280: [IndVarSimplify] Prefer sext over zext when widening IV if it is non-negative and has a GEP user

Li Huang via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 17:17:10 PDT 2016


lihuang added a comment.

Hi Philip, Sanjoy,

Thank you for the suggestions. getWideRecurrence gives a zero-extended SCEV when IsSigned is false. We could also change it to return a sign-extended SCEV when value being extended is known non-negative.

I agree that we should canonicalize on one of the extends when the value being extended is non-negative.


https://reviews.llvm.org/D24280





More information about the llvm-commits mailing list