]> granicus.if.org Git - clang/commitdiff
[FunctionAttrs] Annotate "willreturn" for intrinsics
authorHideto Ueno <uenoku.tokotoko@gmail.com>
Sun, 28 Jul 2019 06:09:56 +0000 (06:09 +0000)
committerHideto Ueno <uenoku.tokotoko@gmail.com>
Sun, 28 Jul 2019 06:09:56 +0000 (06:09 +0000)
Summary:
In D62801, new function attribute `willreturn` was introduced. In short, a function with `willreturn` is guaranteed to come back to the call site(more precise definition is in LangRef).

In this patch, willreturn is annotated for LLVM intrinsics.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: jvesely, nhaehnle, sstefan1, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367184 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/libcalls.c

index 1b314f777b4ce6bb73d8df4a0c93929a16c5e29e..699dc78eac63483388922ce6bcb54724a9f1ff1d 100644 (file)
@@ -124,4 +124,4 @@ void test_builtins(double d, float f, long double ld) {
 }
 
 // CHECK-NO-DAG: attributes [[NUW_RN]] = { nounwind readnone{{.*}} }
-// CHECK-NO-DAG: attributes [[NUW_RNI]] = { nounwind readnone speculatable }
+// CHECK-NO-DAG: attributes [[NUW_RNI]] = { nounwind readnone speculatable willreturn }