• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes
2; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
3; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
4; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
5; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
6
7; ArgumentPromotion should preserve the default function address space
8; from the data layout.
9
10target datalayout = "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8"
11
12@g = common global i32 0, align 4
13
14define i32 @bar() {
15; CHECK: Function Attrs: noreturn
16; CHECK-LABEL: define {{[^@]+}}@bar
17; CHECK-SAME: () addrspace(1) [[ATTR0:#.*]] {
18; CHECK-NEXT:  entry:
19; CHECK-NEXT:    [[CALL:%.*]] = call addrspace(1) i32 @foo() [[ATTR0]]
20; CHECK-NEXT:    unreachable
21;
22
23entry:
24  %call = call i32 @foo(i32* @g)
25  ret i32 %call
26}
27
28define internal i32 @foo(i32*) {
29; CHECK: Function Attrs: noreturn
30; CHECK-LABEL: define {{[^@]+}}@foo
31; CHECK-SAME: () addrspace(1) [[ATTR0]] {
32; CHECK-NEXT:  entry:
33; CHECK-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
34; CHECK-NEXT:    call addrspace(0) void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()
35; CHECK-NEXT:    unreachable
36;
37entry:
38  %retval = alloca i32, align 4
39  call void asm sideeffect "ldr r0, [r0] \0Abx lr        \0A", ""()
40  unreachable
41}
42
43