[PATCH] D61144: [LoopIdiomRecognize] BCmp loop idiom recognition

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 14:03:02 PDT 2019


nikic added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:2129
+  // we'd want to compare more bytes than could be represented by size_t, But
+  // allocation functions also take size_t. So how'd you produce such buffer?
+  NBytes = SE->getMulExpr(
----------------
Is this kind reasoning legal on the level of LLVM IR? Especially if no inbounds GEPs are involved, aren't we just dealing in raw memory and there isn't necessary any object with representable size involved?

(Context: Wondering about this in https://reviews.llvm.org/D61934#inline-559489 and your comment seems like a plausible explanation.)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61144/new/

https://reviews.llvm.org/D61144





More information about the llvm-commits mailing list