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

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 21:37:54 PDT 2016


sanjoy requested changes to this revision.
sanjoy added a comment.
This revision now requires changes to proceed.

Please add some test cases showing what specific cases you're trying to fix.  Generally I agree with Philip's reasoning above -- this fix seems somewhat ad-hoc, if we _can_ prove that the narrow iv is positive, we should be able to take opportunistically pretend it was a signed or unsigned extension on a case by case basis (and get the best of both worlds).


https://reviews.llvm.org/D24280





More information about the llvm-commits mailing list