1 ; RUN: llvm-dis < %s.bc| FileCheck %s 2 3 ; attributes-3.3.ll.bc was generated by passing this file to llvm-as-3.3. 4 ; The test checks that LLVM does not silently misread attributes of 5 ; older bitcode files. 6 7 define void @f1(i8 zeroext) 8 ; CHECK: define void @f1(i8 zeroext) 9 { 10 ret void; 11 } 12 13 define void @f2(i8 signext) 14 ; CHECK: define void @f2(i8 signext) 15 { 16 ret void; 17 } 18 19 define void @f3() noreturn 20 ; CHECK: define void @f3() #0 21 { 22 ret void; 23 } 24 25 define void @f4(i8 inreg) 26 ; CHECK: define void @f4(i8 inreg) 27 { 28 ret void; 29 } 30 31 define void @f5(i8* sret) 32 ; CHECK: define void @f5(i8* sret) 33 { 34 ret void; 35 } 36 37 define void @f6() nounwind 38 ; CHECK: define void @f6() #1 39 { 40 ret void; 41 } 42 43 define void @f7(i8* noalias) 44 ; CHECK: define void @f7(i8* noalias) 45 { 46 ret void; 47 } 48 49 define void @f8(i8* byval) 50 ; CHECK: define void @f8(i8* byval) 51 { 52 ret void; 53 } 54 55 define void @f9(i8* nest) 56 ; CHECK: define void @f9(i8* nest) 57 { 58 ret void; 59 } 60 61 define void @f10() readnone 62 ; CHECK: define void @f10() #2 63 { 64 ret void; 65 } 66 67 define void @f11() readonly 68 ; CHECK: define void @f11() #3 69 { 70 ret void; 71 } 72 73 define void @f12() noinline 74 ; CHECK: define void @f12() #4 75 { 76 ret void; 77 } 78 79 define void @f13() alwaysinline 80 ; CHECK: define void @f13() #5 81 { 82 ret void; 83 } 84 85 define void @f14() optsize 86 ; CHECK: define void @f14() #6 87 { 88 ret void; 89 } 90 91 define void @f15() ssp 92 ; CHECK: define void @f15() #7 93 { 94 ret void; 95 } 96 97 define void @f16() sspreq 98 ; CHECK: define void @f16() #8 99 { 100 ret void; 101 } 102 103 define void @f17(i8 align 4) 104 ; CHECK: define void @f17(i8 align 4) 105 { 106 ret void; 107 } 108 109 define void @f18(i8* nocapture) 110 ; CHECK: define void @f18(i8* nocapture) 111 { 112 ret void; 113 } 114 115 define void @f19() noredzone 116 ; CHECK: define void @f19() #9 117 { 118 ret void; 119 } 120 121 define void @f20() noimplicitfloat 122 ; CHECK: define void @f20() #10 123 { 124 ret void; 125 } 126 127 define void @f21() naked 128 ; CHECK: define void @f21() #11 129 { 130 ret void; 131 } 132 133 define void @f22() inlinehint 134 ; CHECK: define void @f22() #12 135 { 136 ret void; 137 } 138 139 define void @f23() alignstack(4) 140 ; CHECK: define void @f23() #13 141 { 142 ret void; 143 } 144 145 define void @f24() returns_twice 146 ; CHECK: define void @f24() #14 147 { 148 ret void; 149 } 150 151 define void @f25() uwtable 152 ; CHECK: define void @f25() #15 153 { 154 ret void; 155 } 156 157 define void @f26() nonlazybind 158 ; CHECK: define void @f26() #16 159 { 160 ret void; 161 } 162 163 define void @f27() sanitize_address 164 ; CHECK: define void @f27() #17 165 { 166 ret void; 167 } 168 define void @f28() sanitize_thread 169 ; CHECK: define void @f28() #18 170 { 171 ret void; 172 } 173 define void @f29() sanitize_memory 174 ; CHECK: define void @f29() #19 175 { 176 ret void; 177 } 178 179 define void @f30() "cpu"="cortex-a8" 180 ; CHECK: define void @f30() #20 181 { 182 ret void; 183 } 184 185 define i8 @f31(i8 returned %A) 186 ; CHECK: define i8 @f31(i8 returned %A) 187 { 188 ret i8 %A; 189 } 190 191 define void @f32() sspstrong 192 ; CHECK: define void @f32() #21 193 { 194 ret void; 195 } 196 197 define void @f33() minsize 198 ; CHECK: define void @f33() #22 199 { 200 ret void; 201 } 202 203 declare void @nobuiltin() 204 205 define void @f34() 206 ; CHECK: define void @f34() 207 { 208 call void @nobuiltin() nobuiltin 209 ; CHECK: call void @nobuiltin() #23 210 ret void; 211 } 212 213 ; CHECK: attributes #0 = { noreturn } 214 ; CHECK: attributes #1 = { nounwind } 215 ; CHECK: attributes #2 = { readnone } 216 ; CHECK: attributes #3 = { readonly } 217 ; CHECK: attributes #4 = { noinline } 218 ; CHECK: attributes #5 = { alwaysinline } 219 ; CHECK: attributes #6 = { optsize } 220 ; CHECK: attributes #7 = { ssp } 221 ; CHECK: attributes #8 = { sspreq } 222 ; CHECK: attributes #9 = { noredzone } 223 ; CHECK: attributes #10 = { noimplicitfloat } 224 ; CHECK: attributes #11 = { naked } 225 ; CHECK: attributes #12 = { inlinehint } 226 ; CHECK: attributes #13 = { alignstack=4 } 227 ; CHECK: attributes #14 = { returns_twice } 228 ; CHECK: attributes #15 = { uwtable } 229 ; CHECK: attributes #16 = { nonlazybind } 230 ; CHECK: attributes #17 = { sanitize_address } 231 ; CHECK: attributes #18 = { sanitize_thread } 232 ; CHECK: attributes #19 = { sanitize_memory } 233 ; CHECK: attributes #20 = { "cpu"="cortex-a8" } 234 ; CHECK: attributes #21 = { sspstrong } 235 ; CHECK: attributes #22 = { minsize } 236 ; CHECK: attributes #23 = { nobuiltin } 237