[llvm] 36c8621 - [BuildLibCalls] Add more noundef to library functions

Juneyoung Lee via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 04:33:50 PDT 2020


Author: Juneyoung Lee
Date: 2020-09-09T20:33:35+09:00
New Revision: 36c8621638d18c830efe2c6a2a6d0a0338b0f79d

URL: https://github.com/llvm/llvm-project/commit/36c8621638d18c830efe2c6a2a6d0a0338b0f79d
DIFF: https://github.com/llvm/llvm-project/commit/36c8621638d18c830efe2c6a2a6d0a0338b0f79d.diff

LOG: [BuildLibCalls] Add more noundef to library functions

This patch follows D85345 and adds more noundef attributes to return values/arguments of library functions
that are mostly about accessing the file system or processes.

A few functions like `chmod` or `times` use typedef `mode_t` and `clock_t`.
They are neither struct nor union, so they cannot contain undef even if they're lowered to iN in IR. So, it is fine to add noundef to them.

- clock_t's actual type is size_t (C17, 7.27.1.3), so it isn't struct or union.

- For mode_t, either int or long is used in practice because programmers use bit manipulation. So, I think it is okay that it's never aggregate in practice.

After this patch, the remaining library functions are those that eagerly participate in optimizations: they can be removed, reordered, or
introduced by a transformation from primitive IR operations.
For them, a few testings is needed, since it may not be valid to add noundef anymore even if C standard says it's okay.

Reviewed By: jdoerfert

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

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/BuildLibCalls.cpp
    llvm/test/Transforms/InferFunctionAttrs/annotate.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
index d4d2957efab4..09ed68a5f678 100644
--- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -262,6 +262,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     return Changed;
   case LibFunc_setbuf:
   case LibFunc_setvbuf:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
@@ -274,6 +275,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     return Changed;
   case LibFunc_stat:
   case LibFunc_statvfs:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 1);
@@ -304,6 +306,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setOnlyReadsMemory(F, 2);
     return Changed;
   case LibFunc_setitimer:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 1);
     Changed |= setDoesNotCapture(F, 2);
@@ -311,6 +314,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     return Changed;
   case LibFunc_system:
     // May throw; "system" is a valid pthread cancellation point.
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
@@ -369,11 +373,13 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setRetDoesNotAlias(F);
     return Changed;
   case LibFunc_mkdir:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_mktime:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
@@ -395,11 +401,13 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
   case LibFunc_rmdir:
   case LibFunc_remove:
   case LibFunc_realpath:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_rename:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 1);
@@ -407,6 +415,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setOnlyReadsMemory(F, 1);
     return Changed;
   case LibFunc_readlink:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 1);
@@ -445,6 +454,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     return Changed;
   case LibFunc_chmod:
   case LibFunc_chown:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
@@ -452,6 +462,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
   case LibFunc_ctermid:
   case LibFunc_clearerr:
   case LibFunc_closedir:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
@@ -464,6 +475,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
   case LibFunc_access:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
@@ -583,6 +595,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
   case LibFunc_getlogin_r:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
@@ -592,6 +605,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
   case LibFunc_getenv:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setOnlyReadsMemory(F);
     Changed |= setDoesNotCapture(F, 0);
@@ -603,10 +617,12 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotThrow(F);
     return Changed;
   case LibFunc_getitimer:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 1);
     return Changed;
   case LibFunc_getpwnam:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
@@ -617,21 +633,25 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotCapture(F, 1);
     return Changed;
   case LibFunc_uname:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
   case LibFunc_unlink:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_unsetenv:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_utime:
   case LibFunc_utimes:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 1);
@@ -669,6 +689,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotThrow(F);
     return Changed;
   case LibFunc_popen:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setRetDoesNotAlias(F);
     Changed |= setDoesNotCapture(F, 0);
@@ -677,6 +698,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setOnlyReadsMemory(F, 1);
     return Changed;
   case LibFunc_pclose:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
@@ -733,16 +755,19 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_opendir:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setRetDoesNotAlias(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_tmpfile:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setRetDoesNotAlias(F);
     return Changed;
   case LibFunc_times:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
@@ -754,18 +779,22 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotAccessMemory(F);
     return Changed;
   case LibFunc_lstat:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 1);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_lchown:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setOnlyReadsMemory(F, 0);
     return Changed;
   case LibFunc_qsort:
     // May throw; places call through function pointer.
+    // Cannot give undef pointer/size
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotCapture(F, 3);
     return Changed;
   case LibFunc_dunder_strdup:
@@ -799,6 +828,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
   case LibFunc_stat64:
   case LibFunc_lstat64:
   case LibFunc_statvfs64:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 1);
@@ -828,6 +858,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     Changed |= setDoesNotCapture(F, 0);
     return Changed;
   case LibFunc_tmpfile64:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setRetDoesNotAlias(F);
     return Changed;
@@ -847,6 +878,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     // Currently some platforms have the restrict keyword on the arguments to
     // gettimeofday. To be conservative, do not add noalias to gettimeofday's
     // arguments.
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 1);
@@ -874,6 +906,7 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {
     return Changed;
   // int __nvvm_reflect(const char *)
   case LibFunc_nvvm_reflect:
+    Changed |= setRetAndArgsNoUndef(F);
     Changed |= setDoesNotAccessMemory(F);
     Changed |= setDoesNotThrow(F);
     return Changed;

diff  --git a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
index 85c6e35266b7..7f52bf771769 100644
--- a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
+++ b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll
@@ -11,7 +11,7 @@ declare i8* @_Znwm(i64)
 ; CHECK: declare noalias nonnull i8* @_Znwm(i64) [[G0]]
 
 declare i32 @__nvvm_reflect(i8*)
-; CHECK-NVPTX: declare i32 @__nvvm_reflect(i8*) [[G0:#[0-9]+]]
+; CHECK-NVPTX: declare noundef i32 @__nvvm_reflect(i8* noundef) [[G0:#[0-9]+]]
 ; CHECK-NVPTX: attributes [[G0]] = { nofree nounwind readnone }
 
 
@@ -163,7 +163,7 @@ declare float @__sinpif(float)
 ; CHECK: declare i32 @abs(i32) [[G0]]
 declare i32 @abs(i32)
 
-; CHECK: declare i32 @access(i8* nocapture readonly, i32) [[G1:#[0-9]+]]
+; CHECK: declare noundef i32 @access(i8* nocapture noundef readonly, i32 noundef) [[G1:#[0-9]+]]
 declare i32 @access(i8*, i32)
 
 ; CHECK: declare double @acos(double) [[G0]]
@@ -274,16 +274,16 @@ declare float @ceilf(float)
 ; CHECK: declare x86_fp80 @ceill(x86_fp80) [[G0]]
 declare x86_fp80 @ceill(x86_fp80)
 
-; CHECK: declare i32 @chmod(i8* nocapture readonly, i16 zeroext) [[G1]]
+; CHECK: declare noundef i32 @chmod(i8* nocapture noundef readonly, i16 noundef zeroext) [[G1]]
 declare i32 @chmod(i8*, i16 zeroext)
 
-; CHECK: declare i32 @chown(i8* nocapture readonly, i32, i32) [[G1]]
+; CHECK: declare noundef i32 @chown(i8* nocapture noundef readonly, i32 noundef, i32 noundef) [[G1]]
 declare i32 @chown(i8*, i32, i32)
 
-; CHECK: declare void @clearerr(%opaque* nocapture) [[G1]]
+; CHECK: declare void @clearerr(%opaque* nocapture noundef) [[G1]]
 declare void @clearerr(%opaque*)
 
-; CHECK: declare i32 @closedir(%opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @closedir(%opaque* nocapture noundef) [[G1]]
 declare i32 @closedir(%opaque*)
 
 ; CHECK: declare double @copysign(double, double) [[G0]]
@@ -313,7 +313,7 @@ declare x86_fp80 @coshl(x86_fp80)
 ; CHECK: declare x86_fp80 @cosl(x86_fp80) [[G0]]
 declare x86_fp80 @cosl(x86_fp80)
 
-; CHECK: declare i8* @ctermid(i8* nocapture) [[G1]]
+; CHECK: declare noundef i8* @ctermid(i8* nocapture noundef) [[G1]]
 declare i8* @ctermid(i8*)
 
 ; CHECK: declare double @exp(double) [[G0]]
@@ -520,22 +520,22 @@ declare i32 @getchar()
 ; CHECK: declare noundef i32 @getchar_unlocked() [[G1]]
 declare i32 @getchar_unlocked()
 
-; CHECK: declare i8* @getenv(i8* nocapture) [[G2]]
+; CHECK: declare noundef i8* @getenv(i8* nocapture noundef) [[G2]]
 declare i8* @getenv(i8*)
 
-; CHECK: declare i32 @getitimer(i32, %opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @getitimer(i32 noundef, %opaque* nocapture noundef) [[G1]]
 declare i32 @getitimer(i32, %opaque*)
 
-; CHECK: declare i32 @getlogin_r(i8* nocapture, i64) [[G1]]
+; CHECK: declare noundef i32 @getlogin_r(i8* nocapture noundef, i64 noundef) [[G1]]
 declare i32 @getlogin_r(i8*, i64)
 
-; CHECK: declare %opaque* @getpwnam(i8* nocapture readonly) [[G1]]
+; CHECK: declare noundef %opaque* @getpwnam(i8* nocapture noundef readonly) [[G1]]
 declare %opaque* @getpwnam(i8*)
 
 ; CHECK: declare noundef i8* @gets(i8* noundef) [[G1]]
 declare i8* @gets(i8*)
 
-; CHECK: declare i32 @gettimeofday(%opaque* nocapture, i8* nocapture) [[G1]]
+; CHECK: declare noundef i32 @gettimeofday(%opaque* nocapture noundef, i8* nocapture noundef) [[G1]]
 declare i32 @gettimeofday(%opaque*, i8*)
 
 ; CHECK: declare i32 @isascii(i32) [[G0]]
@@ -547,7 +547,7 @@ declare i32 @isdigit(i32)
 ; CHECK: declare i64 @labs(i64) [[G0]]
 declare i64 @labs(i64)
 
-; CHECK: declare i32 @lchown(i8* nocapture readonly, i32, i32) [[G1]]
+; CHECK: declare noundef i32 @lchown(i8* nocapture noundef readonly, i32 noundef, i32 noundef) [[G1]]
 declare i32 @lchown(i8*, i32, i32)
 
 ; CHECK: declare double @ldexp(double, i32) [[G0]]
@@ -607,10 +607,10 @@ declare float @logf(float)
 ; CHECK: declare x86_fp80 @logl(x86_fp80) [[G0]]
 declare x86_fp80 @logl(x86_fp80)
 
-; CHECK: declare i32 @lstat(i8* nocapture readonly, %opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @lstat(i8* nocapture noundef readonly, %opaque* nocapture noundef) [[G1]]
 declare i32 @lstat(i8*, %opaque*)
 
-; CHECK-LINUX: declare i32 @lstat64(i8* nocapture readonly, %opaque* nocapture) [[G1]]
+; CHECK-LINUX: declare noundef i32 @lstat64(i8* nocapture noundef readonly, %opaque* nocapture noundef) [[G1]]
 declare i32 @lstat64(i8*, %opaque*)
 
 ; CHECK: declare noalias i8* @malloc(i64) [[G1]]
@@ -642,10 +642,10 @@ declare i8* @memmove(i8*, i8*, i64)
 ; CHECK: declare i8* @memset(i8*, i32, i64) [[G0]]
 declare i8* @memset(i8*, i32, i64)
 
-; CHECK: declare i32 @mkdir(i8* nocapture readonly, i16 zeroext) [[G1]]
+; CHECK: declare noundef i32 @mkdir(i8* nocapture noundef readonly, i16 noundef zeroext) [[G1]]
 declare i32 @mkdir(i8*, i16 zeroext)
 
-; CHECK: declare i64 @mktime(%opaque* nocapture) [[G1]]
+; CHECK: declare noundef i64 @mktime(%opaque* nocapture noundef) [[G1]]
 declare i64 @mktime(%opaque*)
 
 ; CHECK: declare double @modf(double, double* nocapture) [[G1]]
@@ -672,16 +672,16 @@ declare i32 @open(i8*, i32, ...)
 ; CHECK-LINUX: declare noundef i32 @open64(i8* nocapture noundef readonly, i32 noundef, ...) [[G0]]
 declare i32 @open64(i8*, i32, ...)
 
-; CHECK: declare noalias %opaque* @opendir(i8* nocapture readonly) [[G1]]
+; CHECK: declare noalias noundef %opaque* @opendir(i8* nocapture noundef readonly) [[G1]]
 declare %opaque* @opendir(i8*)
 
-; CHECK: declare i32 @pclose(%opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @pclose(%opaque* nocapture noundef) [[G1]]
 declare i32 @pclose(%opaque*)
 
 ; CHECK: declare void @perror(i8* nocapture noundef readonly) [[G1]]
 declare void @perror(i8*)
 
-; CHECK: declare noalias %opaque* @popen(i8* nocapture readonly, i8* nocapture readonly) [[G1]]
+; CHECK: declare noalias noundef %opaque* @popen(i8* nocapture noundef readonly, i8* nocapture noundef readonly) [[G1]]
 declare %opaque* @popen(i8*, i8*)
 
 ; CHECK: declare i32 @posix_memalign(i8**, i64, i64) [[G0]]
@@ -717,13 +717,13 @@ declare i32 @puts(i8*)
 ; CHECK: declare noundef i64 @pwrite(i32 noundef, i8* nocapture noundef readonly, i64 noundef, i64 noundef) [[G0]]
 declare i64 @pwrite(i32, i8*, i64, i64)
 
-; CHECK: declare void @qsort(i8*, i64, i64, i32 (i8*, i8*)* nocapture) [[G0]]
+; CHECK: declare void @qsort(i8* noundef, i64 noundef, i64 noundef, i32 (i8*, i8*)* nocapture noundef) [[G0]]
 declare void @qsort(i8*, i64, i64, i32 (i8*, i8*)*)
 
 ; CHECK: declare noundef i64 @read(i32 noundef, i8* nocapture noundef, i64 noundef) [[G0]]
 declare i64 @read(i32, i8*, i64)
 
-; CHECK: declare i64 @readlink(i8* nocapture readonly, i8* nocapture, i64) [[G1]]
+; CHECK: declare noundef i64 @readlink(i8* nocapture noundef readonly, i8* nocapture noundef, i64 noundef) [[G1]]
 declare i64 @readlink(i8*, i8*, i64)
 
 ; CHECK: declare noalias i8* @realloc(i8* nocapture, i64) [[G3]]
@@ -732,13 +732,13 @@ declare i8* @realloc(i8*, i64)
 ; CHECK: declare i8* @reallocf(i8*, i64)
 declare i8* @reallocf(i8*, i64)
 
-; CHECK: declare i8* @realpath(i8* nocapture readonly, i8*) [[G1]]
+; CHECK: declare noundef i8* @realpath(i8* nocapture noundef readonly, i8* noundef) [[G1]]
 declare i8* @realpath(i8*, i8*)
 
-; CHECK: declare i32 @remove(i8* nocapture readonly) [[G1]]
+; CHECK: declare noundef i32 @remove(i8* nocapture noundef readonly) [[G1]]
 declare i32 @remove(i8*)
 
-; CHECK: declare i32 @rename(i8* nocapture readonly, i8* nocapture readonly) [[G1]]
+; CHECK: declare noundef i32 @rename(i8* nocapture noundef readonly, i8* nocapture noundef readonly) [[G1]]
 declare i32 @rename(i8*, i8*)
 
 ; CHECK: declare void @rewind(%opaque* nocapture noundef) [[G1]]
@@ -753,7 +753,7 @@ declare float @rintf(float)
 ; CHECK: declare x86_fp80 @rintl(x86_fp80) [[G0]]
 declare x86_fp80 @rintl(x86_fp80)
 
-; CHECK: declare i32 @rmdir(i8* nocapture readonly) [[G1]]
+; CHECK: declare noundef i32 @rmdir(i8* nocapture noundef readonly) [[G1]]
 declare i32 @rmdir(i8*)
 
 ; CHECK: declare double @round(double) [[G0]]
@@ -768,13 +768,13 @@ declare x86_fp80 @roundl(x86_fp80)
 ; CHECK: declare noundef i32 @scanf(i8* nocapture noundef readonly, ...) [[G1]]
 declare i32 @scanf(i8*, ...)
 
-; CHECK: declare void @setbuf(%opaque* nocapture, i8*) [[G1]]
+; CHECK: declare void @setbuf(%opaque* nocapture noundef, i8* noundef) [[G1]]
 declare void @setbuf(%opaque*, i8*)
 
-; CHECK: declare i32 @setitimer(i32, %opaque* nocapture readonly, %opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @setitimer(i32 noundef, %opaque* nocapture noundef readonly, %opaque* nocapture noundef) [[G1]]
 declare i32 @setitimer(i32, %opaque*, %opaque*)
 
-; CHECK: declare i32 @setvbuf(%opaque* nocapture, i8*, i32, i64) [[G1]]
+; CHECK: declare noundef i32 @setvbuf(%opaque* nocapture noundef, i8* noundef, i32 noundef, i64 noundef) [[G1]]
 declare i32 @setvbuf(%opaque*, i8*, i32, i64)
 
 ; CHECK: declare double @sin(double) [[G0]]
@@ -813,16 +813,16 @@ declare x86_fp80 @sqrtl(x86_fp80)
 ; CHECK: declare noundef i32 @sscanf(i8* nocapture noundef readonly, i8* nocapture noundef readonly, ...) [[G1]]
 declare i32 @sscanf(i8*, i8*, ...)
 
-; CHECK: declare i32 @stat(i8* nocapture readonly, %opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @stat(i8* nocapture noundef readonly, %opaque* nocapture noundef) [[G1]]
 declare i32 @stat(i8*, %opaque*)
 
-; CHECK-LINUX: declare i32 @stat64(i8* nocapture readonly, %opaque* nocapture) [[G1]]
+; CHECK-LINUX: declare noundef i32 @stat64(i8* nocapture noundef readonly, %opaque* nocapture noundef) [[G1]]
 declare i32 @stat64(i8*, %opaque*)
 
-; CHECK: declare i32 @statvfs(i8* nocapture readonly, %opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @statvfs(i8* nocapture noundef readonly, %opaque* nocapture noundef) [[G1]]
 declare i32 @statvfs(i8*, %opaque*)
 
-; CHECK-LINUX: declare i32 @statvfs64(i8* nocapture readonly, %opaque* nocapture) [[G1]]
+; CHECK-LINUX: declare noundef i32 @statvfs64(i8* nocapture noundef readonly, %opaque* nocapture noundef) [[G1]]
 declare i32 @statvfs64(i8*, %opaque*)
 
 ; CHECK: declare i8* @stpcpy(i8*, i8* nocapture readonly) [[G1]]
@@ -918,7 +918,7 @@ declare i64 @strtoull(i8*, i8**, i32)
 ; CHECK: declare i64 @strxfrm(i8* nocapture, i8* nocapture readonly, i64) [[G1]]
 declare i64 @strxfrm(i8*, i8*, i64)
 
-; CHECK: declare i32 @system(i8* nocapture readonly) [[G0]]
+; CHECK: declare noundef i32 @system(i8* nocapture noundef readonly) [[G0]]
 declare i32 @system(i8*)
 
 ; CHECK: declare double @tan(double) [[G0]]
@@ -939,13 +939,13 @@ declare x86_fp80 @tanhl(x86_fp80)
 ; CHECK: declare x86_fp80 @tanl(x86_fp80) [[G0]]
 declare x86_fp80 @tanl(x86_fp80)
 
-; CHECK: declare i64 @times(%opaque* nocapture) [[G1]]
+; CHECK: declare noundef i64 @times(%opaque* nocapture noundef) [[G1]]
 declare i64 @times(%opaque*)
 
-; CHECK: declare noalias %opaque* @tmpfile() [[G1]]
+; CHECK: declare noalias noundef %opaque* @tmpfile() [[G1]]
 declare %opaque* @tmpfile()
 
-; CHECK-LINUX: declare noalias %opaque* @tmpfile64() [[G1]]
+; CHECK-LINUX: declare noalias noundef %opaque* @tmpfile64() [[G1]]
 declare %opaque* @tmpfile64()
 
 ; CHECK: declare i32 @toascii(i32) [[G0]]
@@ -960,22 +960,22 @@ declare float @truncf(float)
 ; CHECK: declare x86_fp80 @truncl(x86_fp80) [[G0]]
 declare x86_fp80 @truncl(x86_fp80)
 
-; CHECK: declare i32 @uname(%opaque* nocapture) [[G1]]
+; CHECK: declare noundef i32 @uname(%opaque* nocapture noundef) [[G1]]
 declare i32 @uname(%opaque*)
 
 ; CHECK: declare noundef i32 @ungetc(i32 noundef, %opaque* nocapture noundef) [[G1]]
 declare i32 @ungetc(i32, %opaque*)
 
-; CHECK: declare i32 @unlink(i8* nocapture readonly) [[G1]]
+; CHECK: declare noundef i32 @unlink(i8* nocapture noundef readonly) [[G1]]
 declare i32 @unlink(i8*)
 
-; CHECK: declare i32 @unsetenv(i8* nocapture readonly) [[G1]]
+; CHECK: declare noundef i32 @unsetenv(i8* nocapture noundef readonly) [[G1]]
 declare i32 @unsetenv(i8*)
 
-; CHECK: declare i32 @utime(i8* nocapture readonly, %opaque* nocapture readonly) [[G1]]
+; CHECK: declare noundef i32 @utime(i8* nocapture noundef readonly, %opaque* nocapture noundef readonly) [[G1]]
 declare i32 @utime(i8*, %opaque*)
 
-; CHECK: declare i32 @utimes(i8* nocapture readonly, %opaque* nocapture readonly) [[G1]]
+; CHECK: declare noundef i32 @utimes(i8* nocapture noundef readonly, %opaque* nocapture noundef readonly) [[G1]]
 declare i32 @utimes(i8*, %opaque*)
 
 ; CHECK: declare noalias i8* @valloc(i64) [[G1]]


        


More information about the llvm-commits mailing list