|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
|
2 |
| -; RUN: opt -passes=attributor -aa-pipeline='basic-aa' -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=6 -S < %s | FileCheck %s |
| 2 | +; RUN: opt -attributor -attributor-manifest-internal -attributor-disable=false -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -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-disable=false -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -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 -attributor-manifest-internal -attributor-disable=false -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-disable=false -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 |
3 | 6 |
|
4 | 7 | define internal i32 @deref(i32* %x) nounwind {
|
5 |
| -; CHECK-LABEL: define {{[^@]+}}@deref |
6 |
| -; CHECK-SAME: (i32 [[TMP0:%.*]]) |
7 |
| -; CHECK-NEXT: entry: |
8 |
| -; CHECK-NEXT: [[X_PRIV:%.*]] = alloca i32 |
9 |
| -; CHECK-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]] |
10 |
| -; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4 |
11 |
| -; CHECK-NEXT: ret i32 [[TMP2]] |
| 8 | +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@deref |
| 9 | +; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) |
| 10 | +; IS__TUNIT_OPM-NEXT: entry: |
| 11 | +; IS__TUNIT_OPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4 |
| 12 | +; IS__TUNIT_OPM-NEXT: ret i32 [[TMP2]] |
| 13 | +; |
| 14 | +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@deref |
| 15 | +; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) |
| 16 | +; IS__TUNIT_NPM-NEXT: entry: |
| 17 | +; IS__TUNIT_NPM-NEXT: [[X_PRIV:%.*]] = alloca i32 |
| 18 | +; IS__TUNIT_NPM-NEXT: store i32 [[TMP0]], i32* [[X_PRIV]] |
| 19 | +; IS__TUNIT_NPM-NEXT: [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4 |
| 20 | +; IS__TUNIT_NPM-NEXT: ret i32 [[TMP2]] |
| 21 | +; |
| 22 | +; IS__CGSCC____-LABEL: define {{[^@]+}}@deref |
| 23 | +; IS__CGSCC____-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) |
| 24 | +; IS__CGSCC____-NEXT: entry: |
| 25 | +; IS__CGSCC____-NEXT: [[TMP2:%.*]] = load i32, i32* [[X]], align 4 |
| 26 | +; IS__CGSCC____-NEXT: ret i32 [[TMP2]] |
12 | 27 | ;
|
13 | 28 | entry:
|
14 | 29 | %tmp2 = load i32, i32* %x, align 4
|
15 | 30 | ret i32 %tmp2
|
16 | 31 | }
|
17 | 32 |
|
18 | 33 | define i32 @f(i32 %x) {
|
19 |
| -; CHECK-LABEL: define {{[^@]+}}@f |
20 |
| -; CHECK-SAME: (i32 [[X:%.*]]) |
21 |
| -; CHECK-NEXT: entry: |
22 |
| -; CHECK-NEXT: [[X_ADDR:%.*]] = alloca i32 |
23 |
| -; CHECK-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 |
24 |
| -; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 1 |
25 |
| -; CHECK-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) |
26 |
| -; CHECK-NEXT: ret i32 [[TMP1]] |
| 34 | +; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f |
| 35 | +; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) |
| 36 | +; IS__TUNIT_OPM-NEXT: entry: |
| 37 | +; IS__TUNIT_OPM-NEXT: [[X_ADDR:%.*]] = alloca i32 |
| 38 | +; IS__TUNIT_OPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 |
| 39 | +; IS__TUNIT_OPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree nonnull readonly align 4 dereferenceable(4) [[X_ADDR]]) |
| 40 | +; IS__TUNIT_OPM-NEXT: ret i32 [[TMP1]] |
| 41 | +; |
| 42 | +; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f |
| 43 | +; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) |
| 44 | +; IS__TUNIT_NPM-NEXT: entry: |
| 45 | +; IS__TUNIT_NPM-NEXT: [[X_ADDR:%.*]] = alloca i32 |
| 46 | +; IS__TUNIT_NPM-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 |
| 47 | +; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 1 |
| 48 | +; IS__TUNIT_NPM-NEXT: [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) |
| 49 | +; IS__TUNIT_NPM-NEXT: ret i32 [[TMP1]] |
| 50 | +; |
| 51 | +; IS__CGSCC____-LABEL: define {{[^@]+}}@f |
| 52 | +; IS__CGSCC____-SAME: (i32 [[X:%.*]]) |
| 53 | +; IS__CGSCC____-NEXT: entry: |
| 54 | +; IS__CGSCC____-NEXT: [[X_ADDR:%.*]] = alloca i32 |
| 55 | +; IS__CGSCC____-NEXT: store i32 [[X]], i32* [[X_ADDR]], align 4 |
| 56 | +; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @deref(i32* noalias nofree nonnull readonly align 4 dereferenceable(4) [[X_ADDR]]) |
| 57 | +; IS__CGSCC____-NEXT: ret i32 [[TMP1]] |
27 | 58 | ;
|
28 | 59 | entry:
|
29 | 60 | %x_addr = alloca i32
|
|
0 commit comments