mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 18:42:46 +02:00
[Tests] Add missing willreturn attributes (NFC)
To retain the spirit of these tests after an upcoming change to mayHaveSideEffect(), add willreturn attributes to a number of functions.
This commit is contained in:
parent
01312db09d
commit
7efd091a0c
@ -157,6 +157,6 @@ else: ; preds = %postinvoke
|
||||
|
||||
declare void @may_throw()
|
||||
|
||||
declare i32 @pure_computation() nounwind argmemonly readonly
|
||||
declare i32 @pure_computation() nounwind argmemonly readonly willreturn
|
||||
|
||||
declare i32 @__CxxFrameHandler3(...)
|
||||
|
@ -3,7 +3,7 @@
|
||||
; RUN: opt < %s -basic-aa -licm -S -enable-mssa-loop-dependency=true -verify-memoryssa | FileCheck %s
|
||||
|
||||
|
||||
declare i32 @strlen(i8*) readonly nounwind
|
||||
declare i32 @strlen(i8*) readonly nounwind willreturn
|
||||
|
||||
declare void @foo()
|
||||
|
||||
@ -27,7 +27,7 @@ Out: ; preds = %Loop
|
||||
ret i32 %A
|
||||
}
|
||||
|
||||
declare double @sin(double) readnone nounwind
|
||||
declare double @sin(double) readnone nounwind willreturn
|
||||
|
||||
; Sink readnone function out of loop with unknown memory behavior.
|
||||
define double @test2(double %X) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -sccp -loop-deletion -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
|
||||
|
||||
declare double @sqrt(double) readnone nounwind
|
||||
declare double @sqrt(double) readnone nounwind willreturn
|
||||
%empty = type {}
|
||||
declare %empty @has_side_effects()
|
||||
|
||||
|
@ -59,7 +59,7 @@ define internal i8* @side_effects(i8 %v) {
|
||||
}
|
||||
|
||||
; The call to this function is removed, so the return value must be zapped
|
||||
define internal i8* @no_side_effects(i8 %v) readonly nounwind {
|
||||
define internal i8* @no_side_effects(i8 %v) readonly nounwind willreturn {
|
||||
; CHECK-LABEL: define {{[^@]+}}@no_side_effects
|
||||
; CHECK-SAME: (i8 [[V:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
; CHECK-NEXT: ret i8* undef
|
||||
|
@ -15,7 +15,7 @@ entry:
|
||||
ret i32 %call2
|
||||
}
|
||||
|
||||
define internal i32 @wwrite(i64 %i) nounwind readnone {
|
||||
define internal i32 @wwrite(i64 %i) nounwind readnone willreturn {
|
||||
; CHECK-LABEL: @wwrite(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: br label [[SW_DEFAULT:%.*]]
|
||||
@ -36,4 +36,4 @@ return:
|
||||
}
|
||||
|
||||
; CHECK: attributes #0 = { noreturn nounwind }
|
||||
; CHECK: attributes #1 = { nounwind readnone }
|
||||
; CHECK: attributes #1 = { nounwind readnone willreturn }
|
||||
|
@ -15,7 +15,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
|
||||
; This load can be moved above the call because the function won't write to it
|
||||
; and the call has no side effects.
|
||||
define fastcc i32 @raise_load_1(i32* %a_arg, i32 %a_len_arg, i32 %start_arg) nounwind readonly {
|
||||
define fastcc i32 @raise_load_1(i32* %a_arg, i32 %a_len_arg, i32 %start_arg) nounwind readonly willreturn {
|
||||
; CHECK-LABEL: @raise_load_1(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: br label [[TAILRECURSE:%.*]]
|
||||
@ -99,7 +99,7 @@ recurse: ; preds = %else
|
||||
|
||||
; This load can be safely moved above the call (even though it's from an
|
||||
; extern_weak global) because the call has no side effects.
|
||||
define fastcc i32 @raise_load_3(i32* %a_arg, i32 %a_len_arg, i32 %start_arg) nounwind readonly {
|
||||
define fastcc i32 @raise_load_3(i32* %a_arg, i32 %a_len_arg, i32 %start_arg) nounwind readonly willreturn {
|
||||
; CHECK-LABEL: @raise_load_3(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: br label [[TAILRECURSE:%.*]]
|
||||
|
Loading…
Reference in New Issue
Block a user