Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals |
Johannes Doerfert | 3de06ff | 2021-03-01 17:04:49 -0600 | [diff] [blame] | 2 | ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -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=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM |
Arthur Eubanks | 5a8075e | 2020-07-28 17:57:21 -0700 | [diff] [blame] | 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 |
Johannes Doerfert | 7a8805f | 2020-04-17 21:09:16 -0500 | [diff] [blame] | 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 |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 6 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 7 | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" |
| 8 | declare void @f(i32) |
Arthur Eubanks | 670ec51 | 2020-03-16 12:32:36 -0700 | [diff] [blame] | 9 | declare token @llvm.call.preallocated.setup(i32) |
| 10 | declare i8* @llvm.call.preallocated.arg(token, i32) |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 11 | |
| 12 | ; Test1: Replace argument with constant |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 13 | ;. |
| 14 | ; CHECK: @[[S:[a-zA-Z0-9_$"\\.-]+]] = external global [[STRUCT_X:%.*]] |
| 15 | ;. |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 16 | define internal void @test1(i32 %a) { |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 17 | ; CHECK-LABEL: define {{[^@]+}}@test1() { |
Shinji Okumura | 555294d | 2020-08-30 05:34:24 +0900 | [diff] [blame] | 18 | ; CHECK-NEXT: tail call void @f(i32 noundef 1) |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 19 | ; CHECK-NEXT: ret void |
| 20 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 21 | tail call void @f(i32 %a) |
| 22 | ret void |
| 23 | } |
| 24 | |
| 25 | define void @test1_helper() { |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 26 | ; CHECK-LABEL: define {{[^@]+}}@test1_helper() { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 27 | ; CHECK-NEXT: tail call void @test1() |
| 28 | ; CHECK-NEXT: ret void |
| 29 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 30 | tail call void @test1(i32 1) |
| 31 | ret void |
| 32 | } |
| 33 | |
| 34 | ; TEST 2 : Simplify return value |
| 35 | define i32 @return0() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 36 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 37 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@return0 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 38 | ; IS__TUNIT____-SAME: () #[[ATTR1:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 39 | ; IS__TUNIT____-NEXT: ret i32 0 |
| 40 | ; |
| 41 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 42 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@return0 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 43 | ; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 44 | ; IS__CGSCC____-NEXT: ret i32 0 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 45 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 46 | ret i32 0 |
| 47 | } |
| 48 | |
| 49 | define i32 @return1() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 50 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 51 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@return1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 52 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 53 | ; IS__TUNIT____-NEXT: ret i32 1 |
| 54 | ; |
| 55 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 56 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@return1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 57 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 58 | ; IS__CGSCC____-NEXT: ret i32 1 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 59 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 60 | ret i32 1 |
| 61 | } |
| 62 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 63 | define i32 @test2_1(i1 %c) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 64 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
| 65 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 66 | ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 67 | ; IS__TUNIT____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] |
| 68 | ; IS__TUNIT____: if.true: |
| 69 | ; IS__TUNIT____-NEXT: [[RET0:%.*]] = add i32 0, 1 |
| 70 | ; IS__TUNIT____-NEXT: br label [[END:%.*]] |
| 71 | ; IS__TUNIT____: if.false: |
| 72 | ; IS__TUNIT____-NEXT: br label [[END]] |
| 73 | ; IS__TUNIT____: end: |
| 74 | ; IS__TUNIT____-NEXT: [[RET:%.*]] = phi i32 [ [[RET0]], [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ] |
| 75 | ; IS__TUNIT____-NEXT: ret i32 1 |
| 76 | ; |
| 77 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 78 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 79 | ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 80 | ; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] |
| 81 | ; IS__CGSCC____: if.true: |
| 82 | ; IS__CGSCC____-NEXT: [[RET0:%.*]] = add i32 0, 1 |
| 83 | ; IS__CGSCC____-NEXT: br label [[END:%.*]] |
| 84 | ; IS__CGSCC____: if.false: |
| 85 | ; IS__CGSCC____-NEXT: br label [[END]] |
| 86 | ; IS__CGSCC____: end: |
| 87 | ; IS__CGSCC____-NEXT: [[RET:%.*]] = phi i32 [ [[RET0]], [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ] |
| 88 | ; IS__CGSCC____-NEXT: ret i32 1 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 89 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 90 | br i1 %c, label %if.true, label %if.false |
| 91 | if.true: |
| 92 | %call = tail call i32 @return0() |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 93 | %ret0 = add i32 %call, 1 |
| 94 | br label %end |
| 95 | if.false: |
| 96 | %ret1 = tail call i32 @return1() |
| 97 | br label %end |
| 98 | end: |
| 99 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 100 | %ret = phi i32 [ %ret0, %if.true ], [ %ret1, %if.false ] |
| 101 | |
Hideto Ueno | cf312944 | 2020-01-15 15:25:52 +0900 | [diff] [blame] | 102 | ret i32 1 |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | |
| 106 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 107 | define i32 @test2_2(i1 %c) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 108 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
| 109 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 110 | ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 111 | ; IS__TUNIT____-NEXT: ret i32 1 |
| 112 | ; |
| 113 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 114 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 115 | ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 116 | ; IS__CGSCC____-NEXT: ret i32 1 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 117 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 118 | %ret = tail call i32 @test2_1(i1 %c) |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 119 | ret i32 %ret |
| 120 | } |
| 121 | |
| 122 | declare void @use(i32) |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 123 | define void @test3(i1 %c) { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 124 | ; CHECK-LABEL: define {{[^@]+}}@test3 |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 125 | ; CHECK-SAME: (i1 [[C:%.*]]) { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 126 | ; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] |
| 127 | ; CHECK: if.true: |
| 128 | ; CHECK-NEXT: br label [[END:%.*]] |
| 129 | ; CHECK: if.false: |
| 130 | ; CHECK-NEXT: br label [[END]] |
| 131 | ; CHECK: end: |
| 132 | ; CHECK-NEXT: [[R:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ] |
Shinji Okumura | 555294d | 2020-08-30 05:34:24 +0900 | [diff] [blame] | 133 | ; CHECK-NEXT: tail call void @use(i32 noundef 1) |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 134 | ; CHECK-NEXT: ret void |
| 135 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 136 | br i1 %c, label %if.true, label %if.false |
| 137 | if.true: |
| 138 | br label %end |
| 139 | if.false: |
| 140 | %ret1 = tail call i32 @return1() |
| 141 | br label %end |
| 142 | end: |
| 143 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 144 | %r = phi i32 [ 1, %if.true ], [ %ret1, %if.false ] |
| 145 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 146 | tail call void @use(i32 %r) |
| 147 | ret void |
| 148 | } |
| 149 | |
| 150 | define void @test-select-phi(i1 %c) { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 151 | ; CHECK-LABEL: define {{[^@]+}}@test-select-phi |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 152 | ; CHECK-SAME: (i1 [[C:%.*]]) { |
Shinji Okumura | 555294d | 2020-08-30 05:34:24 +0900 | [diff] [blame] | 153 | ; CHECK-NEXT: tail call void @use(i32 noundef 1) |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 154 | ; CHECK-NEXT: [[SELECT_NOT_SAME:%.*]] = select i1 [[C]], i32 1, i32 0 |
Shinji Okumura | 555294d | 2020-08-30 05:34:24 +0900 | [diff] [blame] | 155 | ; CHECK-NEXT: tail call void @use(i32 noundef [[SELECT_NOT_SAME]]) |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 156 | ; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] |
| 157 | ; CHECK: if-true: |
| 158 | ; CHECK-NEXT: br label [[END:%.*]] |
| 159 | ; CHECK: if-false: |
| 160 | ; CHECK-NEXT: br label [[END]] |
| 161 | ; CHECK: end: |
| 162 | ; CHECK-NEXT: [[PHI_SAME:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ] |
| 163 | ; CHECK-NEXT: [[PHI_NOT_SAME:%.*]] = phi i32 [ 0, [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ] |
| 164 | ; CHECK-NEXT: [[PHI_SAME_PROP:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ 1, [[IF_FALSE]] ] |
| 165 | ; CHECK-NEXT: [[PHI_SAME_UNDEF:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ undef, [[IF_FALSE]] ] |
| 166 | ; CHECK-NEXT: [[SELECT_NOT_SAME_UNDEF:%.*]] = select i1 [[C]], i32 [[PHI_NOT_SAME]], i32 undef |
Shinji Okumura | 555294d | 2020-08-30 05:34:24 +0900 | [diff] [blame] | 167 | ; CHECK-NEXT: tail call void @use(i32 noundef 1) |
| 168 | ; CHECK-NEXT: tail call void @use(i32 noundef [[PHI_NOT_SAME]]) |
| 169 | ; CHECK-NEXT: tail call void @use(i32 noundef 1) |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 170 | ; CHECK-NEXT: tail call void @use(i32 1) |
| 171 | ; CHECK-NEXT: tail call void @use(i32 [[SELECT_NOT_SAME_UNDEF]]) |
| 172 | ; CHECK-NEXT: ret void |
| 173 | ; |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 174 | %select-same = select i1 %c, i32 1, i32 1 |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 175 | tail call void @use(i32 %select-same) |
| 176 | |
| 177 | %select-not-same = select i1 %c, i32 1, i32 0 |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 178 | tail call void @use(i32 %select-not-same) |
| 179 | br i1 %c, label %if-true, label %if-false |
| 180 | if-true: |
| 181 | br label %end |
| 182 | if-false: |
| 183 | br label %end |
| 184 | end: |
| 185 | %phi-same = phi i32 [ 1, %if-true ], [ 1, %if-false ] |
| 186 | %phi-not-same = phi i32 [ 0, %if-true ], [ 1, %if-false ] |
| 187 | %phi-same-prop = phi i32 [ 1, %if-true ], [ %select-same, %if-false ] |
| 188 | %phi-same-undef = phi i32 [ 1, %if-true ], [ undef, %if-false ] |
| 189 | %select-not-same-undef = select i1 %c, i32 %phi-not-same, i32 undef |
| 190 | |
| 191 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 192 | tail call void @use(i32 %phi-same) |
| 193 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 194 | tail call void @use(i32 %phi-not-same) |
| 195 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 196 | tail call void @use(i32 %phi-same-prop) |
| 197 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 198 | tail call void @use(i32 %phi-same-undef) |
| 199 | |
Hideto Ueno | f2a5559 | 2019-09-07 07:03:05 +0000 | [diff] [blame] | 200 | tail call void @use(i32 %select-not-same-undef) |
| 201 | |
| 202 | ret void |
| 203 | |
| 204 | } |
Johannes Doerfert | a027e8d | 2019-10-29 11:47:47 -0500 | [diff] [blame] | 205 | |
| 206 | define i32 @ipccp1(i32 %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 207 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
| 208 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 209 | ; IS__TUNIT____-SAME: (i32 returned [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 210 | ; IS__TUNIT____-NEXT: br i1 true, label [[T:%.*]], label [[F:%.*]] |
| 211 | ; IS__TUNIT____: t: |
| 212 | ; IS__TUNIT____-NEXT: ret i32 [[A]] |
| 213 | ; IS__TUNIT____: f: |
| 214 | ; IS__TUNIT____-NEXT: unreachable |
| 215 | ; |
| 216 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 217 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 218 | ; IS__CGSCC____-SAME: (i32 returned [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 219 | ; IS__CGSCC____-NEXT: br i1 true, label [[T:%.*]], label [[F:%.*]] |
| 220 | ; IS__CGSCC____: t: |
| 221 | ; IS__CGSCC____-NEXT: ret i32 [[A]] |
| 222 | ; IS__CGSCC____: f: |
| 223 | ; IS__CGSCC____-NEXT: unreachable |
Johannes Doerfert | a027e8d | 2019-10-29 11:47:47 -0500 | [diff] [blame] | 224 | ; |
| 225 | br i1 true, label %t, label %f |
| 226 | t: |
| 227 | ret i32 %a |
| 228 | f: |
| 229 | %r = call i32 @ipccp1(i32 5) |
| 230 | ret i32 %r |
| 231 | } |
| 232 | |
| 233 | define internal i1 @ipccp2i(i1 %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 234 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 235 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2i |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 236 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 237 | ; IS__CGSCC____-NEXT: br label [[T:%.*]] |
| 238 | ; IS__CGSCC____: t: |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 239 | ; IS__CGSCC____-NEXT: ret i1 undef |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 240 | ; IS__CGSCC____: f: |
| 241 | ; IS__CGSCC____-NEXT: unreachable |
| 242 | ; |
Johannes Doerfert | a027e8d | 2019-10-29 11:47:47 -0500 | [diff] [blame] | 243 | br i1 %a, label %t, label %f |
| 244 | t: |
| 245 | ret i1 %a |
| 246 | f: |
| 247 | %r = call i1 @ipccp2i(i1 false) |
| 248 | ret i1 %r |
| 249 | } |
| 250 | |
| 251 | define i1 @ipccp2() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 252 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 253 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 254 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 255 | ; IS__TUNIT____-NEXT: ret i1 true |
| 256 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 257 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 258 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 259 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 260 | ; IS__CGSCC____-NEXT: ret i1 true |
Johannes Doerfert | a027e8d | 2019-10-29 11:47:47 -0500 | [diff] [blame] | 261 | ; |
| 262 | %r = call i1 @ipccp2i(i1 true) |
| 263 | ret i1 %r |
| 264 | } |
| 265 | |
Johannes Doerfert | b9b3cef | 2020-01-23 17:12:56 -0600 | [diff] [blame] | 266 | define internal i1 @ipccp2ib(i1 %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 267 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 268 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2ib |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 269 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 270 | ; IS__CGSCC____-NEXT: br label [[T:%.*]] |
| 271 | ; IS__CGSCC____: t: |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 272 | ; IS__CGSCC____-NEXT: ret i1 undef |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 273 | ; IS__CGSCC____: f: |
| 274 | ; IS__CGSCC____-NEXT: unreachable |
| 275 | ; |
Johannes Doerfert | b9b3cef | 2020-01-23 17:12:56 -0600 | [diff] [blame] | 276 | br i1 %a, label %t, label %f |
| 277 | t: |
| 278 | ret i1 true |
| 279 | f: |
| 280 | %r = call i1 @ipccp2ib(i1 false) |
| 281 | ret i1 %r |
| 282 | } |
| 283 | |
| 284 | define i1 @ipccp2b() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 285 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 286 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp2b |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 287 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 288 | ; IS__TUNIT____-NEXT: ret i1 true |
| 289 | ; |
| 290 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 291 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp2b |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 292 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 293 | ; IS__CGSCC____-NEXT: ret i1 true |
Johannes Doerfert | a027e8d | 2019-10-29 11:47:47 -0500 | [diff] [blame] | 294 | ; |
Johannes Doerfert | b9b3cef | 2020-01-23 17:12:56 -0600 | [diff] [blame] | 295 | %r = call i1 @ipccp2ib(i1 true) |
| 296 | ret i1 %r |
| 297 | } |
| 298 | |
| 299 | define internal i32 @ipccp3i(i32 %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 300 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 301 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp3i |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 302 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 303 | ; IS__CGSCC____-NEXT: br label [[T:%.*]] |
| 304 | ; IS__CGSCC____: t: |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 305 | ; IS__CGSCC____-NEXT: ret i32 undef |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 306 | ; IS__CGSCC____: f: |
| 307 | ; IS__CGSCC____-NEXT: unreachable |
| 308 | ; |
Johannes Doerfert | a027e8d | 2019-10-29 11:47:47 -0500 | [diff] [blame] | 309 | %c = icmp eq i32 %a, 7 |
| 310 | br i1 %c, label %t, label %f |
| 311 | t: |
| 312 | ret i32 %a |
| 313 | f: |
| 314 | %r = call i32 @ipccp3i(i32 5) |
| 315 | ret i32 %r |
| 316 | } |
| 317 | |
| 318 | define i32 @ipccp3() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 319 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 320 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@ipccp3 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 321 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 322 | ; IS__TUNIT____-NEXT: ret i32 7 |
| 323 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 324 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 325 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp3 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 326 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 327 | ; IS__CGSCC____-NEXT: ret i32 7 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 328 | ; |
Johannes Doerfert | a027e8d | 2019-10-29 11:47:47 -0500 | [diff] [blame] | 329 | %r = call i32 @ipccp3i(i32 7) |
| 330 | ret i32 %r |
| 331 | } |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 332 | |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 333 | ; Do not touch complicated arguments (for now) |
| 334 | %struct.X = type { i8* } |
Nico Weber | 01c9b9c | 2021-03-28 13:02:52 -0400 | [diff] [blame^] | 335 | define internal i32* @test_inalloca(i32* inalloca %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 336 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
| 337 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_inalloca |
Nico Weber | 01c9b9c | 2021-03-28 13:02:52 -0400 | [diff] [blame^] | 338 | ; IS__TUNIT____-SAME: (i32* inalloca noalias nofree nonnull returned writeonly dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 339 | ; IS__TUNIT____-NEXT: ret i32* [[A]] |
| 340 | ; |
| 341 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 342 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_inalloca |
Nico Weber | 01c9b9c | 2021-03-28 13:02:52 -0400 | [diff] [blame^] | 343 | ; IS__CGSCC____-SAME: (i32* inalloca noalias nofree noundef nonnull returned writeonly dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 344 | ; IS__CGSCC____-NEXT: ret i32* [[A]] |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 345 | ; |
| 346 | ret i32* %a |
| 347 | } |
Matt Arsenault | a418827 | 2020-06-25 19:17:24 -0400 | [diff] [blame] | 348 | define i32* @complicated_args_inalloca(i32* %arg) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 349 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 350 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_inalloca |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 351 | ; IS__TUNIT____-SAME: (i32* nofree readnone returned "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] { |
| 352 | ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree writeonly "no-capture-maybe-returned" [[ARG]]) #[[ATTR1]] |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 353 | ; IS__TUNIT____-NEXT: ret i32* [[CALL]] |
| 354 | ; |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 355 | ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 356 | ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_inalloca |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 357 | ; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] { |
| 358 | ; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) #[[ATTR5:[0-9]+]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 359 | ; IS__CGSCC_OPM-NEXT: ret i32* [[CALL]] |
| 360 | ; |
| 361 | ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 362 | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_inalloca |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 363 | ; IS__CGSCC_NPM-SAME: (i32* nofree noundef nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[ARG:%.*]]) #[[ATTR1]] { |
| 364 | ; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly dereferenceable(4) "no-capture-maybe-returned" [[ARG]]) #[[ATTR4:[0-9]+]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 365 | ; IS__CGSCC_NPM-NEXT: ret i32* [[CALL]] |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 366 | ; |
Matt Arsenault | a418827 | 2020-06-25 19:17:24 -0400 | [diff] [blame] | 367 | %call = call i32* @test_inalloca(i32* %arg) |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 368 | ret i32* %call |
| 369 | } |
| 370 | |
Arthur Eubanks | 670ec51 | 2020-03-16 12:32:36 -0700 | [diff] [blame] | 371 | define internal i32* @test_preallocated(i32* preallocated(i32) %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 372 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
| 373 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_preallocated |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 374 | ; IS__TUNIT____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 536870912 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 375 | ; IS__TUNIT____-NEXT: ret i32* [[A]] |
| 376 | ; |
| 377 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 378 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_preallocated |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 379 | ; IS__CGSCC____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 536870912 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 380 | ; IS__CGSCC____-NEXT: ret i32* [[A]] |
Arthur Eubanks | 670ec51 | 2020-03-16 12:32:36 -0700 | [diff] [blame] | 381 | ; |
| 382 | ret i32* %a |
| 383 | } |
| 384 | define i32* @complicated_args_preallocated() { |
sstefan1 | 6520cb9 | 2020-10-15 13:04:36 +0200 | [diff] [blame] | 385 | ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 386 | ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 387 | ; IS__TUNIT_OPM-SAME: () #[[ATTR0:[0-9]+]] { |
| 388 | ; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]] |
| 389 | ; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) #[[ATTR1]] [ "preallocated"(token [[C]]) ] |
Johannes Doerfert | 12a8ab1 | 2020-07-10 10:37:31 -0500 | [diff] [blame] | 390 | ; IS__TUNIT_OPM-NEXT: ret i32* [[CALL]] |
| 391 | ; |
sstefan1 | 6520cb9 | 2020-10-15 13:04:36 +0200 | [diff] [blame] | 392 | ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 393 | ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 394 | ; IS__TUNIT_NPM-SAME: () #[[ATTR0:[0-9]+]] { |
| 395 | ; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR4:[0-9]+]] |
| 396 | ; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) #[[ATTR1]] [ "preallocated"(token [[C]]) ] |
Johannes Doerfert | 12a8ab1 | 2020-07-10 10:37:31 -0500 | [diff] [blame] | 397 | ; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]] |
| 398 | ; |
sstefan1 | 6520cb9 | 2020-10-15 13:04:36 +0200 | [diff] [blame] | 399 | ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 400 | ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 401 | ; IS__CGSCC_OPM-SAME: () #[[ATTR0:[0-9]+]] { |
Johannes Doerfert | 979d5c6 | 2021-01-05 16:55:54 -0600 | [diff] [blame] | 402 | ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR6:[0-9]+]] |
| 403 | ; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) #[[ATTR7:[0-9]+]] [ "preallocated"(token [[C]]) ] |
Johannes Doerfert | 12a8ab1 | 2020-07-10 10:37:31 -0500 | [diff] [blame] | 404 | ; IS__CGSCC_OPM-NEXT: ret i32* [[CALL]] |
| 405 | ; |
sstefan1 | 6520cb9 | 2020-10-15 13:04:36 +0200 | [diff] [blame] | 406 | ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 407 | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 408 | ; IS__CGSCC_NPM-SAME: () #[[ATTR0:[0-9]+]] { |
Johannes Doerfert | 979d5c6 | 2021-01-05 16:55:54 -0600 | [diff] [blame] | 409 | ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]] |
| 410 | ; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 536870912 null) #[[ATTR6:[0-9]+]] [ "preallocated"(token [[C]]) ] |
Johannes Doerfert | 12a8ab1 | 2020-07-10 10:37:31 -0500 | [diff] [blame] | 411 | ; IS__CGSCC_NPM-NEXT: ret i32* [[CALL]] |
Arthur Eubanks | 670ec51 | 2020-03-16 12:32:36 -0700 | [diff] [blame] | 412 | ; |
| 413 | %c = call token @llvm.call.preallocated.setup(i32 1) |
| 414 | %call = call i32* @test_preallocated(i32* preallocated(i32) null) ["preallocated"(token %c)] |
| 415 | ret i32* %call |
| 416 | } |
| 417 | |
Matt Arsenault | a4985e7 | 2020-09-29 09:33:55 -0400 | [diff] [blame] | 418 | define internal void @test_sret(%struct.X* sret(%struct.X) %a, %struct.X** %b) { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 419 | ; |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 420 | ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly |
| 421 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_sret |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 422 | ; IS__TUNIT____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 536870912 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 423 | ; IS__TUNIT____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 |
| 424 | ; IS__TUNIT____-NEXT: ret void |
| 425 | ; |
| 426 | ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly |
| 427 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_sret |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 428 | ; IS__CGSCC____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 536870912 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 429 | ; IS__CGSCC____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 |
| 430 | ; IS__CGSCC____-NEXT: ret void |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 431 | ; |
| 432 | store %struct.X* %a, %struct.X** %b |
| 433 | ret void |
| 434 | } |
Johannes Doerfert | 1fc82b7 | 2020-04-01 21:46:03 -0500 | [diff] [blame] | 435 | ; FIXME: Alignment and dereferenceability are not propagated to the argument |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 436 | define void @complicated_args_sret(%struct.X** %b) { |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 437 | ; |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 438 | ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly |
| 439 | ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_sret |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 440 | ; IS__TUNIT_OPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR2]] { |
| 441 | ; IS__TUNIT_OPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly align 536870912 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR6:[0-9]+]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 442 | ; IS__TUNIT_OPM-NEXT: ret void |
| 443 | ; |
| 444 | ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly |
| 445 | ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_sret |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 446 | ; IS__TUNIT_NPM-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR2]] { |
| 447 | ; IS__TUNIT_NPM-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly align 536870912 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR5:[0-9]+]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 448 | ; IS__TUNIT_NPM-NEXT: ret void |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 449 | ; |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 450 | ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 451 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@complicated_args_sret |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 452 | ; IS__CGSCC____-SAME: (%struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2]] { |
Shinji Okumura | 95004ff | 2020-08-18 18:04:47 +0900 | [diff] [blame] | 453 | ; IS__CGSCC____-NEXT: unreachable |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 454 | ; |
| 455 | call void @test_sret(%struct.X* null, %struct.X** %b) |
| 456 | ret void |
| 457 | } |
| 458 | |
| 459 | define internal %struct.X* @test_nest(%struct.X* nest %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 460 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
| 461 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_nest |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 462 | ; IS__TUNIT____-SAME: (%struct.X* nest noalias nofree noundef readnone returned align 536870912 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 463 | ; IS__TUNIT____-NEXT: ret %struct.X* [[A]] |
| 464 | ; |
| 465 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 466 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_nest |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 467 | ; IS__CGSCC____-SAME: (%struct.X* nest noalias nofree noundef readnone returned align 536870912 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 468 | ; IS__CGSCC____-NEXT: ret %struct.X* [[A]] |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 469 | ; |
| 470 | ret %struct.X* %a |
| 471 | } |
| 472 | define %struct.X* @complicated_args_nest() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 473 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 474 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_nest |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 475 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
| 476 | ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) #[[ATTR1]] |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 477 | ; IS__TUNIT____-NEXT: ret %struct.X* [[CALL]] |
| 478 | ; |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 479 | ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 480 | ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_nest |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 481 | ; IS__CGSCC_OPM-SAME: () #[[ATTR1]] { |
| 482 | ; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) #[[ATTR5]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 483 | ; IS__CGSCC_OPM-NEXT: ret %struct.X* [[CALL]] |
| 484 | ; |
| 485 | ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 486 | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_nest |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 487 | ; IS__CGSCC_NPM-SAME: () #[[ATTR1]] { |
| 488 | ; IS__CGSCC_NPM-NEXT: [[CALL:%.*]] = call %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 536870912 null) #[[ATTR4]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 489 | ; IS__CGSCC_NPM-NEXT: ret %struct.X* [[CALL]] |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 490 | ; |
| 491 | %call = call %struct.X* @test_nest(%struct.X* null) |
| 492 | ret %struct.X* %call |
| 493 | } |
| 494 | |
| 495 | @S = external global %struct.X |
Matt Arsenault | 2a6a430 | 2020-11-20 10:52:27 -0500 | [diff] [blame] | 496 | define internal void @test_byval(%struct.X* byval(%struct.X) %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 497 | ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 498 | ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test_byval |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 499 | ; IS__CGSCC_OPM-SAME: (%struct.X* noalias nocapture nofree noundef nonnull writeonly byval([[STRUCT_X:%.*]]) align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR1]] { |
| 500 | ; IS__CGSCC_OPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A]], i32 0, i32 0 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 501 | ; IS__CGSCC_OPM-NEXT: store i8* null, i8** [[G0]], align 8 |
| 502 | ; IS__CGSCC_OPM-NEXT: ret void |
| 503 | ; |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 504 | ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 505 | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_byval |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 506 | ; IS__CGSCC_NPM-SAME: (i8* noalias nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR1]] { |
Eli Friedman | 292e2d9 | 2020-05-15 13:23:14 -0700 | [diff] [blame] | 507 | ; IS__CGSCC_NPM-NEXT: [[A_PRIV:%.*]] = alloca [[STRUCT_X:%.*]], align 8 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 508 | ; IS__CGSCC_NPM-NEXT: [[A_PRIV_CAST:%.*]] = bitcast %struct.X* [[A_PRIV]] to i8** |
Johannes Doerfert | d0b9c54 | 2020-04-22 17:49:58 -0500 | [diff] [blame] | 509 | ; IS__CGSCC_NPM-NEXT: store i8* [[TMP0]], i8** [[A_PRIV_CAST]], align 8 |
Johannes Doerfert | 75e7dc5 | 2020-04-08 19:04:57 -0500 | [diff] [blame] | 510 | ; IS__CGSCC_NPM-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X]], %struct.X* [[A_PRIV]], i32 0, i32 0 |
| 511 | ; IS__CGSCC_NPM-NEXT: store i8* null, i8** [[G0]], align 8 |
| 512 | ; IS__CGSCC_NPM-NEXT: ret void |
| 513 | ; |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 514 | %g0 = getelementptr %struct.X, %struct.X* %a, i32 0, i32 0 |
| 515 | store i8* null, i8** %g0 |
| 516 | ret void |
| 517 | } |
| 518 | define void @complicated_args_byval() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 519 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 520 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_byval |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 521 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 522 | ; IS__TUNIT____-NEXT: ret void |
| 523 | ; |
| 524 | ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 525 | ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_byval |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 526 | ; IS__CGSCC_OPM-SAME: () #[[ATTR1]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 527 | ; IS__CGSCC_OPM-NEXT: ret void |
| 528 | ; |
| 529 | ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 530 | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_byval |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 531 | ; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 532 | ; IS__CGSCC_NPM-NEXT: ret void |
Johannes Doerfert | 7827ca2 | 2019-11-01 13:42:54 -0500 | [diff] [blame] | 533 | ; |
| 534 | call void @test_byval(%struct.X* @S) |
| 535 | ret void |
| 536 | } |
| 537 | |
Matt Arsenault | 2a6a430 | 2020-11-20 10:52:27 -0500 | [diff] [blame] | 538 | define internal i8*@test_byval2(%struct.X* byval(%struct.X) %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 539 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 540 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_byval2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 541 | ; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 542 | ; IS__TUNIT____-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0 |
| 543 | ; IS__TUNIT____-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8 |
| 544 | ; IS__TUNIT____-NEXT: ret i8* [[L]] |
| 545 | ; |
| 546 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 547 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_byval2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 548 | ; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 549 | ; IS__CGSCC____-NEXT: [[G0:%.*]] = getelementptr [[STRUCT_X:%.*]], %struct.X* @S, i32 0, i32 0 |
| 550 | ; IS__CGSCC____-NEXT: [[L:%.*]] = load i8*, i8** [[G0]], align 8 |
| 551 | ; IS__CGSCC____-NEXT: ret i8* [[L]] |
Johannes Doerfert | 9dec24a | 2020-01-26 02:51:57 -0600 | [diff] [blame] | 552 | ; |
| 553 | %g0 = getelementptr %struct.X, %struct.X* %a, i32 0, i32 0 |
| 554 | %l = load i8*, i8** %g0 |
| 555 | ret i8* %l |
| 556 | } |
| 557 | define i8* @complicated_args_byval2() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 558 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readonly willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 559 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_byval2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 560 | ; IS__TUNIT____-SAME: () #[[ATTR3]] { |
| 561 | ; IS__TUNIT____-NEXT: [[C:%.*]] = call i8* @test_byval2() #[[ATTR3]] |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 562 | ; IS__TUNIT____-NEXT: ret i8* [[C]] |
| 563 | ; |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 564 | ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn |
| 565 | ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_byval2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 566 | ; IS__CGSCC_OPM-SAME: () #[[ATTR3]] { |
Johannes Doerfert | 979d5c6 | 2021-01-05 16:55:54 -0600 | [diff] [blame] | 567 | ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = call i8* @test_byval2() #[[ATTR8:[0-9]+]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 568 | ; IS__CGSCC_OPM-NEXT: ret i8* [[C]] |
| 569 | ; |
| 570 | ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn |
| 571 | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_byval2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 572 | ; IS__CGSCC_NPM-SAME: () #[[ATTR3]] { |
Johannes Doerfert | 979d5c6 | 2021-01-05 16:55:54 -0600 | [diff] [blame] | 573 | ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = call i8* @test_byval2() #[[ATTR7:[0-9]+]] |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 574 | ; IS__CGSCC_NPM-NEXT: ret i8* [[C]] |
Johannes Doerfert | 9dec24a | 2020-01-26 02:51:57 -0600 | [diff] [blame] | 575 | ; |
| 576 | %c = call i8* @test_byval2(%struct.X* @S) |
| 577 | ret i8* %c |
| 578 | } |
| 579 | |
Johannes Doerfert | a989e5d | 2019-12-31 13:25:47 -0600 | [diff] [blame] | 580 | define void @fixpoint_changed(i32* %p) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 581 | ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind writeonly |
| 582 | ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@fixpoint_changed |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 583 | ; IS__TUNIT_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 584 | ; IS__TUNIT_OPM-NEXT: entry: |
| 585 | ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND:%.*]] |
| 586 | ; IS__TUNIT_OPM: for.cond: |
| 587 | ; IS__TUNIT_OPM-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ] |
| 588 | ; IS__TUNIT_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30 |
| 589 | ; IS__TUNIT_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]] |
| 590 | ; IS__TUNIT_OPM: for.body: |
| 591 | ; IS__TUNIT_OPM-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [ |
| 592 | ; IS__TUNIT_OPM-NEXT: i32 1, label [[SW_BB:%.*]] |
| 593 | ; IS__TUNIT_OPM-NEXT: ] |
| 594 | ; IS__TUNIT_OPM: sw.bb: |
| 595 | ; IS__TUNIT_OPM-NEXT: br label [[SW_EPILOG]] |
| 596 | ; IS__TUNIT_OPM: sw.epilog: |
| 597 | ; IS__TUNIT_OPM-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ] |
| 598 | ; IS__TUNIT_OPM-NEXT: store i32 [[X_0]], i32* [[P]], align 4 |
| 599 | ; IS__TUNIT_OPM-NEXT: [[INC]] = add nsw i32 [[J_0]], 1 |
| 600 | ; IS__TUNIT_OPM-NEXT: br label [[FOR_COND]] |
| 601 | ; IS__TUNIT_OPM: for.end: |
| 602 | ; IS__TUNIT_OPM-NEXT: ret void |
| 603 | ; |
| 604 | ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly |
| 605 | ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@fixpoint_changed |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 606 | ; IS__TUNIT_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR2]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 607 | ; IS__TUNIT_NPM-NEXT: entry: |
| 608 | ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND:%.*]] |
| 609 | ; IS__TUNIT_NPM: for.cond: |
| 610 | ; IS__TUNIT_NPM-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ] |
| 611 | ; IS__TUNIT_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30 |
| 612 | ; IS__TUNIT_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]] |
| 613 | ; IS__TUNIT_NPM: for.body: |
| 614 | ; IS__TUNIT_NPM-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [ |
| 615 | ; IS__TUNIT_NPM-NEXT: i32 1, label [[SW_BB:%.*]] |
| 616 | ; IS__TUNIT_NPM-NEXT: ] |
| 617 | ; IS__TUNIT_NPM: sw.bb: |
| 618 | ; IS__TUNIT_NPM-NEXT: br label [[SW_EPILOG]] |
| 619 | ; IS__TUNIT_NPM: sw.epilog: |
| 620 | ; IS__TUNIT_NPM-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ] |
| 621 | ; IS__TUNIT_NPM-NEXT: store i32 [[X_0]], i32* [[P]], align 4 |
| 622 | ; IS__TUNIT_NPM-NEXT: [[INC]] = add nsw i32 [[J_0]], 1 |
| 623 | ; IS__TUNIT_NPM-NEXT: br label [[FOR_COND]] |
| 624 | ; IS__TUNIT_NPM: for.end: |
| 625 | ; IS__TUNIT_NPM-NEXT: ret void |
| 626 | ; |
| 627 | ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind writeonly |
| 628 | ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@fixpoint_changed |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 629 | ; IS__CGSCC_OPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR4:[0-9]+]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 630 | ; IS__CGSCC_OPM-NEXT: entry: |
| 631 | ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND:%.*]] |
| 632 | ; IS__CGSCC_OPM: for.cond: |
| 633 | ; IS__CGSCC_OPM-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ] |
| 634 | ; IS__CGSCC_OPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30 |
| 635 | ; IS__CGSCC_OPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]] |
| 636 | ; IS__CGSCC_OPM: for.body: |
| 637 | ; IS__CGSCC_OPM-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [ |
| 638 | ; IS__CGSCC_OPM-NEXT: i32 1, label [[SW_BB:%.*]] |
| 639 | ; IS__CGSCC_OPM-NEXT: ] |
| 640 | ; IS__CGSCC_OPM: sw.bb: |
| 641 | ; IS__CGSCC_OPM-NEXT: br label [[SW_EPILOG]] |
| 642 | ; IS__CGSCC_OPM: sw.epilog: |
| 643 | ; IS__CGSCC_OPM-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ] |
| 644 | ; IS__CGSCC_OPM-NEXT: store i32 [[X_0]], i32* [[P]], align 4 |
| 645 | ; IS__CGSCC_OPM-NEXT: [[INC]] = add nsw i32 [[J_0]], 1 |
| 646 | ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND]] |
| 647 | ; IS__CGSCC_OPM: for.end: |
| 648 | ; IS__CGSCC_OPM-NEXT: ret void |
| 649 | ; |
| 650 | ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly |
| 651 | ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@fixpoint_changed |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 652 | ; IS__CGSCC_NPM-SAME: (i32* nocapture nofree writeonly [[P:%.*]]) #[[ATTR2]] { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 653 | ; IS__CGSCC_NPM-NEXT: entry: |
| 654 | ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND:%.*]] |
| 655 | ; IS__CGSCC_NPM: for.cond: |
| 656 | ; IS__CGSCC_NPM-NEXT: [[J_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[SW_EPILOG:%.*]] ] |
| 657 | ; IS__CGSCC_NPM-NEXT: [[CMP:%.*]] = icmp slt i32 [[J_0]], 30 |
| 658 | ; IS__CGSCC_NPM-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]] |
| 659 | ; IS__CGSCC_NPM: for.body: |
| 660 | ; IS__CGSCC_NPM-NEXT: switch i32 [[J_0]], label [[SW_EPILOG]] [ |
| 661 | ; IS__CGSCC_NPM-NEXT: i32 1, label [[SW_BB:%.*]] |
| 662 | ; IS__CGSCC_NPM-NEXT: ] |
| 663 | ; IS__CGSCC_NPM: sw.bb: |
| 664 | ; IS__CGSCC_NPM-NEXT: br label [[SW_EPILOG]] |
| 665 | ; IS__CGSCC_NPM: sw.epilog: |
| 666 | ; IS__CGSCC_NPM-NEXT: [[X_0:%.*]] = phi i32 [ 255, [[FOR_BODY]] ], [ 253, [[SW_BB]] ] |
| 667 | ; IS__CGSCC_NPM-NEXT: store i32 [[X_0]], i32* [[P]], align 4 |
| 668 | ; IS__CGSCC_NPM-NEXT: [[INC]] = add nsw i32 [[J_0]], 1 |
| 669 | ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND]] |
| 670 | ; IS__CGSCC_NPM: for.end: |
| 671 | ; IS__CGSCC_NPM-NEXT: ret void |
Johannes Doerfert | a989e5d | 2019-12-31 13:25:47 -0600 | [diff] [blame] | 672 | ; |
| 673 | entry: |
| 674 | br label %for.cond |
| 675 | |
| 676 | for.cond: |
| 677 | %j.0 = phi i32 [ 0, %entry ], [ %inc, %sw.epilog ] |
| 678 | %cmp = icmp slt i32 %j.0, 30 |
| 679 | br i1 %cmp, label %for.body, label %for.end |
| 680 | |
| 681 | for.body: |
| 682 | switch i32 %j.0, label %sw.epilog [ |
| 683 | i32 1, label %sw.bb |
| 684 | ] |
| 685 | |
| 686 | sw.bb: |
| 687 | br label %sw.epilog |
| 688 | |
| 689 | sw.epilog: |
| 690 | %x.0 = phi i32 [ 255, %for.body ], [ 253, %sw.bb ] |
| 691 | store i32 %x.0, i32* %p |
| 692 | %inc = add nsw i32 %j.0, 1 |
| 693 | br label %for.cond |
| 694 | |
| 695 | for.end: |
| 696 | ret void |
| 697 | } |
| 698 | |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 699 | ; Check we merge undef and a constant properly. |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 700 | define i8 @caller0() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 701 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 702 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller0 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 703 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Shinji Okumura | b8711cb | 2020-08-27 16:30:29 +0900 | [diff] [blame] | 704 | ; IS__TUNIT____-NEXT: ret i8 49 |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 705 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 706 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 707 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller0 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 708 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 709 | ; IS__CGSCC____-NEXT: ret i8 49 |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 710 | ; |
| 711 | %c = call i8 @callee(i8 undef) |
| 712 | ret i8 %c |
| 713 | } |
| 714 | define i8 @caller1() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 715 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 716 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 717 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Shinji Okumura | b8711cb | 2020-08-27 16:30:29 +0900 | [diff] [blame] | 718 | ; IS__TUNIT____-NEXT: ret i8 49 |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 719 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 720 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 721 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller1 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 722 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 723 | ; IS__CGSCC____-NEXT: ret i8 49 |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 724 | ; |
| 725 | %c = call i8 @callee(i8 undef) |
| 726 | ret i8 %c |
| 727 | } |
| 728 | define i8 @caller2() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 729 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 730 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 731 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Shinji Okumura | b8711cb | 2020-08-27 16:30:29 +0900 | [diff] [blame] | 732 | ; IS__TUNIT____-NEXT: ret i8 49 |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 733 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 734 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 735 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 736 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 737 | ; IS__CGSCC____-NEXT: ret i8 49 |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 738 | ; |
| 739 | %c = call i8 @callee(i8 undef) |
| 740 | ret i8 %c |
| 741 | } |
| 742 | define i8 @caller_middle() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 743 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 744 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller_middle |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 745 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Shinji Okumura | b8711cb | 2020-08-27 16:30:29 +0900 | [diff] [blame] | 746 | ; IS__TUNIT____-NEXT: ret i8 49 |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 747 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 748 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 749 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller_middle |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 750 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 751 | ; IS__CGSCC____-NEXT: ret i8 49 |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 752 | ; |
| 753 | %c = call i8 @callee(i8 42) |
| 754 | ret i8 %c |
| 755 | } |
| 756 | define i8 @caller3() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 757 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 758 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller3 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 759 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Shinji Okumura | b8711cb | 2020-08-27 16:30:29 +0900 | [diff] [blame] | 760 | ; IS__TUNIT____-NEXT: ret i8 49 |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 761 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 762 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 763 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller3 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 764 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 765 | ; IS__CGSCC____-NEXT: ret i8 49 |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 766 | ; |
| 767 | %c = call i8 @callee(i8 undef) |
| 768 | ret i8 %c |
| 769 | } |
| 770 | define i8 @caller4() { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 771 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 772 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller4 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 773 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Shinji Okumura | b8711cb | 2020-08-27 16:30:29 +0900 | [diff] [blame] | 774 | ; IS__TUNIT____-NEXT: ret i8 49 |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 775 | ; |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 776 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 777 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller4 |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 778 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 779 | ; IS__CGSCC____-NEXT: ret i8 49 |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 780 | ; |
| 781 | %c = call i8 @callee(i8 undef) |
| 782 | ret i8 %c |
| 783 | } |
| 784 | define internal i8 @callee(i8 %a) { |
sstefan1 | 35cfe17 | 2020-07-19 21:55:43 +0200 | [diff] [blame] | 785 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
sstefan1 | a9329d9 | 2020-08-29 19:31:13 +0200 | [diff] [blame] | 786 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 787 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
sstefan1 | fd90378 | 2020-08-30 10:29:07 +0200 | [diff] [blame] | 788 | ; IS__CGSCC____-NEXT: ret i8 undef |
Johannes Doerfert | 4647aa0 | 2020-02-14 20:11:22 -0600 | [diff] [blame] | 789 | ; |
| 790 | %c = add i8 %a, 7 |
| 791 | ret i8 %c |
| 792 | } |
| 793 | |
Johannes Doerfert | fedbd3b | 2020-09-09 16:08:20 -0500 | [diff] [blame] | 794 | |
| 795 | define i1 @icmp() { |
| 796 | ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn |
| 797 | ; IS__TUNIT____-LABEL: define {{[^@]+}}@icmp |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 798 | ; IS__TUNIT____-SAME: () #[[ATTR1]] { |
Johannes Doerfert | fedbd3b | 2020-09-09 16:08:20 -0500 | [diff] [blame] | 799 | ; IS__TUNIT____-NEXT: ret i1 true |
| 800 | ; |
| 801 | ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn |
| 802 | ; IS__CGSCC____-LABEL: define {{[^@]+}}@icmp |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 803 | ; IS__CGSCC____-SAME: () #[[ATTR1]] { |
Johannes Doerfert | fedbd3b | 2020-09-09 16:08:20 -0500 | [diff] [blame] | 804 | ; IS__CGSCC____-NEXT: ret i1 true |
| 805 | ; |
| 806 | %c = icmp eq i8* null, null |
| 807 | ret i1 %c |
| 808 | } |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 809 | ;. |
| 810 | ; IS__TUNIT_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } |
| 811 | ; IS__TUNIT_OPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } |
| 812 | ; IS__TUNIT_OPM: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn writeonly } |
| 813 | ; IS__TUNIT_OPM: attributes #[[ATTR3]] = { nofree nosync nounwind readonly willreturn } |
| 814 | ; IS__TUNIT_OPM: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind writeonly } |
| 815 | ; IS__TUNIT_OPM: attributes #[[ATTR5]] = { willreturn } |
| 816 | ; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree nosync nounwind willreturn writeonly } |
| 817 | ;. |
| 818 | ; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } |
| 819 | ; IS__TUNIT_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn } |
| 820 | ; IS__TUNIT_NPM: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn writeonly } |
| 821 | ; IS__TUNIT_NPM: attributes #[[ATTR3]] = { nofree nosync nounwind readonly willreturn } |
| 822 | ; IS__TUNIT_NPM: attributes #[[ATTR4]] = { willreturn } |
| 823 | ; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly } |
| 824 | ;. |
| 825 | ; IS__CGSCC_OPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } |
| 826 | ; IS__CGSCC_OPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } |
| 827 | ; IS__CGSCC_OPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } |
| 828 | ; IS__CGSCC_OPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readonly willreturn } |
| 829 | ; IS__CGSCC_OPM: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind writeonly } |
Johannes Doerfert | 979d5c6 | 2021-01-05 16:55:54 -0600 | [diff] [blame] | 830 | ; IS__CGSCC_OPM: attributes #[[ATTR5]] = { readnone willreturn } |
| 831 | ; IS__CGSCC_OPM: attributes #[[ATTR6]] = { willreturn } |
| 832 | ; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nounwind readnone willreturn } |
| 833 | ; IS__CGSCC_OPM: attributes #[[ATTR8]] = { readonly willreturn } |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 834 | ;. |
| 835 | ; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree nosync nounwind willreturn } |
| 836 | ; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn } |
| 837 | ; IS__CGSCC_NPM: attributes #[[ATTR2]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly } |
| 838 | ; IS__CGSCC_NPM: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind readonly willreturn } |
Johannes Doerfert | 979d5c6 | 2021-01-05 16:55:54 -0600 | [diff] [blame] | 839 | ; IS__CGSCC_NPM: attributes #[[ATTR4]] = { readnone willreturn } |
| 840 | ; IS__CGSCC_NPM: attributes #[[ATTR5]] = { willreturn } |
| 841 | ; IS__CGSCC_NPM: attributes #[[ATTR6]] = { nounwind readnone willreturn } |
| 842 | ; IS__CGSCC_NPM: attributes #[[ATTR7]] = { readonly willreturn } |
Johannes Doerfert | 25de342 | 2021-03-11 23:21:32 -0600 | [diff] [blame] | 843 | ;. |