[PATCH] D67679: [SLC] Convert some strndup calls to strdup calls
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 19:54:20 PDT 2019
jdoerfert added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:4226
if (isAllocLikeFn(&Call, &TLI))
- return visitAllocSite(Call);
+ if (Instruction *I = visitAllocSite(Call))
+ return I;
----------------
xbolva00 wrote:
> sight, this breaks things (eg. zstd build)
Why ;) ?
================
Comment at: test/Transforms/InstCombine/strndup.ll:21
+; CHECK-LABEL: @test2(
+; CHECK-NEXT: [[RET:%.*]] = call i8* @strndup(i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @hello, i64 0, i64 0), i32 4)
+; CHECK-NEXT: ret i8* [[RET]]
----------------
Why don't we get a `dereferenceable_or_null(4)` here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67679/new/
https://reviews.llvm.org/D67679
More information about the llvm-commits
mailing list