1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals 2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT 3; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC 4 5define void @non_recursive_asm_fn() #0 { 6; CHECK: Function Attrs: norecurse 7; CHECK-LABEL: define {{[^@]+}}@non_recursive_asm_fn 8; CHECK-SAME: () #[[ATTR0:[0-9]+]] { 9; CHECK-NEXT: entry: 10; CHECK-NEXT: call void asm sideeffect "barrier.sync $0 11; CHECK-NEXT: ret void 12; 13entry: 14 call void asm sideeffect "barrier.sync $0;", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1) 15 ret void 16} 17 18define void @non_recursive_asm_cs() { 19; CHECK: Function Attrs: norecurse 20; CHECK-LABEL: define {{[^@]+}}@non_recursive_asm_cs 21; CHECK-SAME: () #[[ATTR1:[0-9]+]] { 22; CHECK-NEXT: entry: 23; CHECK-NEXT: call void asm sideeffect "barrier.sync $0 24; CHECK-NEXT: ret void 25; 26entry: 27 call void asm sideeffect "barrier.sync $0;", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1) #0 28 ret void 29} 30 31define void @non_recursive_asm_no_sideffect() { 32; CHECK: Function Attrs: norecurse 33; CHECK-LABEL: define {{[^@]+}}@non_recursive_asm_no_sideffect 34; CHECK-SAME: () #[[ATTR1]] { 35; CHECK-NEXT: entry: 36; CHECK-NEXT: call void asm "foobar 37; CHECK-NEXT: ret void 38; 39entry: 40 call void asm "foobar;", ""() 41 ret void 42} 43 44define void @recursive_asm() { 45; CHECK-LABEL: define {{[^@]+}}@recursive_asm() { 46; CHECK-NEXT: entry: 47; CHECK-NEXT: call void asm sideeffect "barrier.sync $0 48; CHECK-NEXT: ret void 49; 50entry: 51 call void asm sideeffect "barrier.sync $0;", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1) 52 ret void 53} 54 55attributes #0 = { "llvm.assume"="ompx_no_call_asm" } 56;. 57; CHECK: attributes #[[ATTR0]] = { norecurse "llvm.assume"="ompx_no_call_asm" } 58; CHECK: attributes #[[ATTR1]] = { norecurse } 59; CHECK: attributes #[[ATTR2:[0-9]+]] = { "llvm.assume"="ompx_no_call_asm" } 60;. 61;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: 62; CGSCC: {{.*}} 63; TUNIT: {{.*}} 64