1*9880d681SAndroid Build Coastguard Worker; Bitcode compatibility test for llvm 3.8.0 2*9880d681SAndroid Build Coastguard Worker; 3*9880d681SAndroid Build Coastguard Worker; N.b: This is 3.8-compatible IR. The CHECK lines occasionally differ from 4*9880d681SAndroid Build Coastguard Worker; the IR used to generate the bitcode, and may need to be updated. 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis < %s.bc | FileCheck %s 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Workertarget datalayout = "E" 9*9880d681SAndroid Build Coastguard Worker; CHECK: target datalayout = "E" 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx10.10.0" 12*9880d681SAndroid Build Coastguard Worker; CHECK: target triple = "x86_64-apple-macosx10.10.0" 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker;; Module-level assembly 15*9880d681SAndroid Build Coastguard Workermodule asm "beep boop" 16*9880d681SAndroid Build Coastguard Worker; CHECK: module asm "beep boop" 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker;; Comdats 19*9880d681SAndroid Build Coastguard Worker$comdat.any = comdat any 20*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.any = comdat any 21*9880d681SAndroid Build Coastguard Worker$comdat.exactmatch = comdat exactmatch 22*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.exactmatch = comdat exactmatch 23*9880d681SAndroid Build Coastguard Worker$comdat.largest = comdat largest 24*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.largest = comdat largest 25*9880d681SAndroid Build Coastguard Worker$comdat.noduplicates = comdat noduplicates 26*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.noduplicates = comdat noduplicates 27*9880d681SAndroid Build Coastguard Worker$comdat.samesize = comdat samesize 28*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.samesize = comdat samesize 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Worker;; Constants 31*9880d681SAndroid Build Coastguard Worker@const.true = constant i1 true 32*9880d681SAndroid Build Coastguard Worker; CHECK: @const.true = constant i1 true 33*9880d681SAndroid Build Coastguard Worker@const.false = constant i1 false 34*9880d681SAndroid Build Coastguard Worker; CHECK: @const.false = constant i1 false 35*9880d681SAndroid Build Coastguard Worker@const.int = constant i32 zeroinitializer 36*9880d681SAndroid Build Coastguard Worker; CHECK: @const.int = constant i32 0 37*9880d681SAndroid Build Coastguard Worker@const.float = constant double 0.0 38*9880d681SAndroid Build Coastguard Worker; CHECK: @const.float = constant double 0.0 39*9880d681SAndroid Build Coastguard Worker@const.null = constant i8* null 40*9880d681SAndroid Build Coastguard Worker; CHECK: @const.null = constant i8* null 41*9880d681SAndroid Build Coastguard Worker%const.struct.type = type { i32, i8 } 42*9880d681SAndroid Build Coastguard Worker%const.struct.type.packed = type <{ i32, i8 }> 43*9880d681SAndroid Build Coastguard Worker@const.struct = constant %const.struct.type { i32 -1, i8 undef } 44*9880d681SAndroid Build Coastguard Worker; CHECK: @const.struct = constant %const.struct.type { i32 -1, i8 undef } 45*9880d681SAndroid Build Coastguard Worker@const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }> 46*9880d681SAndroid Build Coastguard Worker; CHECK: @const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }> 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.array.i8 = constant [3 x i8] c"\00\01\00" 49*9880d681SAndroid Build Coastguard Worker@constant.array.i8 = constant [3 x i8] [i8 -0, i8 1, i8 0] 50*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.array.i16 = constant [3 x i16] [i16 0, i16 1, i16 0] 51*9880d681SAndroid Build Coastguard Worker@constant.array.i16 = constant [3 x i16] [i16 -0, i16 1, i16 0] 52*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.array.i32 = constant [3 x i32] [i32 0, i32 1, i32 0] 53*9880d681SAndroid Build Coastguard Worker@constant.array.i32 = constant [3 x i32] [i32 -0, i32 1, i32 0] 54*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.array.i64 = constant [3 x i64] [i64 0, i64 1, i64 0] 55*9880d681SAndroid Build Coastguard Worker@constant.array.i64 = constant [3 x i64] [i64 -0, i64 1, i64 0] 56*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.array.f16 = constant [3 x half] [half 0xH8000, half 0xH3C00, half 0xH0000] 57*9880d681SAndroid Build Coastguard Worker@constant.array.f16 = constant [3 x half] [half -0.0, half 1.0, half 0.0] 58*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.array.f32 = constant [3 x float] [float -0.000000e+00, float 1.000000e+00, float 0.000000e+00] 59*9880d681SAndroid Build Coastguard Worker@constant.array.f32 = constant [3 x float] [float -0.0, float 1.0, float 0.0] 60*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.array.f64 = constant [3 x double] [double -0.000000e+00, double 1.000000e+00, double 0.000000e+00] 61*9880d681SAndroid Build Coastguard Worker@constant.array.f64 = constant [3 x double] [double -0.0, double 1.0, double 0.0] 62*9880d681SAndroid Build Coastguard Worker 63*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.vector.i8 = constant <3 x i8> <i8 0, i8 1, i8 0> 64*9880d681SAndroid Build Coastguard Worker@constant.vector.i8 = constant <3 x i8> <i8 -0, i8 1, i8 0> 65*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.vector.i16 = constant <3 x i16> <i16 0, i16 1, i16 0> 66*9880d681SAndroid Build Coastguard Worker@constant.vector.i16 = constant <3 x i16> <i16 -0, i16 1, i16 0> 67*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.vector.i32 = constant <3 x i32> <i32 0, i32 1, i32 0> 68*9880d681SAndroid Build Coastguard Worker@constant.vector.i32 = constant <3 x i32> <i32 -0, i32 1, i32 0> 69*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.vector.i64 = constant <3 x i64> <i64 0, i64 1, i64 0> 70*9880d681SAndroid Build Coastguard Worker@constant.vector.i64 = constant <3 x i64> <i64 -0, i64 1, i64 0> 71*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.vector.f16 = constant <3 x half> <half 0xH8000, half 0xH3C00, half 0xH0000> 72*9880d681SAndroid Build Coastguard Worker@constant.vector.f16 = constant <3 x half> <half -0.0, half 1.0, half 0.0> 73*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.vector.f32 = constant <3 x float> <float -0.000000e+00, float 1.000000e+00, float 0.000000e+00> 74*9880d681SAndroid Build Coastguard Worker@constant.vector.f32 = constant <3 x float> <float -0.0, float 1.0, float 0.0> 75*9880d681SAndroid Build Coastguard Worker; CHECK: @constant.vector.f64 = constant <3 x double> <double -0.000000e+00, double 1.000000e+00, double 0.000000e+00> 76*9880d681SAndroid Build Coastguard Worker@constant.vector.f64 = constant <3 x double> <double -0.0, double 1.0, double 0.0> 77*9880d681SAndroid Build Coastguard Worker 78*9880d681SAndroid Build Coastguard Worker;; Global Variables 79*9880d681SAndroid Build Coastguard Worker; Format: [@<GlobalVarName> =] [Linkage] [Visibility] [DLLStorageClass] 80*9880d681SAndroid Build Coastguard Worker; [ThreadLocal] [unnamed_addr] [AddrSpace] [ExternallyInitialized] 81*9880d681SAndroid Build Coastguard Worker; <global | constant> <Type> [<InitializerConstant>] 82*9880d681SAndroid Build Coastguard Worker; [, section "name"] [, comdat [($name)]] [, align <Alignment>] 83*9880d681SAndroid Build Coastguard Worker 84*9880d681SAndroid Build Coastguard Worker; Global Variables -- Simple 85*9880d681SAndroid Build Coastguard Worker@g1 = global i32 0 86*9880d681SAndroid Build Coastguard Worker; CHECK: @g1 = global i32 0 87*9880d681SAndroid Build Coastguard Worker@g2 = constant i32 0 88*9880d681SAndroid Build Coastguard Worker; CHECK: @g2 = constant i32 0 89*9880d681SAndroid Build Coastguard Worker 90*9880d681SAndroid Build Coastguard Worker; Global Variables -- Linkage 91*9880d681SAndroid Build Coastguard Worker@g.private = private global i32 0 92*9880d681SAndroid Build Coastguard Worker; CHECK: @g.private = private global i32 0 93*9880d681SAndroid Build Coastguard Worker@g.internal = internal global i32 0 94*9880d681SAndroid Build Coastguard Worker; CHECK: @g.internal = internal global i32 0 95*9880d681SAndroid Build Coastguard Worker@g.available_externally = available_externally global i32 0 96*9880d681SAndroid Build Coastguard Worker; CHECK: @g.available_externally = available_externally global i32 0 97*9880d681SAndroid Build Coastguard Worker@g.linkonce = linkonce global i32 0 98*9880d681SAndroid Build Coastguard Worker; CHECK: @g.linkonce = linkonce global i32 0 99*9880d681SAndroid Build Coastguard Worker@g.weak = weak global i32 0 100*9880d681SAndroid Build Coastguard Worker; CHECK: @g.weak = weak global i32 0 101*9880d681SAndroid Build Coastguard Worker@g.common = common global i32 0 102*9880d681SAndroid Build Coastguard Worker; CHECK: @g.common = common global i32 0 103*9880d681SAndroid Build Coastguard Worker@g.appending = appending global [4 x i8] c"test" 104*9880d681SAndroid Build Coastguard Worker; CHECK: @g.appending = appending global [4 x i8] c"test" 105*9880d681SAndroid Build Coastguard Worker@g.extern_weak = extern_weak global i32 106*9880d681SAndroid Build Coastguard Worker; CHECK: @g.extern_weak = extern_weak global i32 107*9880d681SAndroid Build Coastguard Worker@g.linkonce_odr = linkonce_odr global i32 0 108*9880d681SAndroid Build Coastguard Worker; CHECK: @g.linkonce_odr = linkonce_odr global i32 0 109*9880d681SAndroid Build Coastguard Worker@g.weak_odr = weak_odr global i32 0 110*9880d681SAndroid Build Coastguard Worker; CHECK: @g.weak_odr = weak_odr global i32 0 111*9880d681SAndroid Build Coastguard Worker@g.external = external global i32 112*9880d681SAndroid Build Coastguard Worker; CHECK: @g.external = external global i32 113*9880d681SAndroid Build Coastguard Worker 114*9880d681SAndroid Build Coastguard Worker; Global Variables -- Visibility 115*9880d681SAndroid Build Coastguard Worker@g.default = default global i32 0 116*9880d681SAndroid Build Coastguard Worker; CHECK: @g.default = global i32 0 117*9880d681SAndroid Build Coastguard Worker@g.hidden = hidden global i32 0 118*9880d681SAndroid Build Coastguard Worker; CHECK: @g.hidden = hidden global i32 0 119*9880d681SAndroid Build Coastguard Worker@g.protected = protected global i32 0 120*9880d681SAndroid Build Coastguard Worker; CHECK: @g.protected = protected global i32 0 121*9880d681SAndroid Build Coastguard Worker 122*9880d681SAndroid Build Coastguard Worker; Global Variables -- DLLStorageClass 123*9880d681SAndroid Build Coastguard Worker@g.dlldefault = default global i32 0 124*9880d681SAndroid Build Coastguard Worker; CHECK: @g.dlldefault = global i32 0 125*9880d681SAndroid Build Coastguard Worker@g.dllimport = external dllimport global i32 126*9880d681SAndroid Build Coastguard Worker; CHECK: @g.dllimport = external dllimport global i32 127*9880d681SAndroid Build Coastguard Worker@g.dllexport = dllexport global i32 0 128*9880d681SAndroid Build Coastguard Worker; CHECK: @g.dllexport = dllexport global i32 0 129*9880d681SAndroid Build Coastguard Worker 130*9880d681SAndroid Build Coastguard Worker; Global Variables -- ThreadLocal 131*9880d681SAndroid Build Coastguard Worker@g.notthreadlocal = global i32 0 132*9880d681SAndroid Build Coastguard Worker; CHECK: @g.notthreadlocal = global i32 0 133*9880d681SAndroid Build Coastguard Worker@g.generaldynamic = thread_local global i32 0 134*9880d681SAndroid Build Coastguard Worker; CHECK: @g.generaldynamic = thread_local global i32 0 135*9880d681SAndroid Build Coastguard Worker@g.localdynamic = thread_local(localdynamic) global i32 0 136*9880d681SAndroid Build Coastguard Worker; CHECK: @g.localdynamic = thread_local(localdynamic) global i32 0 137*9880d681SAndroid Build Coastguard Worker@g.initialexec = thread_local(initialexec) global i32 0 138*9880d681SAndroid Build Coastguard Worker; CHECK: @g.initialexec = thread_local(initialexec) global i32 0 139*9880d681SAndroid Build Coastguard Worker@g.localexec = thread_local(localexec) global i32 0 140*9880d681SAndroid Build Coastguard Worker; CHECK: @g.localexec = thread_local(localexec) global i32 0 141*9880d681SAndroid Build Coastguard Worker 142*9880d681SAndroid Build Coastguard Worker; Global Variables -- unnamed_addr 143*9880d681SAndroid Build Coastguard Worker@g.unnamed_addr = unnamed_addr global i32 0 144*9880d681SAndroid Build Coastguard Worker; CHECK: @g.unnamed_addr = unnamed_addr global i32 0 145*9880d681SAndroid Build Coastguard Worker 146*9880d681SAndroid Build Coastguard Worker; Global Variables -- AddrSpace 147*9880d681SAndroid Build Coastguard Worker@g.addrspace = addrspace(1) global i32 0 148*9880d681SAndroid Build Coastguard Worker; CHECK: @g.addrspace = addrspace(1) global i32 0 149*9880d681SAndroid Build Coastguard Worker 150*9880d681SAndroid Build Coastguard Worker; Global Variables -- ExternallyInitialized 151*9880d681SAndroid Build Coastguard Worker@g.externally_initialized = external externally_initialized global i32 152*9880d681SAndroid Build Coastguard Worker; CHECK: @g.externally_initialized = external externally_initialized global i32 153*9880d681SAndroid Build Coastguard Worker 154*9880d681SAndroid Build Coastguard Worker; Global Variables -- section 155*9880d681SAndroid Build Coastguard Worker@g.section = global i32 0, section "_DATA" 156*9880d681SAndroid Build Coastguard Worker; CHECK: @g.section = global i32 0, section "_DATA" 157*9880d681SAndroid Build Coastguard Worker 158*9880d681SAndroid Build Coastguard Worker; Global Variables -- comdat 159*9880d681SAndroid Build Coastguard Worker@comdat.any = global i32 0, comdat 160*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.any = global i32 0, comdat 161*9880d681SAndroid Build Coastguard Worker@comdat.exactmatch = global i32 0, comdat 162*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.exactmatch = global i32 0, comdat 163*9880d681SAndroid Build Coastguard Worker@comdat.largest = global i32 0, comdat 164*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.largest = global i32 0, comdat 165*9880d681SAndroid Build Coastguard Worker@comdat.noduplicates = global i32 0, comdat 166*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.noduplicates = global i32 0, comdat 167*9880d681SAndroid Build Coastguard Worker@comdat.samesize = global i32 0, comdat 168*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.samesize = global i32 0, comdat 169*9880d681SAndroid Build Coastguard Worker 170*9880d681SAndroid Build Coastguard Worker; Force two globals from different comdats into sections with the same name. 171*9880d681SAndroid Build Coastguard Worker$comdat1 = comdat any 172*9880d681SAndroid Build Coastguard Worker$comdat2 = comdat any 173*9880d681SAndroid Build Coastguard Worker@g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1) 174*9880d681SAndroid Build Coastguard Worker; CHECK: @g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1) 175*9880d681SAndroid Build Coastguard Worker@g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2) 176*9880d681SAndroid Build Coastguard Worker; CHECK: @g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2) 177*9880d681SAndroid Build Coastguard Worker 178*9880d681SAndroid Build Coastguard Worker; Global Variables -- align 179*9880d681SAndroid Build Coastguard Worker@g.align = global i32 0, align 4 180*9880d681SAndroid Build Coastguard Worker; CHECK: @g.align = global i32 0, align 4 181*9880d681SAndroid Build Coastguard Worker 182*9880d681SAndroid Build Coastguard Worker; Global Variables -- Intrinsics 183*9880d681SAndroid Build Coastguard Worker%pri.func.data = type { i32, void ()*, i8* } 184*9880d681SAndroid Build Coastguard Worker@g.used1 = global i32 0 185*9880d681SAndroid Build Coastguard Worker@g.used2 = global i32 0 186*9880d681SAndroid Build Coastguard Worker@g.used3 = global i8 0 187*9880d681SAndroid Build Coastguard Workerdeclare void @g.f1() 188*9880d681SAndroid Build Coastguard Worker@llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata" 189*9880d681SAndroid Build Coastguard Worker; CHECK: @llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata" 190*9880d681SAndroid Build Coastguard Worker@llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata" 191*9880d681SAndroid Build Coastguard Worker; CHECK: @llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata" 192*9880d681SAndroid Build Coastguard Worker@llvm.global_ctors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata" 193*9880d681SAndroid Build Coastguard Worker; CHECK: @llvm.global_ctors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata" 194*9880d681SAndroid Build Coastguard Worker@llvm.global_dtors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata" 195*9880d681SAndroid Build Coastguard Worker; CHECK: @llvm.global_dtors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata" 196*9880d681SAndroid Build Coastguard Worker 197*9880d681SAndroid Build Coastguard Worker;; Aliases 198*9880d681SAndroid Build Coastguard Worker; Format: @<Name> = [Linkage] [Visibility] [DLLStorageClass] [ThreadLocal] 199*9880d681SAndroid Build Coastguard Worker; [unnamed_addr] alias <AliaseeTy> @<Aliasee> 200*9880d681SAndroid Build Coastguard Worker 201*9880d681SAndroid Build Coastguard Worker; Aliases -- Linkage 202*9880d681SAndroid Build Coastguard Worker@a.private = private alias i32, i32* @g.private 203*9880d681SAndroid Build Coastguard Worker; CHECK: @a.private = private alias i32, i32* @g.private 204*9880d681SAndroid Build Coastguard Worker@a.internal = internal alias i32, i32* @g.internal 205*9880d681SAndroid Build Coastguard Worker; CHECK: @a.internal = internal alias i32, i32* @g.internal 206*9880d681SAndroid Build Coastguard Worker@a.linkonce = linkonce alias i32, i32* @g.linkonce 207*9880d681SAndroid Build Coastguard Worker; CHECK: @a.linkonce = linkonce alias i32, i32* @g.linkonce 208*9880d681SAndroid Build Coastguard Worker@a.weak = weak alias i32, i32* @g.weak 209*9880d681SAndroid Build Coastguard Worker; CHECK: @a.weak = weak alias i32, i32* @g.weak 210*9880d681SAndroid Build Coastguard Worker@a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr 211*9880d681SAndroid Build Coastguard Worker; CHECK: @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr 212*9880d681SAndroid Build Coastguard Worker@a.weak_odr = weak_odr alias i32, i32* @g.weak_odr 213*9880d681SAndroid Build Coastguard Worker; CHECK: @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr 214*9880d681SAndroid Build Coastguard Worker@a.external = external alias i32, i32* @g1 215*9880d681SAndroid Build Coastguard Worker; CHECK: @a.external = alias i32, i32* @g1 216*9880d681SAndroid Build Coastguard Worker 217*9880d681SAndroid Build Coastguard Worker; Aliases -- Visibility 218*9880d681SAndroid Build Coastguard Worker@a.default = default alias i32, i32* @g.default 219*9880d681SAndroid Build Coastguard Worker; CHECK: @a.default = alias i32, i32* @g.default 220*9880d681SAndroid Build Coastguard Worker@a.hidden = hidden alias i32, i32* @g.hidden 221*9880d681SAndroid Build Coastguard Worker; CHECK: @a.hidden = hidden alias i32, i32* @g.hidden 222*9880d681SAndroid Build Coastguard Worker@a.protected = protected alias i32, i32* @g.protected 223*9880d681SAndroid Build Coastguard Worker; CHECK: @a.protected = protected alias i32, i32* @g.protected 224*9880d681SAndroid Build Coastguard Worker 225*9880d681SAndroid Build Coastguard Worker; Aliases -- DLLStorageClass 226*9880d681SAndroid Build Coastguard Worker@a.dlldefault = default alias i32, i32* @g.dlldefault 227*9880d681SAndroid Build Coastguard Worker; CHECK: @a.dlldefault = alias i32, i32* @g.dlldefault 228*9880d681SAndroid Build Coastguard Worker@a.dllimport = dllimport alias i32, i32* @g1 229*9880d681SAndroid Build Coastguard Worker; CHECK: @a.dllimport = dllimport alias i32, i32* @g1 230*9880d681SAndroid Build Coastguard Worker@a.dllexport = dllexport alias i32, i32* @g.dllexport 231*9880d681SAndroid Build Coastguard Worker; CHECK: @a.dllexport = dllexport alias i32, i32* @g.dllexport 232*9880d681SAndroid Build Coastguard Worker 233*9880d681SAndroid Build Coastguard Worker; Aliases -- ThreadLocal 234*9880d681SAndroid Build Coastguard Worker@a.notthreadlocal = alias i32, i32* @g.notthreadlocal 235*9880d681SAndroid Build Coastguard Worker; CHECK: @a.notthreadlocal = alias i32, i32* @g.notthreadlocal 236*9880d681SAndroid Build Coastguard Worker@a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic 237*9880d681SAndroid Build Coastguard Worker; CHECK: @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic 238*9880d681SAndroid Build Coastguard Worker@a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic 239*9880d681SAndroid Build Coastguard Worker; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic 240*9880d681SAndroid Build Coastguard Worker@a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec 241*9880d681SAndroid Build Coastguard Worker; CHECK: @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec 242*9880d681SAndroid Build Coastguard Worker@a.localexec = thread_local(localexec) alias i32, i32* @g.localexec 243*9880d681SAndroid Build Coastguard Worker; CHECK: @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec 244*9880d681SAndroid Build Coastguard Worker 245*9880d681SAndroid Build Coastguard Worker; Aliases -- unnamed_addr 246*9880d681SAndroid Build Coastguard Worker@a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr 247*9880d681SAndroid Build Coastguard Worker; CHECK: @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr 248*9880d681SAndroid Build Coastguard Worker 249*9880d681SAndroid Build Coastguard Worker;; Functions 250*9880d681SAndroid Build Coastguard Worker; Format: define [linkage] [visibility] [DLLStorageClass] 251*9880d681SAndroid Build Coastguard Worker; [cconv] [ret attrs] 252*9880d681SAndroid Build Coastguard Worker; <ResultType> @<FunctionName> ([argument list]) 253*9880d681SAndroid Build Coastguard Worker; [unnamed_addr] [fn Attrs] [section "name"] [comdat [($name)]] 254*9880d681SAndroid Build Coastguard Worker; [align N] [gc] [prefix Constant] [prologue Constant] 255*9880d681SAndroid Build Coastguard Worker; [personality Constant] { ... } 256*9880d681SAndroid Build Coastguard Worker 257*9880d681SAndroid Build Coastguard Worker; Functions -- Simple 258*9880d681SAndroid Build Coastguard Workerdeclare void @f1 () 259*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f1() 260*9880d681SAndroid Build Coastguard Worker 261*9880d681SAndroid Build Coastguard Workerdefine void @f2 () { 262*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f2() 263*9880d681SAndroid Build Coastguard Workerentry: 264*9880d681SAndroid Build Coastguard Worker ret void 265*9880d681SAndroid Build Coastguard Worker} 266*9880d681SAndroid Build Coastguard Worker 267*9880d681SAndroid Build Coastguard Worker; Functions -- linkage 268*9880d681SAndroid Build Coastguard Workerdefine private void @f.private() { 269*9880d681SAndroid Build Coastguard Worker; CHECK: define private void @f.private() 270*9880d681SAndroid Build Coastguard Workerentry: 271*9880d681SAndroid Build Coastguard Worker ret void 272*9880d681SAndroid Build Coastguard Worker} 273*9880d681SAndroid Build Coastguard Workerdefine internal void @f.internal() { 274*9880d681SAndroid Build Coastguard Worker; CHECK: define internal void @f.internal() 275*9880d681SAndroid Build Coastguard Workerentry: 276*9880d681SAndroid Build Coastguard Worker ret void 277*9880d681SAndroid Build Coastguard Worker} 278*9880d681SAndroid Build Coastguard Workerdefine available_externally void @f.available_externally() { 279*9880d681SAndroid Build Coastguard Worker; CHECK: define available_externally void @f.available_externally() 280*9880d681SAndroid Build Coastguard Workerentry: 281*9880d681SAndroid Build Coastguard Worker ret void 282*9880d681SAndroid Build Coastguard Worker} 283*9880d681SAndroid Build Coastguard Workerdefine linkonce void @f.linkonce() { 284*9880d681SAndroid Build Coastguard Worker; CHECK: define linkonce void @f.linkonce() 285*9880d681SAndroid Build Coastguard Workerentry: 286*9880d681SAndroid Build Coastguard Worker ret void 287*9880d681SAndroid Build Coastguard Worker} 288*9880d681SAndroid Build Coastguard Workerdefine weak void @f.weak() { 289*9880d681SAndroid Build Coastguard Worker; CHECK: define weak void @f.weak() 290*9880d681SAndroid Build Coastguard Workerentry: 291*9880d681SAndroid Build Coastguard Worker ret void 292*9880d681SAndroid Build Coastguard Worker} 293*9880d681SAndroid Build Coastguard Workerdefine linkonce_odr void @f.linkonce_odr() { 294*9880d681SAndroid Build Coastguard Worker; CHECK: define linkonce_odr void @f.linkonce_odr() 295*9880d681SAndroid Build Coastguard Workerentry: 296*9880d681SAndroid Build Coastguard Worker ret void 297*9880d681SAndroid Build Coastguard Worker} 298*9880d681SAndroid Build Coastguard Workerdefine weak_odr void @f.weak_odr() { 299*9880d681SAndroid Build Coastguard Worker; CHECK: define weak_odr void @f.weak_odr() 300*9880d681SAndroid Build Coastguard Workerentry: 301*9880d681SAndroid Build Coastguard Worker ret void 302*9880d681SAndroid Build Coastguard Worker} 303*9880d681SAndroid Build Coastguard Workerdeclare external void @f.external() 304*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.external() 305*9880d681SAndroid Build Coastguard Workerdeclare extern_weak void @f.extern_weak() 306*9880d681SAndroid Build Coastguard Worker; CHECK: declare extern_weak void @f.extern_weak() 307*9880d681SAndroid Build Coastguard Worker 308*9880d681SAndroid Build Coastguard Worker; Functions -- visibility 309*9880d681SAndroid Build Coastguard Workerdeclare default void @f.default() 310*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.default() 311*9880d681SAndroid Build Coastguard Workerdeclare hidden void @f.hidden() 312*9880d681SAndroid Build Coastguard Worker; CHECK: declare hidden void @f.hidden() 313*9880d681SAndroid Build Coastguard Workerdeclare protected void @f.protected() 314*9880d681SAndroid Build Coastguard Worker; CHECK: declare protected void @f.protected() 315*9880d681SAndroid Build Coastguard Worker 316*9880d681SAndroid Build Coastguard Worker; Functions -- DLLStorageClass 317*9880d681SAndroid Build Coastguard Workerdeclare dllimport void @f.dllimport() 318*9880d681SAndroid Build Coastguard Worker; CHECK: declare dllimport void @f.dllimport() 319*9880d681SAndroid Build Coastguard Workerdeclare dllexport void @f.dllexport() 320*9880d681SAndroid Build Coastguard Worker; CHECK: declare dllexport void @f.dllexport() 321*9880d681SAndroid Build Coastguard Worker 322*9880d681SAndroid Build Coastguard Worker; Functions -- cconv (Calling conventions) 323*9880d681SAndroid Build Coastguard Workerdeclare ccc void @f.ccc() 324*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.ccc() 325*9880d681SAndroid Build Coastguard Workerdeclare fastcc void @f.fastcc() 326*9880d681SAndroid Build Coastguard Worker; CHECK: declare fastcc void @f.fastcc() 327*9880d681SAndroid Build Coastguard Workerdeclare coldcc void @f.coldcc() 328*9880d681SAndroid Build Coastguard Worker; CHECK: declare coldcc void @f.coldcc() 329*9880d681SAndroid Build Coastguard Workerdeclare cc10 void @f.cc10() 330*9880d681SAndroid Build Coastguard Worker; CHECK: declare ghccc void @f.cc10() 331*9880d681SAndroid Build Coastguard Workerdeclare ghccc void @f.ghccc() 332*9880d681SAndroid Build Coastguard Worker; CHECK: declare ghccc void @f.ghccc() 333*9880d681SAndroid Build Coastguard Workerdeclare cc11 void @f.cc11() 334*9880d681SAndroid Build Coastguard Worker; CHECK: declare cc11 void @f.cc11() 335*9880d681SAndroid Build Coastguard Workerdeclare webkit_jscc void @f.webkit_jscc() 336*9880d681SAndroid Build Coastguard Worker; CHECK: declare webkit_jscc void @f.webkit_jscc() 337*9880d681SAndroid Build Coastguard Workerdeclare anyregcc void @f.anyregcc() 338*9880d681SAndroid Build Coastguard Worker; CHECK: declare anyregcc void @f.anyregcc() 339*9880d681SAndroid Build Coastguard Workerdeclare preserve_mostcc void @f.preserve_mostcc() 340*9880d681SAndroid Build Coastguard Worker; CHECK: declare preserve_mostcc void @f.preserve_mostcc() 341*9880d681SAndroid Build Coastguard Workerdeclare preserve_allcc void @f.preserve_allcc() 342*9880d681SAndroid Build Coastguard Worker; CHECK: declare preserve_allcc void @f.preserve_allcc() 343*9880d681SAndroid Build Coastguard Workerdeclare cc64 void @f.cc64() 344*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_stdcallcc void @f.cc64() 345*9880d681SAndroid Build Coastguard Workerdeclare x86_stdcallcc void @f.x86_stdcallcc() 346*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_stdcallcc void @f.x86_stdcallcc() 347*9880d681SAndroid Build Coastguard Workerdeclare cc65 void @f.cc65() 348*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_fastcallcc void @f.cc65() 349*9880d681SAndroid Build Coastguard Workerdeclare x86_fastcallcc void @f.x86_fastcallcc() 350*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_fastcallcc void @f.x86_fastcallcc() 351*9880d681SAndroid Build Coastguard Workerdeclare cc66 void @f.cc66() 352*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_apcscc void @f.cc66() 353*9880d681SAndroid Build Coastguard Workerdeclare arm_apcscc void @f.arm_apcscc() 354*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_apcscc void @f.arm_apcscc() 355*9880d681SAndroid Build Coastguard Workerdeclare cc67 void @f.cc67() 356*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcscc void @f.cc67() 357*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcscc void @f.arm_aapcscc() 358*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcscc void @f.arm_aapcscc() 359*9880d681SAndroid Build Coastguard Workerdeclare cc68 void @f.cc68() 360*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcs_vfpcc void @f.cc68() 361*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc() 362*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc() 363*9880d681SAndroid Build Coastguard Workerdeclare cc69 void @f.cc69() 364*9880d681SAndroid Build Coastguard Worker; CHECK: declare msp430_intrcc void @f.cc69() 365*9880d681SAndroid Build Coastguard Workerdeclare msp430_intrcc void @f.msp430_intrcc() 366*9880d681SAndroid Build Coastguard Worker; CHECK: declare msp430_intrcc void @f.msp430_intrcc() 367*9880d681SAndroid Build Coastguard Workerdeclare cc70 void @f.cc70() 368*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_thiscallcc void @f.cc70() 369*9880d681SAndroid Build Coastguard Workerdeclare x86_thiscallcc void @f.x86_thiscallcc() 370*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_thiscallcc void @f.x86_thiscallcc() 371*9880d681SAndroid Build Coastguard Workerdeclare cc71 void @f.cc71() 372*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_kernel void @f.cc71() 373*9880d681SAndroid Build Coastguard Workerdeclare ptx_kernel void @f.ptx_kernel() 374*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_kernel void @f.ptx_kernel() 375*9880d681SAndroid Build Coastguard Workerdeclare cc72 void @f.cc72() 376*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_device void @f.cc72() 377*9880d681SAndroid Build Coastguard Workerdeclare ptx_device void @f.ptx_device() 378*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_device void @f.ptx_device() 379*9880d681SAndroid Build Coastguard Workerdeclare cc75 void @f.cc75() 380*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_func void @f.cc75() 381*9880d681SAndroid Build Coastguard Workerdeclare spir_func void @f.spir_func() 382*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_func void @f.spir_func() 383*9880d681SAndroid Build Coastguard Workerdeclare cc76 void @f.cc76() 384*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_kernel void @f.cc76() 385*9880d681SAndroid Build Coastguard Workerdeclare spir_kernel void @f.spir_kernel() 386*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_kernel void @f.spir_kernel() 387*9880d681SAndroid Build Coastguard Workerdeclare cc77 void @f.cc77() 388*9880d681SAndroid Build Coastguard Worker; CHECK: declare intel_ocl_bicc void @f.cc77() 389*9880d681SAndroid Build Coastguard Workerdeclare intel_ocl_bicc void @f.intel_ocl_bicc() 390*9880d681SAndroid Build Coastguard Worker; CHECK: declare intel_ocl_bicc void @f.intel_ocl_bicc() 391*9880d681SAndroid Build Coastguard Workerdeclare cc78 void @f.cc78() 392*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_sysvcc void @f.cc78() 393*9880d681SAndroid Build Coastguard Workerdeclare x86_64_sysvcc void @f.x86_64_sysvcc() 394*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_sysvcc void @f.x86_64_sysvcc() 395*9880d681SAndroid Build Coastguard Workerdeclare cc79 void @f.cc79() 396*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_win64cc void @f.cc79() 397*9880d681SAndroid Build Coastguard Workerdeclare x86_64_win64cc void @f.x86_64_win64cc() 398*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_win64cc void @f.x86_64_win64cc() 399*9880d681SAndroid Build Coastguard Workerdeclare cc80 void @f.cc80() 400*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_vectorcallcc void @f.cc80() 401*9880d681SAndroid Build Coastguard Workerdeclare x86_vectorcallcc void @f.x86_vectorcallcc() 402*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_vectorcallcc void @f.x86_vectorcallcc() 403*9880d681SAndroid Build Coastguard Workerdeclare cc1023 void @f.cc1023() 404*9880d681SAndroid Build Coastguard Worker; CHECK: declare cc1023 void @f.cc1023() 405*9880d681SAndroid Build Coastguard Worker 406*9880d681SAndroid Build Coastguard Worker; Functions -- ret attrs (Return attributes) 407*9880d681SAndroid Build Coastguard Workerdeclare zeroext i64 @f.zeroext() 408*9880d681SAndroid Build Coastguard Worker; CHECK: declare zeroext i64 @f.zeroext() 409*9880d681SAndroid Build Coastguard Workerdeclare signext i64 @f.signext() 410*9880d681SAndroid Build Coastguard Worker; CHECK: declare signext i64 @f.signext() 411*9880d681SAndroid Build Coastguard Workerdeclare inreg i32* @f.inreg() 412*9880d681SAndroid Build Coastguard Worker; CHECK: declare inreg i32* @f.inreg() 413*9880d681SAndroid Build Coastguard Workerdeclare noalias i32* @f.noalias() 414*9880d681SAndroid Build Coastguard Worker; CHECK: declare noalias i32* @f.noalias() 415*9880d681SAndroid Build Coastguard Workerdeclare nonnull i32* @f.nonnull() 416*9880d681SAndroid Build Coastguard Worker; CHECK: declare nonnull i32* @f.nonnull() 417*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable(4) i32* @f.dereferenceable4() 418*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable(4) i32* @f.dereferenceable4() 419*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable(8) i32* @f.dereferenceable8() 420*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable(8) i32* @f.dereferenceable8() 421*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable(16) i32* @f.dereferenceable16() 422*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable(16) i32* @f.dereferenceable16() 423*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable_or_null(4) i32* @f.dereferenceable4_or_null() 424*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable_or_null(4) i32* @f.dereferenceable4_or_null() 425*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable_or_null(8) i32* @f.dereferenceable8_or_null() 426*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable_or_null(8) i32* @f.dereferenceable8_or_null() 427*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable_or_null(16) i32* @f.dereferenceable16_or_null() 428*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable_or_null(16) i32* @f.dereferenceable16_or_null() 429*9880d681SAndroid Build Coastguard Worker 430*9880d681SAndroid Build Coastguard Worker; Functions -- Parameter attributes 431*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.zeroext(i8 zeroext) 432*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.zeroext(i8 zeroext) 433*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.signext(i8 signext) 434*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.signext(i8 signext) 435*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.inreg(i8 inreg) 436*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.inreg(i8 inreg) 437*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.byval({ i8, i8 }* byval) 438*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.byval({ i8, i8 }* byval) 439*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.inalloca(i8* inalloca) 440*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.inalloca(i8* inalloca) 441*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.sret(i8* sret) 442*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.sret(i8* sret) 443*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.noalias(i8* noalias) 444*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.noalias(i8* noalias) 445*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.nocapture(i8* nocapture) 446*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.nocapture(i8* nocapture) 447*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.nest(i8* nest) 448*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.nest(i8* nest) 449*9880d681SAndroid Build Coastguard Workerdeclare i8* @f.param.returned(i8* returned) 450*9880d681SAndroid Build Coastguard Worker; CHECK: declare i8* @f.param.returned(i8* returned) 451*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.nonnull(i8* nonnull) 452*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.nonnull(i8* nonnull) 453*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.dereferenceable(i8* dereferenceable(4)) 454*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.dereferenceable(i8* dereferenceable(4)) 455*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.dereferenceable_or_null(i8* dereferenceable_or_null(4)) 456*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.dereferenceable_or_null(i8* dereferenceable_or_null(4)) 457*9880d681SAndroid Build Coastguard Worker 458*9880d681SAndroid Build Coastguard Worker; Functions -- unnamed_addr 459*9880d681SAndroid Build Coastguard Workerdeclare void @f.unnamed_addr() unnamed_addr 460*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.unnamed_addr() unnamed_addr 461*9880d681SAndroid Build Coastguard Worker 462*9880d681SAndroid Build Coastguard Worker; Functions -- fn Attrs (Function attributes) 463*9880d681SAndroid Build Coastguard Workerdeclare void @f.alignstack4() alignstack(4) 464*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.alignstack4() #0 465*9880d681SAndroid Build Coastguard Workerdeclare void @f.alignstack8() alignstack(8) 466*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.alignstack8() #1 467*9880d681SAndroid Build Coastguard Workerdeclare void @f.alwaysinline() alwaysinline 468*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.alwaysinline() #2 469*9880d681SAndroid Build Coastguard Workerdeclare void @f.cold() cold 470*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.cold() #3 471*9880d681SAndroid Build Coastguard Workerdeclare void @f.convergent() convergent 472*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.convergent() #4 473*9880d681SAndroid Build Coastguard Workerdeclare void @f.inlinehint() inlinehint 474*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.inlinehint() #5 475*9880d681SAndroid Build Coastguard Workerdeclare void @f.jumptable() unnamed_addr jumptable 476*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.jumptable() unnamed_addr #6 477*9880d681SAndroid Build Coastguard Workerdeclare void @f.minsize() minsize 478*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.minsize() #7 479*9880d681SAndroid Build Coastguard Workerdeclare void @f.naked() naked 480*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.naked() #8 481*9880d681SAndroid Build Coastguard Workerdeclare void @f.nobuiltin() nobuiltin 482*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.nobuiltin() #9 483*9880d681SAndroid Build Coastguard Workerdeclare void @f.noduplicate() noduplicate 484*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noduplicate() #10 485*9880d681SAndroid Build Coastguard Workerdeclare void @f.noimplicitfloat() noimplicitfloat 486*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noimplicitfloat() #11 487*9880d681SAndroid Build Coastguard Workerdeclare void @f.noinline() noinline 488*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noinline() #12 489*9880d681SAndroid Build Coastguard Workerdeclare void @f.nonlazybind() nonlazybind 490*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.nonlazybind() #13 491*9880d681SAndroid Build Coastguard Workerdeclare void @f.noredzone() noredzone 492*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noredzone() #14 493*9880d681SAndroid Build Coastguard Workerdeclare void @f.noreturn() noreturn 494*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noreturn() #15 495*9880d681SAndroid Build Coastguard Workerdeclare void @f.nounwind() nounwind 496*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.nounwind() #16 497*9880d681SAndroid Build Coastguard Workerdeclare void @f.optnone() noinline optnone 498*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.optnone() #17 499*9880d681SAndroid Build Coastguard Workerdeclare void @f.optsize() optsize 500*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.optsize() #18 501*9880d681SAndroid Build Coastguard Workerdeclare void @f.readnone() readnone 502*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.readnone() #19 503*9880d681SAndroid Build Coastguard Workerdeclare void @f.readonly() readonly 504*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.readonly() #20 505*9880d681SAndroid Build Coastguard Workerdeclare void @f.returns_twice() returns_twice 506*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.returns_twice() #21 507*9880d681SAndroid Build Coastguard Workerdeclare void @f.safestack() safestack 508*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.safestack() #22 509*9880d681SAndroid Build Coastguard Workerdeclare void @f.sanitize_address() sanitize_address 510*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sanitize_address() #23 511*9880d681SAndroid Build Coastguard Workerdeclare void @f.sanitize_memory() sanitize_memory 512*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sanitize_memory() #24 513*9880d681SAndroid Build Coastguard Workerdeclare void @f.sanitize_thread() sanitize_thread 514*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sanitize_thread() #25 515*9880d681SAndroid Build Coastguard Workerdeclare void @f.ssp() ssp 516*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.ssp() #26 517*9880d681SAndroid Build Coastguard Workerdeclare void @f.sspreq() sspreq 518*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sspreq() #27 519*9880d681SAndroid Build Coastguard Workerdeclare void @f.sspstrong() sspstrong 520*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sspstrong() #28 521*9880d681SAndroid Build Coastguard Workerdeclare void @f.thunk() "thunk" 522*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.thunk() #29 523*9880d681SAndroid Build Coastguard Workerdeclare void @f.uwtable() uwtable 524*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.uwtable() #30 525*9880d681SAndroid Build Coastguard Workerdeclare void @f.kvpair() "cpu"="cortex-a8" 526*9880d681SAndroid Build Coastguard Worker; CHECK:declare void @f.kvpair() #31 527*9880d681SAndroid Build Coastguard Workerdeclare void @f.norecurse() norecurse 528*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.norecurse() #32 529*9880d681SAndroid Build Coastguard Workerdeclare void @f.inaccessiblememonly() inaccessiblememonly 530*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.inaccessiblememonly() #33 531*9880d681SAndroid Build Coastguard Workerdeclare void @f.inaccessiblemem_or_argmemonly() inaccessiblemem_or_argmemonly 532*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.inaccessiblemem_or_argmemonly() #34 533*9880d681SAndroid Build Coastguard Worker 534*9880d681SAndroid Build Coastguard Worker; Functions -- section 535*9880d681SAndroid Build Coastguard Workerdeclare void @f.section() section "80" 536*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.section() section "80" 537*9880d681SAndroid Build Coastguard Worker 538*9880d681SAndroid Build Coastguard Worker; Functions -- comdat 539*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_any() comdat($comdat.any) { 540*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_any() comdat($comdat.any) 541*9880d681SAndroid Build Coastguard Workerentry: 542*9880d681SAndroid Build Coastguard Worker ret void 543*9880d681SAndroid Build Coastguard Worker} 544*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_exactmatch() comdat($comdat.exactmatch) { 545*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_exactmatch() comdat($comdat.exactmatch) 546*9880d681SAndroid Build Coastguard Workerentry: 547*9880d681SAndroid Build Coastguard Worker ret void 548*9880d681SAndroid Build Coastguard Worker} 549*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_largest() comdat($comdat.largest) { 550*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_largest() comdat($comdat.largest) 551*9880d681SAndroid Build Coastguard Workerentry: 552*9880d681SAndroid Build Coastguard Worker ret void 553*9880d681SAndroid Build Coastguard Worker} 554*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_noduplicates() comdat($comdat.noduplicates) { 555*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_noduplicates() comdat($comdat.noduplicates) 556*9880d681SAndroid Build Coastguard Workerentry: 557*9880d681SAndroid Build Coastguard Worker ret void 558*9880d681SAndroid Build Coastguard Worker} 559*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_samesize() comdat($comdat.samesize) { 560*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_samesize() comdat($comdat.samesize) 561*9880d681SAndroid Build Coastguard Workerentry: 562*9880d681SAndroid Build Coastguard Worker ret void 563*9880d681SAndroid Build Coastguard Worker} 564*9880d681SAndroid Build Coastguard Worker 565*9880d681SAndroid Build Coastguard Worker; Functions -- align 566*9880d681SAndroid Build Coastguard Workerdeclare void @f.align2() align 2 567*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.align2() align 2 568*9880d681SAndroid Build Coastguard Workerdeclare void @f.align4() align 4 569*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.align4() align 4 570*9880d681SAndroid Build Coastguard Workerdeclare void @f.align8() align 8 571*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.align8() align 8 572*9880d681SAndroid Build Coastguard Worker 573*9880d681SAndroid Build Coastguard Worker; Functions -- GC 574*9880d681SAndroid Build Coastguard Workerdeclare void @f.gcshadow() gc "shadow-stack" 575*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.gcshadow() gc "shadow-stack" 576*9880d681SAndroid Build Coastguard Worker 577*9880d681SAndroid Build Coastguard Worker; Functions -- Prefix data 578*9880d681SAndroid Build Coastguard Workerdeclare void @f.prefixi32() prefix i32 1684365668 579*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.prefixi32() prefix i32 1684365668 580*9880d681SAndroid Build Coastguard Workerdeclare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3] 581*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3] 582*9880d681SAndroid Build Coastguard Worker 583*9880d681SAndroid Build Coastguard Worker; Functions -- Prologue data 584*9880d681SAndroid Build Coastguard Workerdeclare void @f.prologuei32() prologue i32 1684365669 585*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.prologuei32() prologue i32 1684365669 586*9880d681SAndroid Build Coastguard Workerdeclare void @f.prologuearray() prologue [4 x i32] [i32 0, i32 1, i32 2, i32 3] 587*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.prologuearray() prologue [4 x i32] [i32 0, i32 1, i32 2, i32 3] 588*9880d681SAndroid Build Coastguard Worker 589*9880d681SAndroid Build Coastguard Worker; Functions -- Personality constant 590*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.donothing() nounwind readnone 591*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @llvm.donothing() #35 592*9880d681SAndroid Build Coastguard Workerdefine void @f.no_personality() personality i8 3 { 593*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.no_personality() personality i8 3 594*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %normal unwind label %exception 595*9880d681SAndroid Build Coastguard Workerexception: 596*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i8 cleanup 597*9880d681SAndroid Build Coastguard Worker br label %normal 598*9880d681SAndroid Build Coastguard Workernormal: 599*9880d681SAndroid Build Coastguard Worker ret void 600*9880d681SAndroid Build Coastguard Worker} 601*9880d681SAndroid Build Coastguard Worker 602*9880d681SAndroid Build Coastguard Workerdeclare i32 @f.personality_handler() 603*9880d681SAndroid Build Coastguard Worker; CHECK: declare i32 @f.personality_handler() 604*9880d681SAndroid Build Coastguard Workerdefine void @f.personality() personality i32 ()* @f.personality_handler { 605*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.personality() personality i32 ()* @f.personality_handler 606*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %normal unwind label %exception 607*9880d681SAndroid Build Coastguard Workerexception: 608*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i32 cleanup 609*9880d681SAndroid Build Coastguard Worker br label %normal 610*9880d681SAndroid Build Coastguard Workernormal: 611*9880d681SAndroid Build Coastguard Worker ret void 612*9880d681SAndroid Build Coastguard Worker} 613*9880d681SAndroid Build Coastguard Worker 614*9880d681SAndroid Build Coastguard Worker;; Atomic Memory Ordering Constraints 615*9880d681SAndroid Build Coastguard Workerdefine void @atomics(i32* %word) { 616*9880d681SAndroid Build Coastguard Worker %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic 617*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic 618*9880d681SAndroid Build Coastguard Worker %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic 619*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic 620*9880d681SAndroid Build Coastguard Worker %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic 621*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic 622*9880d681SAndroid Build Coastguard Worker %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic 623*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic 624*9880d681SAndroid Build Coastguard Worker %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic 625*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic 626*9880d681SAndroid Build Coastguard Worker %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic 627*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic 628*9880d681SAndroid Build Coastguard Worker %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic 629*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic 630*9880d681SAndroid Build Coastguard Worker %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 singlethread seq_cst monotonic 631*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 singlethread seq_cst monotonic 632*9880d681SAndroid Build Coastguard Worker %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic 633*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic 634*9880d681SAndroid Build Coastguard Worker %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic 635*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic 636*9880d681SAndroid Build Coastguard Worker %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic 637*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic 638*9880d681SAndroid Build Coastguard Worker %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic 639*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic 640*9880d681SAndroid Build Coastguard Worker %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic 641*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic 642*9880d681SAndroid Build Coastguard Worker %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic 643*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic 644*9880d681SAndroid Build Coastguard Worker %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic 645*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic 646*9880d681SAndroid Build Coastguard Worker %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic 647*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic 648*9880d681SAndroid Build Coastguard Worker %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic 649*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic 650*9880d681SAndroid Build Coastguard Worker %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 singlethread monotonic 651*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 singlethread monotonic 652*9880d681SAndroid Build Coastguard Worker %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 singlethread monotonic 653*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 singlethread monotonic 654*9880d681SAndroid Build Coastguard Worker fence acquire 655*9880d681SAndroid Build Coastguard Worker ; CHECK: fence acquire 656*9880d681SAndroid Build Coastguard Worker fence release 657*9880d681SAndroid Build Coastguard Worker ; CHECK: fence release 658*9880d681SAndroid Build Coastguard Worker fence acq_rel 659*9880d681SAndroid Build Coastguard Worker ; CHECK: fence acq_rel 660*9880d681SAndroid Build Coastguard Worker fence singlethread seq_cst 661*9880d681SAndroid Build Coastguard Worker ; CHECK: fence singlethread seq_cst 662*9880d681SAndroid Build Coastguard Worker 663*9880d681SAndroid Build Coastguard Worker %ld.1 = load atomic i32, i32* %word monotonic, align 4 664*9880d681SAndroid Build Coastguard Worker ; CHECK: %ld.1 = load atomic i32, i32* %word monotonic, align 4 665*9880d681SAndroid Build Coastguard Worker %ld.2 = load atomic volatile i32, i32* %word acquire, align 8 666*9880d681SAndroid Build Coastguard Worker ; CHECK: %ld.2 = load atomic volatile i32, i32* %word acquire, align 8 667*9880d681SAndroid Build Coastguard Worker %ld.3 = load atomic volatile i32, i32* %word singlethread seq_cst, align 16 668*9880d681SAndroid Build Coastguard Worker ; CHECK: %ld.3 = load atomic volatile i32, i32* %word singlethread seq_cst, align 16 669*9880d681SAndroid Build Coastguard Worker 670*9880d681SAndroid Build Coastguard Worker store atomic i32 23, i32* %word monotonic, align 4 671*9880d681SAndroid Build Coastguard Worker ; CHECK: store atomic i32 23, i32* %word monotonic, align 4 672*9880d681SAndroid Build Coastguard Worker store atomic volatile i32 24, i32* %word monotonic, align 4 673*9880d681SAndroid Build Coastguard Worker ; CHECK: store atomic volatile i32 24, i32* %word monotonic, align 4 674*9880d681SAndroid Build Coastguard Worker store atomic volatile i32 25, i32* %word singlethread monotonic, align 4 675*9880d681SAndroid Build Coastguard Worker ; CHECK: store atomic volatile i32 25, i32* %word singlethread monotonic, align 4 676*9880d681SAndroid Build Coastguard Worker ret void 677*9880d681SAndroid Build Coastguard Worker} 678*9880d681SAndroid Build Coastguard Worker 679*9880d681SAndroid Build Coastguard Worker;; Fast Math Flags 680*9880d681SAndroid Build Coastguard Workerdefine void @fastmathflags(float %op1, float %op2) { 681*9880d681SAndroid Build Coastguard Worker %f.nnan = fadd nnan float %op1, %op2 682*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.nnan = fadd nnan float %op1, %op2 683*9880d681SAndroid Build Coastguard Worker %f.ninf = fadd ninf float %op1, %op2 684*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.ninf = fadd ninf float %op1, %op2 685*9880d681SAndroid Build Coastguard Worker %f.nsz = fadd nsz float %op1, %op2 686*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.nsz = fadd nsz float %op1, %op2 687*9880d681SAndroid Build Coastguard Worker %f.arcp = fadd arcp float %op1, %op2 688*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.arcp = fadd arcp float %op1, %op2 689*9880d681SAndroid Build Coastguard Worker %f.fast = fadd fast float %op1, %op2 690*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.fast = fadd fast float %op1, %op2 691*9880d681SAndroid Build Coastguard Worker ret void 692*9880d681SAndroid Build Coastguard Worker} 693*9880d681SAndroid Build Coastguard Worker 694*9880d681SAndroid Build Coastguard Worker; Check various fast math flags and floating-point types on calls. 695*9880d681SAndroid Build Coastguard Worker 696*9880d681SAndroid Build Coastguard Workerdeclare float @fmf1() 697*9880d681SAndroid Build Coastguard Workerdeclare double @fmf2() 698*9880d681SAndroid Build Coastguard Workerdeclare <4 x double> @fmf3() 699*9880d681SAndroid Build Coastguard Worker 700*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fastMathFlagsForCalls( 701*9880d681SAndroid Build Coastguard Workerdefine void @fastMathFlagsForCalls(float %f, double %d1, <4 x double> %d2) { 702*9880d681SAndroid Build Coastguard Worker %call.fast = call fast float @fmf1() 703*9880d681SAndroid Build Coastguard Worker ; CHECK: %call.fast = call fast float @fmf1() 704*9880d681SAndroid Build Coastguard Worker 705*9880d681SAndroid Build Coastguard Worker ; Throw in some other attributes to make sure those stay in the right places. 706*9880d681SAndroid Build Coastguard Worker 707*9880d681SAndroid Build Coastguard Worker %call.nsz.arcp = notail call nsz arcp double @fmf2() 708*9880d681SAndroid Build Coastguard Worker ; CHECK: %call.nsz.arcp = notail call nsz arcp double @fmf2() 709*9880d681SAndroid Build Coastguard Worker 710*9880d681SAndroid Build Coastguard Worker %call.nnan.ninf = tail call nnan ninf fastcc <4 x double> @fmf3() 711*9880d681SAndroid Build Coastguard Worker ; CHECK: %call.nnan.ninf = tail call nnan ninf fastcc <4 x double> @fmf3() 712*9880d681SAndroid Build Coastguard Worker 713*9880d681SAndroid Build Coastguard Worker ret void 714*9880d681SAndroid Build Coastguard Worker} 715*9880d681SAndroid Build Coastguard Worker 716*9880d681SAndroid Build Coastguard Worker;; Type System 717*9880d681SAndroid Build Coastguard Worker%opaquety = type opaque 718*9880d681SAndroid Build Coastguard Workerdefine void @typesystem() { 719*9880d681SAndroid Build Coastguard Worker %p0 = bitcast i8* null to i32 (i32)* 720*9880d681SAndroid Build Coastguard Worker ; CHECK: %p0 = bitcast i8* null to i32 (i32)* 721*9880d681SAndroid Build Coastguard Worker %p1 = bitcast i8* null to void (i8*)* 722*9880d681SAndroid Build Coastguard Worker ; CHECK: %p1 = bitcast i8* null to void (i8*)* 723*9880d681SAndroid Build Coastguard Worker %p2 = bitcast i8* null to i32 (i8*, ...)* 724*9880d681SAndroid Build Coastguard Worker ; CHECK: %p2 = bitcast i8* null to i32 (i8*, ...)* 725*9880d681SAndroid Build Coastguard Worker %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)* 726*9880d681SAndroid Build Coastguard Worker ; CHECK: %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)* 727*9880d681SAndroid Build Coastguard Worker %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)* 728*9880d681SAndroid Build Coastguard Worker ; CHECK: %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)* 729*9880d681SAndroid Build Coastguard Worker %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)* 730*9880d681SAndroid Build Coastguard Worker ; CHECK: %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)* 731*9880d681SAndroid Build Coastguard Worker 732*9880d681SAndroid Build Coastguard Worker %t0 = alloca i1942652 733*9880d681SAndroid Build Coastguard Worker ; CHECK: %t0 = alloca i1942652 734*9880d681SAndroid Build Coastguard Worker %t1 = alloca half 735*9880d681SAndroid Build Coastguard Worker ; CHECK: %t1 = alloca half 736*9880d681SAndroid Build Coastguard Worker %t2 = alloca float 737*9880d681SAndroid Build Coastguard Worker ; CHECK: %t2 = alloca float 738*9880d681SAndroid Build Coastguard Worker %t3 = alloca double 739*9880d681SAndroid Build Coastguard Worker ; CHECK: %t3 = alloca double 740*9880d681SAndroid Build Coastguard Worker %t4 = alloca fp128 741*9880d681SAndroid Build Coastguard Worker ; CHECK: %t4 = alloca fp128 742*9880d681SAndroid Build Coastguard Worker %t5 = alloca x86_fp80 743*9880d681SAndroid Build Coastguard Worker ; CHECK: %t5 = alloca x86_fp80 744*9880d681SAndroid Build Coastguard Worker %t6 = alloca ppc_fp128 745*9880d681SAndroid Build Coastguard Worker ; CHECK: %t6 = alloca ppc_fp128 746*9880d681SAndroid Build Coastguard Worker %t7 = alloca x86_mmx 747*9880d681SAndroid Build Coastguard Worker ; CHECK: %t7 = alloca x86_mmx 748*9880d681SAndroid Build Coastguard Worker %t8 = alloca %opaquety* 749*9880d681SAndroid Build Coastguard Worker ; CHECK: %t8 = alloca %opaquety* 750*9880d681SAndroid Build Coastguard Worker 751*9880d681SAndroid Build Coastguard Worker ret void 752*9880d681SAndroid Build Coastguard Worker} 753*9880d681SAndroid Build Coastguard Worker 754*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.token(token) 755*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @llvm.token(token) 756*9880d681SAndroid Build Coastguard Worker 757*9880d681SAndroid Build Coastguard Worker;; Inline Assembler Expressions 758*9880d681SAndroid Build Coastguard Workerdefine void @inlineasm(i32 %arg) { 759*9880d681SAndroid Build Coastguard Worker call i32 asm "bswap $0", "=r,r"(i32 %arg) 760*9880d681SAndroid Build Coastguard Worker ; CHECK: call i32 asm "bswap $0", "=r,r"(i32 %arg) 761*9880d681SAndroid Build Coastguard Worker call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg) 762*9880d681SAndroid Build Coastguard Worker ; CHECK: call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg) 763*9880d681SAndroid Build Coastguard Worker ret void 764*9880d681SAndroid Build Coastguard Worker} 765*9880d681SAndroid Build Coastguard Worker 766*9880d681SAndroid Build Coastguard Worker;; Instructions 767*9880d681SAndroid Build Coastguard Worker 768*9880d681SAndroid Build Coastguard Worker; Instructions -- Terminators 769*9880d681SAndroid Build Coastguard Workerdefine void @instructions.terminators(i8 %val) personality i32 -10 { 770*9880d681SAndroid Build Coastguard Worker br i1 false, label %iftrue, label %iffalse 771*9880d681SAndroid Build Coastguard Worker ; CHECK: br i1 false, label %iftrue, label %iffalse 772*9880d681SAndroid Build Coastguard Worker br label %iftrue 773*9880d681SAndroid Build Coastguard Worker ; CHECK: br label %iftrue 774*9880d681SAndroid Build Coastguard Workeriftrue: 775*9880d681SAndroid Build Coastguard Worker ret void 776*9880d681SAndroid Build Coastguard Worker ; CHECK: ret void 777*9880d681SAndroid Build Coastguard Workeriffalse: 778*9880d681SAndroid Build Coastguard Worker 779*9880d681SAndroid Build Coastguard Worker switch i8 %val, label %defaultdest [ 780*9880d681SAndroid Build Coastguard Worker ; CHECK: switch i8 %val, label %defaultdest [ 781*9880d681SAndroid Build Coastguard Worker i8 0, label %defaultdest.0 782*9880d681SAndroid Build Coastguard Worker ; CHECK: i8 0, label %defaultdest.0 783*9880d681SAndroid Build Coastguard Worker i8 1, label %defaultdest.1 784*9880d681SAndroid Build Coastguard Worker ; CHECK: i8 1, label %defaultdest.1 785*9880d681SAndroid Build Coastguard Worker i8 2, label %defaultdest.2 786*9880d681SAndroid Build Coastguard Worker ; CHECK: i8 2, label %defaultdest.2 787*9880d681SAndroid Build Coastguard Worker ] 788*9880d681SAndroid Build Coastguard Worker ; CHECK: ] 789*9880d681SAndroid Build Coastguard Workerdefaultdest: 790*9880d681SAndroid Build Coastguard Worker ret void 791*9880d681SAndroid Build Coastguard Workerdefaultdest.0: 792*9880d681SAndroid Build Coastguard Worker ret void 793*9880d681SAndroid Build Coastguard Workerdefaultdest.1: 794*9880d681SAndroid Build Coastguard Worker ret void 795*9880d681SAndroid Build Coastguard Workerdefaultdest.2: 796*9880d681SAndroid Build Coastguard Worker 797*9880d681SAndroid Build Coastguard Worker indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2] 798*9880d681SAndroid Build Coastguard Worker ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2] 799*9880d681SAndroid Build Coastguard Worker indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2] 800*9880d681SAndroid Build Coastguard Worker ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2] 801*9880d681SAndroid Build Coastguard Worker 802*9880d681SAndroid Build Coastguard Worker invoke fastcc void @f.fastcc() 803*9880d681SAndroid Build Coastguard Worker ; CHECK: invoke fastcc void @f.fastcc() 804*9880d681SAndroid Build Coastguard Worker to label %defaultdest unwind label %exc 805*9880d681SAndroid Build Coastguard Worker ; CHECK: to label %defaultdest unwind label %exc 806*9880d681SAndroid Build Coastguard Workerexc: 807*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i32 cleanup 808*9880d681SAndroid Build Coastguard Worker 809*9880d681SAndroid Build Coastguard Worker resume i32 undef 810*9880d681SAndroid Build Coastguard Worker ; CHECK: resume i32 undef 811*9880d681SAndroid Build Coastguard Worker unreachable 812*9880d681SAndroid Build Coastguard Worker ; CHECK: unreachable 813*9880d681SAndroid Build Coastguard Worker 814*9880d681SAndroid Build Coastguard Worker ret void 815*9880d681SAndroid Build Coastguard Worker} 816*9880d681SAndroid Build Coastguard Worker 817*9880d681SAndroid Build Coastguard Workerdefine i32 @instructions.win_eh.1() personality i32 -3 { 818*9880d681SAndroid Build Coastguard Workerentry: 819*9880d681SAndroid Build Coastguard Worker %arg1 = alloca i32 820*9880d681SAndroid Build Coastguard Worker %arg2 = alloca i32 821*9880d681SAndroid Build Coastguard Worker invoke void @f.ccc() to label %normal unwind label %catchswitch1 822*9880d681SAndroid Build Coastguard Worker invoke void @f.ccc() to label %normal unwind label %catchswitch2 823*9880d681SAndroid Build Coastguard Worker invoke void @f.ccc() to label %normal unwind label %catchswitch3 824*9880d681SAndroid Build Coastguard Worker 825*9880d681SAndroid Build Coastguard Workercatchswitch1: 826*9880d681SAndroid Build Coastguard Worker %cs1 = catchswitch within none [label %catchpad1] unwind to caller 827*9880d681SAndroid Build Coastguard Worker 828*9880d681SAndroid Build Coastguard Workercatchpad1: 829*9880d681SAndroid Build Coastguard Worker catchpad within %cs1 [] 830*9880d681SAndroid Build Coastguard Worker br label %normal 831*9880d681SAndroid Build Coastguard Worker ; CHECK: catchpad within %cs1 [] 832*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: br label %normal 833*9880d681SAndroid Build Coastguard Worker 834*9880d681SAndroid Build Coastguard Workercatchswitch2: 835*9880d681SAndroid Build Coastguard Worker %cs2 = catchswitch within none [label %catchpad2] unwind to caller 836*9880d681SAndroid Build Coastguard Worker 837*9880d681SAndroid Build Coastguard Workercatchpad2: 838*9880d681SAndroid Build Coastguard Worker catchpad within %cs2 [i32* %arg1] 839*9880d681SAndroid Build Coastguard Worker br label %normal 840*9880d681SAndroid Build Coastguard Worker ; CHECK: catchpad within %cs2 [i32* %arg1] 841*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: br label %normal 842*9880d681SAndroid Build Coastguard Worker 843*9880d681SAndroid Build Coastguard Workercatchswitch3: 844*9880d681SAndroid Build Coastguard Worker %cs3 = catchswitch within none [label %catchpad3] unwind label %cleanuppad1 845*9880d681SAndroid Build Coastguard Worker 846*9880d681SAndroid Build Coastguard Workercatchpad3: 847*9880d681SAndroid Build Coastguard Worker catchpad within %cs3 [i32* %arg1, i32* %arg2] 848*9880d681SAndroid Build Coastguard Worker br label %normal 849*9880d681SAndroid Build Coastguard Worker ; CHECK: catchpad within %cs3 [i32* %arg1, i32* %arg2] 850*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: br label %normal 851*9880d681SAndroid Build Coastguard Worker 852*9880d681SAndroid Build Coastguard Workercleanuppad1: 853*9880d681SAndroid Build Coastguard Worker %clean.1 = cleanuppad within none [] 854*9880d681SAndroid Build Coastguard Worker unreachable 855*9880d681SAndroid Build Coastguard Worker ; CHECK: %clean.1 = cleanuppad within none [] 856*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: unreachable 857*9880d681SAndroid Build Coastguard Worker 858*9880d681SAndroid Build Coastguard Workernormal: 859*9880d681SAndroid Build Coastguard Worker ret i32 0 860*9880d681SAndroid Build Coastguard Worker} 861*9880d681SAndroid Build Coastguard Worker; 862*9880d681SAndroid Build Coastguard Workerdefine i32 @instructions.win_eh.2() personality i32 -4 { 863*9880d681SAndroid Build Coastguard Workerentry: 864*9880d681SAndroid Build Coastguard Worker invoke void @f.ccc() to label %invoke.cont unwind label %catchswitch 865*9880d681SAndroid Build Coastguard Worker 866*9880d681SAndroid Build Coastguard Workerinvoke.cont: 867*9880d681SAndroid Build Coastguard Worker invoke void @f.ccc() to label %continue unwind label %cleanup 868*9880d681SAndroid Build Coastguard Worker 869*9880d681SAndroid Build Coastguard Workercleanup: 870*9880d681SAndroid Build Coastguard Worker %clean = cleanuppad within none [] 871*9880d681SAndroid Build Coastguard Worker ; CHECK: %clean = cleanuppad within none [] 872*9880d681SAndroid Build Coastguard Worker cleanupret from %clean unwind to caller 873*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanupret from %clean unwind to caller 874*9880d681SAndroid Build Coastguard Worker 875*9880d681SAndroid Build Coastguard Workercatchswitch: 876*9880d681SAndroid Build Coastguard Worker %cs = catchswitch within none [label %catchpad] unwind label %terminate 877*9880d681SAndroid Build Coastguard Worker 878*9880d681SAndroid Build Coastguard Workercatchpad: 879*9880d681SAndroid Build Coastguard Worker %catch = catchpad within %cs [] 880*9880d681SAndroid Build Coastguard Worker br label %body 881*9880d681SAndroid Build Coastguard Worker ; CHECK: %catch = catchpad within %cs [] 882*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: br label %body 883*9880d681SAndroid Build Coastguard Worker 884*9880d681SAndroid Build Coastguard Workerbody: 885*9880d681SAndroid Build Coastguard Worker invoke void @f.ccc() [ "funclet"(token %catch) ] 886*9880d681SAndroid Build Coastguard Worker to label %continue unwind label %terminate.inner 887*9880d681SAndroid Build Coastguard Worker catchret from %catch to label %return 888*9880d681SAndroid Build Coastguard Worker ; CHECK: catchret from %catch to label %return 889*9880d681SAndroid Build Coastguard Worker 890*9880d681SAndroid Build Coastguard Workerreturn: 891*9880d681SAndroid Build Coastguard Worker ret i32 0 892*9880d681SAndroid Build Coastguard Worker 893*9880d681SAndroid Build Coastguard Workerterminate.inner: 894*9880d681SAndroid Build Coastguard Worker cleanuppad within %catch [] 895*9880d681SAndroid Build Coastguard Worker unreachable 896*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanuppad within %catch [] 897*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: unreachable 898*9880d681SAndroid Build Coastguard Worker 899*9880d681SAndroid Build Coastguard Workerterminate: 900*9880d681SAndroid Build Coastguard Worker cleanuppad within none [] 901*9880d681SAndroid Build Coastguard Worker unreachable 902*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanuppad within none [] 903*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: unreachable 904*9880d681SAndroid Build Coastguard Worker 905*9880d681SAndroid Build Coastguard Workercontinue: 906*9880d681SAndroid Build Coastguard Worker ret i32 0 907*9880d681SAndroid Build Coastguard Worker} 908*9880d681SAndroid Build Coastguard Worker 909*9880d681SAndroid Build Coastguard Worker; Instructions -- Binary Operations 910*9880d681SAndroid Build Coastguard Workerdefine void @instructions.binops(i8 %op1, i8 %op2) { 911*9880d681SAndroid Build Coastguard Worker ; nuw x nsw 912*9880d681SAndroid Build Coastguard Worker add i8 %op1, %op2 913*9880d681SAndroid Build Coastguard Worker ; CHECK: add i8 %op1, %op2 914*9880d681SAndroid Build Coastguard Worker add nuw i8 %op1, %op2 915*9880d681SAndroid Build Coastguard Worker ; CHECK: add nuw i8 %op1, %op2 916*9880d681SAndroid Build Coastguard Worker add nsw i8 %op1, %op2 917*9880d681SAndroid Build Coastguard Worker ; CHECK: add nsw i8 %op1, %op2 918*9880d681SAndroid Build Coastguard Worker add nuw nsw i8 %op1, %op2 919*9880d681SAndroid Build Coastguard Worker ; CHECK: add nuw nsw i8 %op1, %op2 920*9880d681SAndroid Build Coastguard Worker sub i8 %op1, %op2 921*9880d681SAndroid Build Coastguard Worker ; CHECK: sub i8 %op1, %op2 922*9880d681SAndroid Build Coastguard Worker sub nuw i8 %op1, %op2 923*9880d681SAndroid Build Coastguard Worker ; CHECK: sub nuw i8 %op1, %op2 924*9880d681SAndroid Build Coastguard Worker sub nsw i8 %op1, %op2 925*9880d681SAndroid Build Coastguard Worker ; CHECK: sub nsw i8 %op1, %op2 926*9880d681SAndroid Build Coastguard Worker sub nuw nsw i8 %op1, %op2 927*9880d681SAndroid Build Coastguard Worker ; CHECK: sub nuw nsw i8 %op1, %op2 928*9880d681SAndroid Build Coastguard Worker mul i8 %op1, %op2 929*9880d681SAndroid Build Coastguard Worker ; CHECK: mul i8 %op1, %op2 930*9880d681SAndroid Build Coastguard Worker mul nuw i8 %op1, %op2 931*9880d681SAndroid Build Coastguard Worker ; CHECK: mul nuw i8 %op1, %op2 932*9880d681SAndroid Build Coastguard Worker mul nsw i8 %op1, %op2 933*9880d681SAndroid Build Coastguard Worker ; CHECK: mul nsw i8 %op1, %op2 934*9880d681SAndroid Build Coastguard Worker mul nuw nsw i8 %op1, %op2 935*9880d681SAndroid Build Coastguard Worker ; CHECK: mul nuw nsw i8 %op1, %op2 936*9880d681SAndroid Build Coastguard Worker 937*9880d681SAndroid Build Coastguard Worker ; exact 938*9880d681SAndroid Build Coastguard Worker udiv i8 %op1, %op2 939*9880d681SAndroid Build Coastguard Worker ; CHECK: udiv i8 %op1, %op2 940*9880d681SAndroid Build Coastguard Worker udiv exact i8 %op1, %op2 941*9880d681SAndroid Build Coastguard Worker ; CHECK: udiv exact i8 %op1, %op2 942*9880d681SAndroid Build Coastguard Worker sdiv i8 %op1, %op2 943*9880d681SAndroid Build Coastguard Worker ; CHECK: sdiv i8 %op1, %op2 944*9880d681SAndroid Build Coastguard Worker sdiv exact i8 %op1, %op2 945*9880d681SAndroid Build Coastguard Worker ; CHECK: sdiv exact i8 %op1, %op2 946*9880d681SAndroid Build Coastguard Worker 947*9880d681SAndroid Build Coastguard Worker ; none 948*9880d681SAndroid Build Coastguard Worker urem i8 %op1, %op2 949*9880d681SAndroid Build Coastguard Worker ; CHECK: urem i8 %op1, %op2 950*9880d681SAndroid Build Coastguard Worker srem i8 %op1, %op2 951*9880d681SAndroid Build Coastguard Worker ; CHECK: srem i8 %op1, %op2 952*9880d681SAndroid Build Coastguard Worker 953*9880d681SAndroid Build Coastguard Worker ret void 954*9880d681SAndroid Build Coastguard Worker} 955*9880d681SAndroid Build Coastguard Worker 956*9880d681SAndroid Build Coastguard Worker; Instructions -- Bitwise Binary Operations 957*9880d681SAndroid Build Coastguard Workerdefine void @instructions.bitwise_binops(i8 %op1, i8 %op2) { 958*9880d681SAndroid Build Coastguard Worker ; nuw x nsw 959*9880d681SAndroid Build Coastguard Worker shl i8 %op1, %op2 960*9880d681SAndroid Build Coastguard Worker ; CHECK: shl i8 %op1, %op2 961*9880d681SAndroid Build Coastguard Worker shl nuw i8 %op1, %op2 962*9880d681SAndroid Build Coastguard Worker ; CHECK: shl nuw i8 %op1, %op2 963*9880d681SAndroid Build Coastguard Worker shl nsw i8 %op1, %op2 964*9880d681SAndroid Build Coastguard Worker ; CHECK: shl nsw i8 %op1, %op2 965*9880d681SAndroid Build Coastguard Worker shl nuw nsw i8 %op1, %op2 966*9880d681SAndroid Build Coastguard Worker ; CHECK: shl nuw nsw i8 %op1, %op2 967*9880d681SAndroid Build Coastguard Worker 968*9880d681SAndroid Build Coastguard Worker ; exact 969*9880d681SAndroid Build Coastguard Worker lshr i8 %op1, %op2 970*9880d681SAndroid Build Coastguard Worker ; CHECK: lshr i8 %op1, %op2 971*9880d681SAndroid Build Coastguard Worker lshr exact i8 %op1, %op2 972*9880d681SAndroid Build Coastguard Worker ; CHECK: lshr exact i8 %op1, %op2 973*9880d681SAndroid Build Coastguard Worker ashr i8 %op1, %op2 974*9880d681SAndroid Build Coastguard Worker ; CHECK: ashr i8 %op1, %op2 975*9880d681SAndroid Build Coastguard Worker ashr exact i8 %op1, %op2 976*9880d681SAndroid Build Coastguard Worker ; CHECK: ashr exact i8 %op1, %op2 977*9880d681SAndroid Build Coastguard Worker 978*9880d681SAndroid Build Coastguard Worker ; none 979*9880d681SAndroid Build Coastguard Worker and i8 %op1, %op2 980*9880d681SAndroid Build Coastguard Worker ; CHECK: and i8 %op1, %op2 981*9880d681SAndroid Build Coastguard Worker or i8 %op1, %op2 982*9880d681SAndroid Build Coastguard Worker ; CHECK: or i8 %op1, %op2 983*9880d681SAndroid Build Coastguard Worker xor i8 %op1, %op2 984*9880d681SAndroid Build Coastguard Worker ; CHECK: xor i8 %op1, %op2 985*9880d681SAndroid Build Coastguard Worker 986*9880d681SAndroid Build Coastguard Worker ret void 987*9880d681SAndroid Build Coastguard Worker} 988*9880d681SAndroid Build Coastguard Worker 989*9880d681SAndroid Build Coastguard Worker; Instructions -- Vector Operations 990*9880d681SAndroid Build Coastguard Workerdefine void @instructions.vectorops(<4 x float> %vec, <4 x float> %vec2) { 991*9880d681SAndroid Build Coastguard Worker extractelement <4 x float> %vec, i8 0 992*9880d681SAndroid Build Coastguard Worker ; CHECK: extractelement <4 x float> %vec, i8 0 993*9880d681SAndroid Build Coastguard Worker insertelement <4 x float> %vec, float 3.500000e+00, i8 0 994*9880d681SAndroid Build Coastguard Worker ; CHECK: insertelement <4 x float> %vec, float 3.500000e+00, i8 0 995*9880d681SAndroid Build Coastguard Worker shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer 996*9880d681SAndroid Build Coastguard Worker ; CHECK: shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer 997*9880d681SAndroid Build Coastguard Worker 998*9880d681SAndroid Build Coastguard Worker ret void 999*9880d681SAndroid Build Coastguard Worker} 1000*9880d681SAndroid Build Coastguard Worker 1001*9880d681SAndroid Build Coastguard Worker; Instructions -- Aggregate Operations 1002*9880d681SAndroid Build Coastguard Workerdefine void @instructions.aggregateops({ i8, i32 } %up, <{ i8, i32 }> %p, 1003*9880d681SAndroid Build Coastguard Worker [3 x i8] %arr, { i8, { i32 }} %n, 1004*9880d681SAndroid Build Coastguard Worker <2 x i8*> %pvec, <2 x i64> %offsets) { 1005*9880d681SAndroid Build Coastguard Worker extractvalue { i8, i32 } %up, 0 1006*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue { i8, i32 } %up, 0 1007*9880d681SAndroid Build Coastguard Worker extractvalue <{ i8, i32 }> %p, 1 1008*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue <{ i8, i32 }> %p, 1 1009*9880d681SAndroid Build Coastguard Worker extractvalue [3 x i8] %arr, 2 1010*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue [3 x i8] %arr, 2 1011*9880d681SAndroid Build Coastguard Worker extractvalue { i8, { i32 } } %n, 1, 0 1012*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue { i8, { i32 } } %n, 1, 0 1013*9880d681SAndroid Build Coastguard Worker 1014*9880d681SAndroid Build Coastguard Worker insertvalue { i8, i32 } %up, i8 1, 0 1015*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue { i8, i32 } %up, i8 1, 0 1016*9880d681SAndroid Build Coastguard Worker insertvalue <{ i8, i32 }> %p, i32 2, 1 1017*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue <{ i8, i32 }> %p, i32 2, 1 1018*9880d681SAndroid Build Coastguard Worker insertvalue [3 x i8] %arr, i8 0, 0 1019*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue [3 x i8] %arr, i8 0, 0 1020*9880d681SAndroid Build Coastguard Worker insertvalue { i8, { i32 } } %n, i32 0, 1, 0 1021*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue { i8, { i32 } } %n, i32 0, 1, 0 1022*9880d681SAndroid Build Coastguard Worker 1023*9880d681SAndroid Build Coastguard Worker %up.ptr = alloca { i8, i32 } 1024*9880d681SAndroid Build Coastguard Worker %p.ptr = alloca <{ i8, i32 }> 1025*9880d681SAndroid Build Coastguard Worker %arr.ptr = alloca [3 x i8] 1026*9880d681SAndroid Build Coastguard Worker %n.ptr = alloca { i8, { i32 } } 1027*9880d681SAndroid Build Coastguard Worker 1028*9880d681SAndroid Build Coastguard Worker getelementptr { i8, i32 }, { i8, i32 }* %up.ptr, i8 0 1029*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr { i8, i32 }, { i8, i32 }* %up.ptr, i8 0 1030*9880d681SAndroid Build Coastguard Worker getelementptr <{ i8, i32 }>, <{ i8, i32 }>* %p.ptr, i8 1 1031*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr <{ i8, i32 }>, <{ i8, i32 }>* %p.ptr, i8 1 1032*9880d681SAndroid Build Coastguard Worker getelementptr [3 x i8], [3 x i8]* %arr.ptr, i8 2 1033*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr [3 x i8], [3 x i8]* %arr.ptr, i8 2 1034*9880d681SAndroid Build Coastguard Worker getelementptr { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 0, i32 1 1035*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 0, i32 1 1036*9880d681SAndroid Build Coastguard Worker getelementptr inbounds { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 1, i32 0 1037*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr inbounds { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 1, i32 0 1038*9880d681SAndroid Build Coastguard Worker getelementptr i8, <2 x i8*> %pvec, <2 x i64> %offsets 1039*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr i8, <2 x i8*> %pvec, <2 x i64> %offsets 1040*9880d681SAndroid Build Coastguard Worker 1041*9880d681SAndroid Build Coastguard Worker ret void 1042*9880d681SAndroid Build Coastguard Worker} 1043*9880d681SAndroid Build Coastguard Worker 1044*9880d681SAndroid Build Coastguard Worker; Instructions -- Memory Access and Addressing Operations 1045*9880d681SAndroid Build Coastguard Worker!7 = !{i32 1} 1046*9880d681SAndroid Build Coastguard Worker!8 = !{} 1047*9880d681SAndroid Build Coastguard Worker!9 = !{i64 4} 1048*9880d681SAndroid Build Coastguard Workerdefine void @instructions.memops(i32** %base) { 1049*9880d681SAndroid Build Coastguard Worker alloca i32, i8 4, align 4 1050*9880d681SAndroid Build Coastguard Worker ; CHECK: alloca i32, i8 4, align 4 1051*9880d681SAndroid Build Coastguard Worker alloca inalloca i32, i8 4, align 4 1052*9880d681SAndroid Build Coastguard Worker ; CHECK: alloca inalloca i32, i8 4, align 4 1053*9880d681SAndroid Build Coastguard Worker 1054*9880d681SAndroid Build Coastguard Worker load i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9 1055*9880d681SAndroid Build Coastguard Worker ; CHECK: load i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9 1056*9880d681SAndroid Build Coastguard Worker load volatile i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9 1057*9880d681SAndroid Build Coastguard Worker ; CHECK: load volatile i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9 1058*9880d681SAndroid Build Coastguard Worker 1059*9880d681SAndroid Build Coastguard Worker store i32* null, i32** %base, align 4, !nontemporal !8 1060*9880d681SAndroid Build Coastguard Worker ; CHECK: store i32* null, i32** %base, align 4, !nontemporal !8 1061*9880d681SAndroid Build Coastguard Worker store volatile i32* null, i32** %base, align 4, !nontemporal !8 1062*9880d681SAndroid Build Coastguard Worker ; CHECK: store volatile i32* null, i32** %base, align 4, !nontemporal !8 1063*9880d681SAndroid Build Coastguard Worker 1064*9880d681SAndroid Build Coastguard Worker ret void 1065*9880d681SAndroid Build Coastguard Worker} 1066*9880d681SAndroid Build Coastguard Worker 1067*9880d681SAndroid Build Coastguard Worker; Instructions -- Conversion Operations 1068*9880d681SAndroid Build Coastguard Workerdefine void @instructions.conversions() { 1069*9880d681SAndroid Build Coastguard Worker trunc i32 -1 to i1 1070*9880d681SAndroid Build Coastguard Worker ; CHECK: trunc i32 -1 to i1 1071*9880d681SAndroid Build Coastguard Worker zext i32 -1 to i64 1072*9880d681SAndroid Build Coastguard Worker ; CHECK: zext i32 -1 to i64 1073*9880d681SAndroid Build Coastguard Worker sext i32 -1 to i64 1074*9880d681SAndroid Build Coastguard Worker ; CHECK: sext i32 -1 to i64 1075*9880d681SAndroid Build Coastguard Worker fptrunc float undef to half 1076*9880d681SAndroid Build Coastguard Worker ; CHECK: fptrunc float undef to half 1077*9880d681SAndroid Build Coastguard Worker fpext half undef to float 1078*9880d681SAndroid Build Coastguard Worker ; CHECK: fpext half undef to float 1079*9880d681SAndroid Build Coastguard Worker fptoui float undef to i32 1080*9880d681SAndroid Build Coastguard Worker ; CHECK: fptoui float undef to i32 1081*9880d681SAndroid Build Coastguard Worker fptosi float undef to i32 1082*9880d681SAndroid Build Coastguard Worker ; CHECK: fptosi float undef to i32 1083*9880d681SAndroid Build Coastguard Worker uitofp i32 1 to float 1084*9880d681SAndroid Build Coastguard Worker ; CHECK: uitofp i32 1 to float 1085*9880d681SAndroid Build Coastguard Worker sitofp i32 -1 to float 1086*9880d681SAndroid Build Coastguard Worker ; CHECK: sitofp i32 -1 to float 1087*9880d681SAndroid Build Coastguard Worker ptrtoint i8* null to i64 1088*9880d681SAndroid Build Coastguard Worker ; CHECK: ptrtoint i8* null to i64 1089*9880d681SAndroid Build Coastguard Worker inttoptr i64 0 to i8* 1090*9880d681SAndroid Build Coastguard Worker ; CHECK: inttoptr i64 0 to i8* 1091*9880d681SAndroid Build Coastguard Worker bitcast i32 0 to i32 1092*9880d681SAndroid Build Coastguard Worker ; CHECK: bitcast i32 0 to i32 1093*9880d681SAndroid Build Coastguard Worker addrspacecast i32* null to i32 addrspace(1)* 1094*9880d681SAndroid Build Coastguard Worker ; CHECK: addrspacecast i32* null to i32 addrspace(1)* 1095*9880d681SAndroid Build Coastguard Worker 1096*9880d681SAndroid Build Coastguard Worker ret void 1097*9880d681SAndroid Build Coastguard Worker} 1098*9880d681SAndroid Build Coastguard Worker 1099*9880d681SAndroid Build Coastguard Worker; Instructions -- Other Operations 1100*9880d681SAndroid Build Coastguard Workerdefine void @instructions.other(i32 %op1, i32 %op2, half %fop1, half %fop2) { 1101*9880d681SAndroid Build Coastguard Workerentry: 1102*9880d681SAndroid Build Coastguard Worker icmp eq i32 %op1, %op2 1103*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp eq i32 %op1, %op2 1104*9880d681SAndroid Build Coastguard Worker icmp ne i32 %op1, %op2 1105*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ne i32 %op1, %op2 1106*9880d681SAndroid Build Coastguard Worker icmp ugt i32 %op1, %op2 1107*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ugt i32 %op1, %op2 1108*9880d681SAndroid Build Coastguard Worker icmp uge i32 %op1, %op2 1109*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp uge i32 %op1, %op2 1110*9880d681SAndroid Build Coastguard Worker icmp ult i32 %op1, %op2 1111*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ult i32 %op1, %op2 1112*9880d681SAndroid Build Coastguard Worker icmp ule i32 %op1, %op2 1113*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ule i32 %op1, %op2 1114*9880d681SAndroid Build Coastguard Worker icmp sgt i32 %op1, %op2 1115*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp sgt i32 %op1, %op2 1116*9880d681SAndroid Build Coastguard Worker icmp sge i32 %op1, %op2 1117*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp sge i32 %op1, %op2 1118*9880d681SAndroid Build Coastguard Worker icmp slt i32 %op1, %op2 1119*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp slt i32 %op1, %op2 1120*9880d681SAndroid Build Coastguard Worker icmp sle i32 %op1, %op2 1121*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp sle i32 %op1, %op2 1122*9880d681SAndroid Build Coastguard Worker 1123*9880d681SAndroid Build Coastguard Worker fcmp false half %fop1, %fop2 1124*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp false half %fop1, %fop2 1125*9880d681SAndroid Build Coastguard Worker fcmp oeq half %fop1, %fop2 1126*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp oeq half %fop1, %fop2 1127*9880d681SAndroid Build Coastguard Worker fcmp ogt half %fop1, %fop2 1128*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ogt half %fop1, %fop2 1129*9880d681SAndroid Build Coastguard Worker fcmp oge half %fop1, %fop2 1130*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp oge half %fop1, %fop2 1131*9880d681SAndroid Build Coastguard Worker fcmp olt half %fop1, %fop2 1132*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp olt half %fop1, %fop2 1133*9880d681SAndroid Build Coastguard Worker fcmp ole half %fop1, %fop2 1134*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ole half %fop1, %fop2 1135*9880d681SAndroid Build Coastguard Worker fcmp one half %fop1, %fop2 1136*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp one half %fop1, %fop2 1137*9880d681SAndroid Build Coastguard Worker fcmp ord half %fop1, %fop2 1138*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ord half %fop1, %fop2 1139*9880d681SAndroid Build Coastguard Worker fcmp ueq half %fop1, %fop2 1140*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ueq half %fop1, %fop2 1141*9880d681SAndroid Build Coastguard Worker fcmp ugt half %fop1, %fop2 1142*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ugt half %fop1, %fop2 1143*9880d681SAndroid Build Coastguard Worker fcmp uge half %fop1, %fop2 1144*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp uge half %fop1, %fop2 1145*9880d681SAndroid Build Coastguard Worker fcmp ult half %fop1, %fop2 1146*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ult half %fop1, %fop2 1147*9880d681SAndroid Build Coastguard Worker fcmp ule half %fop1, %fop2 1148*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ule half %fop1, %fop2 1149*9880d681SAndroid Build Coastguard Worker fcmp une half %fop1, %fop2 1150*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp une half %fop1, %fop2 1151*9880d681SAndroid Build Coastguard Worker fcmp uno half %fop1, %fop2 1152*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp uno half %fop1, %fop2 1153*9880d681SAndroid Build Coastguard Worker fcmp true half %fop1, %fop2 1154*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp true half %fop1, %fop2 1155*9880d681SAndroid Build Coastguard Worker 1156*9880d681SAndroid Build Coastguard Worker br label %exit 1157*9880d681SAndroid Build Coastguard WorkerL1: 1158*9880d681SAndroid Build Coastguard Worker %v1 = add i32 %op1, %op2 1159*9880d681SAndroid Build Coastguard Worker br label %exit 1160*9880d681SAndroid Build Coastguard WorkerL2: 1161*9880d681SAndroid Build Coastguard Worker %v2 = add i32 %op1, %op2 1162*9880d681SAndroid Build Coastguard Worker br label %exit 1163*9880d681SAndroid Build Coastguard Workerexit: 1164*9880d681SAndroid Build Coastguard Worker phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ] 1165*9880d681SAndroid Build Coastguard Worker ; CHECK: phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ] 1166*9880d681SAndroid Build Coastguard Worker 1167*9880d681SAndroid Build Coastguard Worker select i1 true, i32 0, i32 1 1168*9880d681SAndroid Build Coastguard Worker ; CHECK: select i1 true, i32 0, i32 1 1169*9880d681SAndroid Build Coastguard Worker select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2> 1170*9880d681SAndroid Build Coastguard Worker ; CHECK: select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2> 1171*9880d681SAndroid Build Coastguard Worker 1172*9880d681SAndroid Build Coastguard Worker call void @f.nobuiltin() builtin 1173*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @f.nobuiltin() #39 1174*9880d681SAndroid Build Coastguard Worker 1175*9880d681SAndroid Build Coastguard Worker call fastcc noalias i32* @f.noalias() noinline 1176*9880d681SAndroid Build Coastguard Worker ; CHECK: call fastcc noalias i32* @f.noalias() #12 1177*9880d681SAndroid Build Coastguard Worker tail call ghccc nonnull i32* @f.nonnull() minsize 1178*9880d681SAndroid Build Coastguard Worker ; CHECK: tail call ghccc nonnull i32* @f.nonnull() #7 1179*9880d681SAndroid Build Coastguard Worker 1180*9880d681SAndroid Build Coastguard Worker ret void 1181*9880d681SAndroid Build Coastguard Worker} 1182*9880d681SAndroid Build Coastguard Worker 1183*9880d681SAndroid Build Coastguard Workerdefine void @instructions.call_musttail(i8* inalloca %val) { 1184*9880d681SAndroid Build Coastguard Worker musttail call void @f.param.inalloca(i8* inalloca %val) 1185*9880d681SAndroid Build Coastguard Worker ; CHECK: musttail call void @f.param.inalloca(i8* inalloca %val) 1186*9880d681SAndroid Build Coastguard Worker 1187*9880d681SAndroid Build Coastguard Worker ret void 1188*9880d681SAndroid Build Coastguard Worker} 1189*9880d681SAndroid Build Coastguard Worker 1190*9880d681SAndroid Build Coastguard Workerdefine void @instructions.call_notail() { 1191*9880d681SAndroid Build Coastguard Worker notail call void @f1() 1192*9880d681SAndroid Build Coastguard Worker ; CHECK: notail call void @f1() 1193*9880d681SAndroid Build Coastguard Worker 1194*9880d681SAndroid Build Coastguard Worker ret void 1195*9880d681SAndroid Build Coastguard Worker} 1196*9880d681SAndroid Build Coastguard Worker 1197*9880d681SAndroid Build Coastguard Workerdefine void @instructions.landingpad() personality i32 -2 { 1198*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch1 1199*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch2 1200*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch3 1201*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch4 1202*9880d681SAndroid Build Coastguard Worker 1203*9880d681SAndroid Build Coastguard Workercatch1: 1204*9880d681SAndroid Build Coastguard Worker landingpad i32 1205*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1206*9880d681SAndroid Build Coastguard Worker cleanup 1207*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanup 1208*9880d681SAndroid Build Coastguard Worker br label %proceed 1209*9880d681SAndroid Build Coastguard Worker 1210*9880d681SAndroid Build Coastguard Workercatch2: 1211*9880d681SAndroid Build Coastguard Worker landingpad i32 1212*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1213*9880d681SAndroid Build Coastguard Worker cleanup 1214*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanup 1215*9880d681SAndroid Build Coastguard Worker catch i32* null 1216*9880d681SAndroid Build Coastguard Worker ; CHECK: catch i32* null 1217*9880d681SAndroid Build Coastguard Worker br label %proceed 1218*9880d681SAndroid Build Coastguard Worker 1219*9880d681SAndroid Build Coastguard Workercatch3: 1220*9880d681SAndroid Build Coastguard Worker landingpad i32 1221*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1222*9880d681SAndroid Build Coastguard Worker cleanup 1223*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanup 1224*9880d681SAndroid Build Coastguard Worker catch i32* null 1225*9880d681SAndroid Build Coastguard Worker ; CHECK: catch i32* null 1226*9880d681SAndroid Build Coastguard Worker catch i32* null 1227*9880d681SAndroid Build Coastguard Worker ; CHECK: catch i32* null 1228*9880d681SAndroid Build Coastguard Worker br label %proceed 1229*9880d681SAndroid Build Coastguard Worker 1230*9880d681SAndroid Build Coastguard Workercatch4: 1231*9880d681SAndroid Build Coastguard Worker landingpad i32 1232*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1233*9880d681SAndroid Build Coastguard Worker filter [2 x i32] zeroinitializer 1234*9880d681SAndroid Build Coastguard Worker ; CHECK: filter [2 x i32] zeroinitializer 1235*9880d681SAndroid Build Coastguard Worker br label %proceed 1236*9880d681SAndroid Build Coastguard Worker 1237*9880d681SAndroid Build Coastguard Workerproceed: 1238*9880d681SAndroid Build Coastguard Worker ret void 1239*9880d681SAndroid Build Coastguard Worker} 1240*9880d681SAndroid Build Coastguard Worker 1241*9880d681SAndroid Build Coastguard Worker;; Intrinsic Functions 1242*9880d681SAndroid Build Coastguard Worker 1243*9880d681SAndroid Build Coastguard Worker; Intrinsic Functions -- Variable Argument Handling 1244*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_start(i8*) 1245*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_copy(i8*, i8*) 1246*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_end(i8*) 1247*9880d681SAndroid Build Coastguard Workerdefine void @instructions.va_arg(i8* %v, ...) { 1248*9880d681SAndroid Build Coastguard Worker %ap = alloca i8* 1249*9880d681SAndroid Build Coastguard Worker %ap2 = bitcast i8** %ap to i8* 1250*9880d681SAndroid Build Coastguard Worker 1251*9880d681SAndroid Build Coastguard Worker call void @llvm.va_start(i8* %ap2) 1252*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.va_start(i8* %ap2) 1253*9880d681SAndroid Build Coastguard Worker 1254*9880d681SAndroid Build Coastguard Worker va_arg i8* %ap2, i32 1255*9880d681SAndroid Build Coastguard Worker ; CHECK: va_arg i8* %ap2, i32 1256*9880d681SAndroid Build Coastguard Worker 1257*9880d681SAndroid Build Coastguard Worker call void @llvm.va_copy(i8* %v, i8* %ap2) 1258*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.va_copy(i8* %v, i8* %ap2) 1259*9880d681SAndroid Build Coastguard Worker 1260*9880d681SAndroid Build Coastguard Worker call void @llvm.va_end(i8* %ap2) 1261*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.va_end(i8* %ap2) 1262*9880d681SAndroid Build Coastguard Worker 1263*9880d681SAndroid Build Coastguard Worker ret void 1264*9880d681SAndroid Build Coastguard Worker} 1265*9880d681SAndroid Build Coastguard Worker 1266*9880d681SAndroid Build Coastguard Worker; Intrinsic Functions -- Accurate Garbage Collection 1267*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.gcroot(i8**, i8*) 1268*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.gcread(i8*, i8**) 1269*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.gcwrite(i8*, i8*, i8**) 1270*9880d681SAndroid Build Coastguard Workerdefine void @intrinsics.gc() gc "shadow-stack" { 1271*9880d681SAndroid Build Coastguard Worker %ptrloc = alloca i8* 1272*9880d681SAndroid Build Coastguard Worker call void @llvm.gcroot(i8** %ptrloc, i8* null) 1273*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.gcroot(i8** %ptrloc, i8* null) 1274*9880d681SAndroid Build Coastguard Worker 1275*9880d681SAndroid Build Coastguard Worker call i8* @llvm.gcread(i8* null, i8** %ptrloc) 1276*9880d681SAndroid Build Coastguard Worker ; CHECK: call i8* @llvm.gcread(i8* null, i8** %ptrloc) 1277*9880d681SAndroid Build Coastguard Worker 1278*9880d681SAndroid Build Coastguard Worker %ref = alloca i8 1279*9880d681SAndroid Build Coastguard Worker call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc) 1280*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc) 1281*9880d681SAndroid Build Coastguard Worker 1282*9880d681SAndroid Build Coastguard Worker ret void 1283*9880d681SAndroid Build Coastguard Worker} 1284*9880d681SAndroid Build Coastguard Worker 1285*9880d681SAndroid Build Coastguard Worker; Intrinsic Functions -- Code Generation 1286*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.returnaddress(i32) 1287*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.frameaddress(i32) 1288*9880d681SAndroid Build Coastguard Workerdeclare i32 @llvm.read_register.i32(metadata) 1289*9880d681SAndroid Build Coastguard Workerdeclare i64 @llvm.read_register.i64(metadata) 1290*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.write_register.i32(metadata, i32) 1291*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.write_register.i64(metadata, i64) 1292*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.stacksave() 1293*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.stackrestore(i8*) 1294*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.prefetch(i8*, i32, i32, i32) 1295*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.pcmarker(i32) 1296*9880d681SAndroid Build Coastguard Workerdeclare i64 @llvm.readcyclecounter() 1297*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.clear_cache(i8*, i8*) 1298*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.instrprof_increment(i8*, i64, i32, i32) 1299*9880d681SAndroid Build Coastguard Worker 1300*9880d681SAndroid Build Coastguard Worker!10 = !{!"rax"} 1301*9880d681SAndroid Build Coastguard Workerdefine void @intrinsics.codegen() { 1302*9880d681SAndroid Build Coastguard Worker call i8* @llvm.returnaddress(i32 1) 1303*9880d681SAndroid Build Coastguard Worker ; CHECK: call i8* @llvm.returnaddress(i32 1) 1304*9880d681SAndroid Build Coastguard Worker call i8* @llvm.frameaddress(i32 1) 1305*9880d681SAndroid Build Coastguard Worker ; CHECK: call i8* @llvm.frameaddress(i32 1) 1306*9880d681SAndroid Build Coastguard Worker 1307*9880d681SAndroid Build Coastguard Worker call i32 @llvm.read_register.i32(metadata !10) 1308*9880d681SAndroid Build Coastguard Worker ; CHECK: call i32 @llvm.read_register.i32(metadata !10) 1309*9880d681SAndroid Build Coastguard Worker call i64 @llvm.read_register.i64(metadata !10) 1310*9880d681SAndroid Build Coastguard Worker ; CHECK: call i64 @llvm.read_register.i64(metadata !10) 1311*9880d681SAndroid Build Coastguard Worker call void @llvm.write_register.i32(metadata !10, i32 0) 1312*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.write_register.i32(metadata !10, i32 0) 1313*9880d681SAndroid Build Coastguard Worker call void @llvm.write_register.i64(metadata !10, i64 0) 1314*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.write_register.i64(metadata !10, i64 0) 1315*9880d681SAndroid Build Coastguard Worker 1316*9880d681SAndroid Build Coastguard Worker %stack = call i8* @llvm.stacksave() 1317*9880d681SAndroid Build Coastguard Worker ; CHECK: %stack = call i8* @llvm.stacksave() 1318*9880d681SAndroid Build Coastguard Worker call void @llvm.stackrestore(i8* %stack) 1319*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.stackrestore(i8* %stack) 1320*9880d681SAndroid Build Coastguard Worker 1321*9880d681SAndroid Build Coastguard Worker call void @llvm.prefetch(i8* %stack, i32 0, i32 3, i32 0) 1322*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.prefetch(i8* %stack, i32 0, i32 3, i32 0) 1323*9880d681SAndroid Build Coastguard Worker 1324*9880d681SAndroid Build Coastguard Worker call void @llvm.pcmarker(i32 1) 1325*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.pcmarker(i32 1) 1326*9880d681SAndroid Build Coastguard Worker 1327*9880d681SAndroid Build Coastguard Worker call i64 @llvm.readcyclecounter() 1328*9880d681SAndroid Build Coastguard Worker ; CHECK: call i64 @llvm.readcyclecounter() 1329*9880d681SAndroid Build Coastguard Worker 1330*9880d681SAndroid Build Coastguard Worker call void @llvm.clear_cache(i8* null, i8* null) 1331*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.clear_cache(i8* null, i8* null) 1332*9880d681SAndroid Build Coastguard Worker 1333*9880d681SAndroid Build Coastguard Worker call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0) 1334*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0) 1335*9880d681SAndroid Build Coastguard Worker 1336*9880d681SAndroid Build Coastguard Worker ret void 1337*9880d681SAndroid Build Coastguard Worker} 1338*9880d681SAndroid Build Coastguard Worker 1339*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.localescape(...) 1340*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.localrecover(i8* %func, i8* %fp, i32 %idx) 1341*9880d681SAndroid Build Coastguard Workerdefine void @intrinsics.localescape() { 1342*9880d681SAndroid Build Coastguard Worker %static.alloca = alloca i32 1343*9880d681SAndroid Build Coastguard Worker call void (...) @llvm.localescape(i32* %static.alloca) 1344*9880d681SAndroid Build Coastguard Worker ; CHECK: call void (...) @llvm.localescape(i32* %static.alloca) 1345*9880d681SAndroid Build Coastguard Worker 1346*9880d681SAndroid Build Coastguard Worker call void @intrinsics.localrecover() 1347*9880d681SAndroid Build Coastguard Worker 1348*9880d681SAndroid Build Coastguard Worker ret void 1349*9880d681SAndroid Build Coastguard Worker} 1350*9880d681SAndroid Build Coastguard Workerdefine void @intrinsics.localrecover() { 1351*9880d681SAndroid Build Coastguard Worker %func = bitcast void ()* @intrinsics.localescape to i8* 1352*9880d681SAndroid Build Coastguard Worker %fp = call i8* @llvm.frameaddress(i32 1) 1353*9880d681SAndroid Build Coastguard Worker call i8* @llvm.localrecover(i8* %func, i8* %fp, i32 0) 1354*9880d681SAndroid Build Coastguard Worker ; CHECK: call i8* @llvm.localrecover(i8* %func, i8* %fp, i32 0) 1355*9880d681SAndroid Build Coastguard Worker 1356*9880d681SAndroid Build Coastguard Worker ret void 1357*9880d681SAndroid Build Coastguard Worker} 1358*9880d681SAndroid Build Coastguard Worker 1359*9880d681SAndroid Build Coastguard Worker; We need this function to provide `uses' for some metadata tests. 1360*9880d681SAndroid Build Coastguard Workerdefine void @misc.metadata() { 1361*9880d681SAndroid Build Coastguard Worker call void @f1(), !srcloc !11 1362*9880d681SAndroid Build Coastguard Worker call void @f1(), !srcloc !12 1363*9880d681SAndroid Build Coastguard Worker call void @f1(), !srcloc !13 1364*9880d681SAndroid Build Coastguard Worker call void @f1(), !srcloc !14 1365*9880d681SAndroid Build Coastguard Worker ret void 1366*9880d681SAndroid Build Coastguard Worker} 1367*9880d681SAndroid Build Coastguard Worker 1368*9880d681SAndroid Build Coastguard Workerdeclare void @op_bundle_callee_0() 1369*9880d681SAndroid Build Coastguard Workerdeclare void @op_bundle_callee_1(i32,i32) 1370*9880d681SAndroid Build Coastguard Worker 1371*9880d681SAndroid Build Coastguard Workerdefine void @call_with_operand_bundle0(i32* %ptr) { 1372*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: call_with_operand_bundle0( 1373*9880d681SAndroid Build Coastguard Worker entry: 1374*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1375*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1376*9880d681SAndroid Build Coastguard Worker call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ] 1377*9880d681SAndroid Build Coastguard Worker; CHECK: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ] 1378*9880d681SAndroid Build Coastguard Worker ret void 1379*9880d681SAndroid Build Coastguard Worker} 1380*9880d681SAndroid Build Coastguard Worker 1381*9880d681SAndroid Build Coastguard Workerdefine void @call_with_operand_bundle1(i32* %ptr) { 1382*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: call_with_operand_bundle1( 1383*9880d681SAndroid Build Coastguard Worker entry: 1384*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1385*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1386*9880d681SAndroid Build Coastguard Worker 1387*9880d681SAndroid Build Coastguard Worker call void @op_bundle_callee_0() 1388*9880d681SAndroid Build Coastguard Worker call void @op_bundle_callee_0() [ "foo"() ] 1389*9880d681SAndroid Build Coastguard Worker call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ] 1390*9880d681SAndroid Build Coastguard Worker; CHECK: @op_bundle_callee_0(){{$}} 1391*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: call void @op_bundle_callee_0() [ "foo"() ] 1392*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ] 1393*9880d681SAndroid Build Coastguard Worker ret void 1394*9880d681SAndroid Build Coastguard Worker} 1395*9880d681SAndroid Build Coastguard Worker 1396*9880d681SAndroid Build Coastguard Workerdefine void @call_with_operand_bundle2(i32* %ptr) { 1397*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: call_with_operand_bundle2( 1398*9880d681SAndroid Build Coastguard Worker entry: 1399*9880d681SAndroid Build Coastguard Worker call void @op_bundle_callee_0() [ "foo"() ] 1400*9880d681SAndroid Build Coastguard Worker; CHECK: call void @op_bundle_callee_0() [ "foo"() ] 1401*9880d681SAndroid Build Coastguard Worker ret void 1402*9880d681SAndroid Build Coastguard Worker} 1403*9880d681SAndroid Build Coastguard Worker 1404*9880d681SAndroid Build Coastguard Workerdefine void @call_with_operand_bundle3(i32* %ptr) { 1405*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: call_with_operand_bundle3( 1406*9880d681SAndroid Build Coastguard Worker entry: 1407*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1408*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1409*9880d681SAndroid Build Coastguard Worker call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1410*9880d681SAndroid Build Coastguard Worker; CHECK: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1411*9880d681SAndroid Build Coastguard Worker ret void 1412*9880d681SAndroid Build Coastguard Worker} 1413*9880d681SAndroid Build Coastguard Worker 1414*9880d681SAndroid Build Coastguard Workerdefine void @call_with_operand_bundle4(i32* %ptr) { 1415*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: call_with_operand_bundle4( 1416*9880d681SAndroid Build Coastguard Worker entry: 1417*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1418*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1419*9880d681SAndroid Build Coastguard Worker call void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1420*9880d681SAndroid Build Coastguard Worker; CHECK: call void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1421*9880d681SAndroid Build Coastguard Worker ret void 1422*9880d681SAndroid Build Coastguard Worker} 1423*9880d681SAndroid Build Coastguard Worker 1424*9880d681SAndroid Build Coastguard Worker; Invoke versions of the above tests: 1425*9880d681SAndroid Build Coastguard Worker 1426*9880d681SAndroid Build Coastguard Worker 1427*9880d681SAndroid Build Coastguard Workerdefine void @invoke_with_operand_bundle0(i32* %ptr) personality i8 3 { 1428*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @invoke_with_operand_bundle0( 1429*9880d681SAndroid Build Coastguard Worker entry: 1430*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1431*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1432*9880d681SAndroid Build Coastguard Worker invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ] to label %normal unwind label %exception 1433*9880d681SAndroid Build Coastguard Worker; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ] 1434*9880d681SAndroid Build Coastguard Worker 1435*9880d681SAndroid Build Coastguard Workerexception: 1436*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i8 cleanup 1437*9880d681SAndroid Build Coastguard Worker br label %normal 1438*9880d681SAndroid Build Coastguard Workernormal: 1439*9880d681SAndroid Build Coastguard Worker ret void 1440*9880d681SAndroid Build Coastguard Worker} 1441*9880d681SAndroid Build Coastguard Worker 1442*9880d681SAndroid Build Coastguard Workerdefine void @invoke_with_operand_bundle1(i32* %ptr) personality i8 3 { 1443*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @invoke_with_operand_bundle1( 1444*9880d681SAndroid Build Coastguard Worker entry: 1445*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1446*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1447*9880d681SAndroid Build Coastguard Worker 1448*9880d681SAndroid Build Coastguard Worker invoke void @op_bundle_callee_0() to label %normal unwind label %exception 1449*9880d681SAndroid Build Coastguard Worker; CHECK: invoke void @op_bundle_callee_0(){{$}} 1450*9880d681SAndroid Build Coastguard Worker 1451*9880d681SAndroid Build Coastguard Workerexception: 1452*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i8 cleanup 1453*9880d681SAndroid Build Coastguard Worker br label %normal 1454*9880d681SAndroid Build Coastguard Worker 1455*9880d681SAndroid Build Coastguard Workernormal: 1456*9880d681SAndroid Build Coastguard Worker invoke void @op_bundle_callee_0() [ "foo"() ] to label %normal1 unwind label %exception1 1457*9880d681SAndroid Build Coastguard Worker; CHECK: invoke void @op_bundle_callee_0() [ "foo"() ] 1458*9880d681SAndroid Build Coastguard Worker 1459*9880d681SAndroid Build Coastguard Workerexception1: 1460*9880d681SAndroid Build Coastguard Worker %cleanup1 = landingpad i8 cleanup 1461*9880d681SAndroid Build Coastguard Worker br label %normal1 1462*9880d681SAndroid Build Coastguard Worker 1463*9880d681SAndroid Build Coastguard Workernormal1: 1464*9880d681SAndroid Build Coastguard Worker invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] to label %normal2 unwind label %exception2 1465*9880d681SAndroid Build Coastguard Worker; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1466*9880d681SAndroid Build Coastguard Worker 1467*9880d681SAndroid Build Coastguard Workerexception2: 1468*9880d681SAndroid Build Coastguard Worker %cleanup2 = landingpad i8 cleanup 1469*9880d681SAndroid Build Coastguard Worker br label %normal2 1470*9880d681SAndroid Build Coastguard Worker 1471*9880d681SAndroid Build Coastguard Workernormal2: 1472*9880d681SAndroid Build Coastguard Worker ret void 1473*9880d681SAndroid Build Coastguard Worker} 1474*9880d681SAndroid Build Coastguard Worker 1475*9880d681SAndroid Build Coastguard Workerdefine void @invoke_with_operand_bundle2(i32* %ptr) personality i8 3 { 1476*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @invoke_with_operand_bundle2( 1477*9880d681SAndroid Build Coastguard Worker entry: 1478*9880d681SAndroid Build Coastguard Worker invoke void @op_bundle_callee_0() [ "foo"() ] to label %normal unwind label %exception 1479*9880d681SAndroid Build Coastguard Worker; CHECK: invoke void @op_bundle_callee_0() [ "foo"() ] 1480*9880d681SAndroid Build Coastguard Worker 1481*9880d681SAndroid Build Coastguard Workerexception: 1482*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i8 cleanup 1483*9880d681SAndroid Build Coastguard Worker br label %normal 1484*9880d681SAndroid Build Coastguard Workernormal: 1485*9880d681SAndroid Build Coastguard Worker ret void 1486*9880d681SAndroid Build Coastguard Worker} 1487*9880d681SAndroid Build Coastguard Worker 1488*9880d681SAndroid Build Coastguard Workerdefine void @invoke_with_operand_bundle3(i32* %ptr) personality i8 3 { 1489*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @invoke_with_operand_bundle3( 1490*9880d681SAndroid Build Coastguard Worker entry: 1491*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1492*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1493*9880d681SAndroid Build Coastguard Worker invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] to label %normal unwind label %exception 1494*9880d681SAndroid Build Coastguard Worker; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1495*9880d681SAndroid Build Coastguard Worker 1496*9880d681SAndroid Build Coastguard Workerexception: 1497*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i8 cleanup 1498*9880d681SAndroid Build Coastguard Worker br label %normal 1499*9880d681SAndroid Build Coastguard Workernormal: 1500*9880d681SAndroid Build Coastguard Worker ret void 1501*9880d681SAndroid Build Coastguard Worker} 1502*9880d681SAndroid Build Coastguard Worker 1503*9880d681SAndroid Build Coastguard Workerdefine void @invoke_with_operand_bundle4(i32* %ptr) personality i8 3 { 1504*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @invoke_with_operand_bundle4( 1505*9880d681SAndroid Build Coastguard Worker entry: 1506*9880d681SAndroid Build Coastguard Worker %l = load i32, i32* %ptr 1507*9880d681SAndroid Build Coastguard Worker %x = add i32 42, 1 1508*9880d681SAndroid Build Coastguard Worker invoke void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1509*9880d681SAndroid Build Coastguard Worker to label %normal unwind label %exception 1510*9880d681SAndroid Build Coastguard Worker; CHECK: invoke void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] 1511*9880d681SAndroid Build Coastguard Worker 1512*9880d681SAndroid Build Coastguard Workerexception: 1513*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i8 cleanup 1514*9880d681SAndroid Build Coastguard Worker br label %normal 1515*9880d681SAndroid Build Coastguard Workernormal: 1516*9880d681SAndroid Build Coastguard Worker ret void 1517*9880d681SAndroid Build Coastguard Worker} 1518*9880d681SAndroid Build Coastguard Worker 1519*9880d681SAndroid Build Coastguard Worker 1520*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #0 = { alignstack=4 } 1521*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #1 = { alignstack=8 } 1522*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #2 = { alwaysinline } 1523*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #3 = { cold } 1524*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #4 = { convergent } 1525*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #5 = { inlinehint } 1526*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #6 = { jumptable } 1527*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #7 = { minsize } 1528*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #8 = { naked } 1529*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #9 = { nobuiltin } 1530*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #10 = { noduplicate } 1531*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #11 = { noimplicitfloat } 1532*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #12 = { noinline } 1533*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #13 = { nonlazybind } 1534*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #14 = { noredzone } 1535*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #15 = { noreturn } 1536*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #16 = { nounwind } 1537*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #17 = { noinline optnone } 1538*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #18 = { optsize } 1539*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #19 = { readnone } 1540*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #20 = { readonly } 1541*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #21 = { returns_twice } 1542*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #22 = { safestack } 1543*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #23 = { sanitize_address } 1544*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #24 = { sanitize_memory } 1545*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #25 = { sanitize_thread } 1546*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #26 = { ssp } 1547*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #27 = { sspreq } 1548*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #28 = { sspstrong } 1549*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #29 = { "thunk" } 1550*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #30 = { uwtable } 1551*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #31 = { "cpu"="cortex-a8" } 1552*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #32 = { norecurse } 1553*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #33 = { inaccessiblememonly } 1554*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly } 1555*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #35 = { nounwind readnone } 1556*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #36 = { argmemonly nounwind readonly } 1557*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #37 = { argmemonly nounwind } 1558*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #38 = { nounwind readonly } 1559*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #39 = { builtin } 1560*9880d681SAndroid Build Coastguard Worker 1561*9880d681SAndroid Build Coastguard Worker;; Metadata 1562*9880d681SAndroid Build Coastguard Worker 1563*9880d681SAndroid Build Coastguard Worker; Metadata -- Module flags 1564*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!0, !1, !2, !4, !5, !6} 1565*9880d681SAndroid Build Coastguard Worker; CHECK: !llvm.module.flags = !{!0, !1, !2, !4, !5, !6} 1566*9880d681SAndroid Build Coastguard Worker 1567*9880d681SAndroid Build Coastguard Worker!0 = !{i32 1, !"mod1", i32 0} 1568*9880d681SAndroid Build Coastguard Worker; CHECK: !0 = !{i32 1, !"mod1", i32 0} 1569*9880d681SAndroid Build Coastguard Worker!1 = !{i32 2, !"mod2", i32 0} 1570*9880d681SAndroid Build Coastguard Worker; CHECK: !1 = !{i32 2, !"mod2", i32 0} 1571*9880d681SAndroid Build Coastguard Worker!2 = !{i32 3, !"mod3", !3} 1572*9880d681SAndroid Build Coastguard Worker; CHECK: !2 = !{i32 3, !"mod3", !3} 1573*9880d681SAndroid Build Coastguard Worker!3 = !{!"mod6", !0} 1574*9880d681SAndroid Build Coastguard Worker; CHECK: !3 = !{!"mod6", !0} 1575*9880d681SAndroid Build Coastguard Worker!4 = !{i32 4, !"mod4", i32 0} 1576*9880d681SAndroid Build Coastguard Worker; CHECK: !4 = !{i32 4, !"mod4", i32 0} 1577*9880d681SAndroid Build Coastguard Worker!5 = !{i32 5, !"mod5", !0} 1578*9880d681SAndroid Build Coastguard Worker; CHECK: !5 = !{i32 5, !"mod5", !0} 1579*9880d681SAndroid Build Coastguard Worker!6 = !{i32 6, !"mod6", !0} 1580*9880d681SAndroid Build Coastguard Worker; CHECK: !6 = !{i32 6, !"mod6", !0} 1581*9880d681SAndroid Build Coastguard Worker 1582*9880d681SAndroid Build Coastguard Worker; Metadata -- Check `distinct' 1583*9880d681SAndroid Build Coastguard Worker!11 = distinct !{} 1584*9880d681SAndroid Build Coastguard Worker; CHECK: !11 = distinct !{} 1585*9880d681SAndroid Build Coastguard Worker!12 = distinct !{} 1586*9880d681SAndroid Build Coastguard Worker; CHECK: !12 = distinct !{} 1587*9880d681SAndroid Build Coastguard Worker!13 = !{!11} 1588*9880d681SAndroid Build Coastguard Worker; CHECK: !13 = !{!11} 1589*9880d681SAndroid Build Coastguard Worker!14 = !{!12} 1590*9880d681SAndroid Build Coastguard Worker; CHECK: !14 = !{!12} 1591