[PATCH] D35035: [InstCombine] Prevent memcpy generation for small data size
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 13:56:31 PDT 2017
hiraditya added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:202-203
+ unsigned LargestInt = DL.getLargestLegalIntTypeSizeInBits();
+ if (LargestInt == 0)
+ LargestInt = 32;
+
----------------
spatel wrote:
> Why 32? I'm not sure what it means if there are no legal types in the DL. Please add a code comment to explain.
> Why 32?
32 because we want to default to 8, same as the previous behavior before this patch.
> I'm not sure what it means if there are no legal types in the DL. Please add a code comment to explain.
For example, in test cases when the target datalayout is not specified, DL.getLargestLegalIntTypeSizeInBits() returns 0.
https://reviews.llvm.org/D35035
More information about the llvm-commits
mailing list