[llvm-bugs] [Bug 49984] New: SimplifyLibCalls doesn't handle attributes on call sites well
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 16 00:04:34 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49984
Bug ID: 49984
Summary: SimplifyLibCalls doesn't handle attributes on call
sites well
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: jdoerfert at anl.gov
CC: david.bolvansky at gmail.com, florian_hahn at apple.com,
listmail at philipreames.com, llvm-bugs at lists.llvm.org
When we have an attribute on a call site that is changed, SimplifyLibCalls
causes an assertion. The code shows one example, others are likely.
Test taken from `0c0de794f1affc7460eb90626b8483e4a0cbde6c`:
https://godbolt.org/z/vG7acndfz
```
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
@null = constant [1 x i8] zeroinitializer
define i8* @test3(i8* %dst, i32 %n) {
%src = getelementptr [1 x i8], [1 x i8]* @null, i32 0, i32 0
%ret = call i8* @strncpy(i8* align(16) noalias nonnull %dst, i8* nonnull
%src, i32 5)
ret i8* %ret
}
declare i8* @strncpy(i8*, i8*, i32)
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210416/03fd1e68/attachment.html>
More information about the llvm-bugs
mailing list