[all-commits] [llvm/llvm-project] 3e7403: Revert "[SLC] sprintf(dst, "%s", str) -> strcpy(ds...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Fri Aug 14 23:39:20 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3e7403a1346f9644511170e0b29b5adf68996309
https://github.com/llvm/llvm-project/commit/3e7403a1346f9644511170e0b29b5adf68996309
Author: Martin Storsjö <martin at martin.st>
Date: 2020-08-15 (Sat, 15 Aug 2020)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
M llvm/test/Transforms/InstCombine/2010-05-30-memcpy-Struct.ll
M llvm/test/Transforms/InstCombine/sprintf-1.ll
Log Message:
-----------
Revert "[SLC] sprintf(dst, "%s", str) -> strcpy(dst, str)"
This reverts commit 6dbf0cfcf789365493f70ae69df8a7a59be41c75.
That commit caused failed assertions, e.g. like this:
$ cat sprintf-strcpy.c
char *ptr; void func(void) { ptr += sprintf(ptr, "%s", ""); }
$ clang -c sprintf-strcpy.c -O2 -target x86_64-linux-gnu
clang: ../lib/IR/Value.cpp:473: void llvm::Value::doRAUW(llvm::Value*,
llvm::Value::ReplaceMetadataUses): Assertion `New->getType() ==
getType() && "replaceAllUses of value with new value of different
type!"' failed.
More information about the All-commits
mailing list