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