[PATCH] D38085: Use the basic cost if a GEP is not used as addressing mode

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 12:03:20 PDT 2017


junbuml added inline comments.


================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:736
+      // other GEPs). Handling all such cases must be expensive to be performed
+      // in this function, so we stay conservative for now.
+      for (const User *U : GEP->users()) {
----------------
hfinkel wrote:
> I don't understand this comment. If there's a sext/zext, then it would be an operand of the GEP, not the other way around, no?
Yes, sext must be an operand of the GEP, not an user. Sorry for the confusion. Remove "sext" from the comment.


https://reviews.llvm.org/D38085





More information about the llvm-commits mailing list