64 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT3; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC4 5define void @non_recursive_asm_fn() #0 {6; CHECK: Function Attrs: norecurse7; CHECK-LABEL: define {{[^@]+}}@non_recursive_asm_fn8; CHECK-SAME: () #[[ATTR0:[0-9]+]] {9; CHECK-NEXT: entry:10; CHECK-NEXT: call void asm sideeffect "barrier.sync $011; CHECK-NEXT: ret void12;13entry:14 call void asm sideeffect "barrier.sync $0;", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1)15 ret void16}17 18define void @non_recursive_asm_cs() {19; CHECK: Function Attrs: norecurse20; CHECK-LABEL: define {{[^@]+}}@non_recursive_asm_cs21; CHECK-SAME: () #[[ATTR1:[0-9]+]] {22; CHECK-NEXT: entry:23; CHECK-NEXT: call void asm sideeffect "barrier.sync $024; CHECK-NEXT: ret void25;26entry:27 call void asm sideeffect "barrier.sync $0;", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1) #028 ret void29}30 31define void @non_recursive_asm_no_sideffect() {32; CHECK: Function Attrs: norecurse33; CHECK-LABEL: define {{[^@]+}}@non_recursive_asm_no_sideffect34; CHECK-SAME: () #[[ATTR1]] {35; CHECK-NEXT: entry:36; CHECK-NEXT: call void asm "foobar37; CHECK-NEXT: ret void38;39entry:40 call void asm "foobar;", ""()41 ret void42}43 44define void @recursive_asm() {45; CHECK-LABEL: define {{[^@]+}}@recursive_asm() {46; CHECK-NEXT: entry:47; CHECK-NEXT: call void asm sideeffect "barrier.sync $048; CHECK-NEXT: ret void49;50entry:51 call void asm sideeffect "barrier.sync $0;", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 1)52 ret void53}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