Revert "[SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y)"
authorKrasimir Georgiev <krasimir@google.com>
Tue, 17 Sep 2019 14:15:23 +0000 (14:15 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Tue, 17 Sep 2019 14:15:23 +0000 (14:15 +0000)
commitbdff164e0e07224948244ddc9bce5fd7052e09b9
tree6eedba88f906e633f1604f26b41b2db1be8c3247
parent68b0977e646abda3254a1eed123f75183b4aad3d
Revert "[SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y)"

Summary:
This reverts commit r372101.

Causes ASAN build bot failures:

http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/14176
From http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/14176/steps/64-bit%20check-asan/logs/stdio:

```
[ RUN      ] AddressSanitizer.StrNCatOOBTest
/home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/tests/asan_str_test.cpp:462: Failure
Death test: strncat(to - 1, from, 0)
    Result: failed to die.
```

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67658

llvm-svn: 372125
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/strncpy-1.ll