[PATCH] D61144: [LoopIdiomRecognize] BCmp loop idiom recognition
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 14:27:19 PDT 2019
lebedev.ri marked an inline comment as done.
lebedev.ri 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(
----------------
nikic wrote:
> 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.)
I don't have an answer.
The obvious alternative would be to do saturating multiplication, i guess?
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