1*9880d681SAndroid Build Coastguard Worker; Bitcode compatibility test for llvm 3.6.2 2*9880d681SAndroid Build Coastguard Worker; 3*9880d681SAndroid Build Coastguard Worker; N.b: This is 3.6.2-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. These 5*9880d681SAndroid Build Coastguard Worker; locations are tagged with an 'XXX'. 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis < %s.bc | FileCheck %s 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workertarget datalayout = "E" 10*9880d681SAndroid Build Coastguard Worker; CHECK: target datalayout = "E" 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx10.10.0" 13*9880d681SAndroid Build Coastguard Worker; CHECK: target triple = "x86_64-apple-macosx10.10.0" 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker;; Module-level assembly 16*9880d681SAndroid Build Coastguard Workermodule asm "beep boop" 17*9880d681SAndroid Build Coastguard Worker; CHECK: module asm "beep boop" 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker;; Comdats 20*9880d681SAndroid Build Coastguard Worker$comdat.any = comdat any 21*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.any = comdat any 22*9880d681SAndroid Build Coastguard Worker$comdat.exactmatch = comdat exactmatch 23*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.exactmatch = comdat exactmatch 24*9880d681SAndroid Build Coastguard Worker$comdat.largest = comdat largest 25*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.largest = comdat largest 26*9880d681SAndroid Build Coastguard Worker$comdat.noduplicates = comdat noduplicates 27*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.noduplicates = comdat noduplicates 28*9880d681SAndroid Build Coastguard Worker$comdat.samesize = comdat samesize 29*9880d681SAndroid Build Coastguard Worker; CHECK: $comdat.samesize = comdat samesize 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker; Global Variables -- comdat 32*9880d681SAndroid Build Coastguard Worker@comdat.any = global i32 0, comdat 33*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.any = global i32 0, comdat 34*9880d681SAndroid Build Coastguard Worker@comdat.exactmatch = global i32 0, comdat 35*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.exactmatch = global i32 0, comdat 36*9880d681SAndroid Build Coastguard Worker@comdat.largest = global i32 0, comdat 37*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.largest = global i32 0, comdat 38*9880d681SAndroid Build Coastguard Worker@comdat.noduplicates = global i32 0, comdat 39*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.noduplicates = global i32 0, comdat 40*9880d681SAndroid Build Coastguard Worker@comdat.samesize = global i32 0, comdat 41*9880d681SAndroid Build Coastguard Worker; CHECK: @comdat.samesize = global i32 0, comdat 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Worker; Force two globals from different comdats into sections with the same name. 44*9880d681SAndroid Build Coastguard Worker$comdat1 = comdat any 45*9880d681SAndroid Build Coastguard Worker$comdat2 = comdat any 46*9880d681SAndroid Build Coastguard Worker@g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1) 47*9880d681SAndroid Build Coastguard Worker; CHECK: @g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1) 48*9880d681SAndroid Build Coastguard Worker@g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2) 49*9880d681SAndroid Build Coastguard Worker; CHECK: @g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2) 50*9880d681SAndroid Build Coastguard Worker 51*9880d681SAndroid Build Coastguard Worker;; Constants 52*9880d681SAndroid Build Coastguard Worker@const.true = constant i1 true 53*9880d681SAndroid Build Coastguard Worker; CHECK: @const.true = constant i1 true 54*9880d681SAndroid Build Coastguard Worker@const.false = constant i1 false 55*9880d681SAndroid Build Coastguard Worker; CHECK: @const.false = constant i1 false 56*9880d681SAndroid Build Coastguard Worker@const.int = constant i32 zeroinitializer 57*9880d681SAndroid Build Coastguard Worker; CHECK: @const.int = constant i32 0 58*9880d681SAndroid Build Coastguard Worker@const.float = constant double 0.0 59*9880d681SAndroid Build Coastguard Worker; CHECK: @const.float = constant double 0.0 60*9880d681SAndroid Build Coastguard Worker@const.null = constant i8* null 61*9880d681SAndroid Build Coastguard Worker; CHECK: @const.null = constant i8* null 62*9880d681SAndroid Build Coastguard Worker%const.struct.type = type { i32, i8 } 63*9880d681SAndroid Build Coastguard Worker%const.struct.type.packed = type <{ i32, i8 }> 64*9880d681SAndroid Build Coastguard Worker@const.struct = constant %const.struct.type { i32 -1, i8 undef } 65*9880d681SAndroid Build Coastguard Worker; CHECK: @const.struct = constant %const.struct.type { i32 -1, i8 undef } 66*9880d681SAndroid Build Coastguard Worker@const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }> 67*9880d681SAndroid Build Coastguard Worker; CHECK: @const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }> 68*9880d681SAndroid Build Coastguard Worker@const.array = constant [2 x i32] [i32 -3, i32 -4] 69*9880d681SAndroid Build Coastguard Worker; CHECK: @const.array = constant [2 x i32] [i32 -3, i32 -4] 70*9880d681SAndroid Build Coastguard Worker@const.vector = constant <2 x i32> <i32 -5, i32 -6> 71*9880d681SAndroid Build Coastguard Worker; CHECK: @const.vector = constant <2 x i32> <i32 -5, i32 -6> 72*9880d681SAndroid Build Coastguard Worker 73*9880d681SAndroid Build Coastguard Worker;; Global Variables 74*9880d681SAndroid Build Coastguard Worker; Format: [@<GlobalVarName> =] [Linkage] [Visibility] [DLLStorageClass] 75*9880d681SAndroid Build Coastguard Worker; [ThreadLocal] [unnamed_addr] [AddrSpace] [ExternallyInitialized] 76*9880d681SAndroid Build Coastguard Worker; <global | constant> <Type> [<InitializerConstant>] 77*9880d681SAndroid Build Coastguard Worker; [, section "name"] [, align <Alignment>] 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard Worker; Global Variables -- Simple 80*9880d681SAndroid Build Coastguard Worker@g1 = global i32 0 81*9880d681SAndroid Build Coastguard Worker; CHECK: @g1 = global i32 0 82*9880d681SAndroid Build Coastguard Worker@g2 = constant i32 0 83*9880d681SAndroid Build Coastguard Worker; CHECK: @g2 = constant i32 0 84*9880d681SAndroid Build Coastguard Worker 85*9880d681SAndroid Build Coastguard Worker; Global Variables -- Linkage 86*9880d681SAndroid Build Coastguard Worker@g.private = private global i32 0 87*9880d681SAndroid Build Coastguard Worker; CHECK: @g.private = private global i32 0 88*9880d681SAndroid Build Coastguard Worker@g.internal = internal global i32 0 89*9880d681SAndroid Build Coastguard Worker; CHECK: @g.internal = internal global i32 0 90*9880d681SAndroid Build Coastguard Worker@g.available_externally = available_externally global i32 0 91*9880d681SAndroid Build Coastguard Worker; CHECK: @g.available_externally = available_externally global i32 0 92*9880d681SAndroid Build Coastguard Worker@g.linkonce = linkonce global i32 0 93*9880d681SAndroid Build Coastguard Worker; CHECK: @g.linkonce = linkonce global i32 0 94*9880d681SAndroid Build Coastguard Worker@g.weak = weak global i32 0 95*9880d681SAndroid Build Coastguard Worker; CHECK: @g.weak = weak global i32 0 96*9880d681SAndroid Build Coastguard Worker@g.common = common global i32 0 97*9880d681SAndroid Build Coastguard Worker; CHECK: @g.common = common global i32 0 98*9880d681SAndroid Build Coastguard Worker@g.appending = appending global [4 x i8] c"test" 99*9880d681SAndroid Build Coastguard Worker; CHECK: @g.appending = appending global [4 x i8] c"test" 100*9880d681SAndroid Build Coastguard Worker@g.extern_weak = extern_weak global i32 101*9880d681SAndroid Build Coastguard Worker; CHECK: @g.extern_weak = extern_weak global i32 102*9880d681SAndroid Build Coastguard Worker@g.linkonce_odr = linkonce_odr global i32 0 103*9880d681SAndroid Build Coastguard Worker; CHECK: @g.linkonce_odr = linkonce_odr global i32 0 104*9880d681SAndroid Build Coastguard Worker@g.weak_odr = weak_odr global i32 0 105*9880d681SAndroid Build Coastguard Worker; CHECK: @g.weak_odr = weak_odr global i32 0 106*9880d681SAndroid Build Coastguard Worker@g.external = external global i32 107*9880d681SAndroid Build Coastguard Worker; CHECK: @g.external = external global i32 108*9880d681SAndroid Build Coastguard Worker 109*9880d681SAndroid Build Coastguard Worker; Global Variables -- Visibility 110*9880d681SAndroid Build Coastguard Worker@g.default = default global i32 0 111*9880d681SAndroid Build Coastguard Worker; CHECK: @g.default = global i32 0 112*9880d681SAndroid Build Coastguard Worker@g.hidden = hidden global i32 0 113*9880d681SAndroid Build Coastguard Worker; CHECK: @g.hidden = hidden global i32 0 114*9880d681SAndroid Build Coastguard Worker@g.protected = protected global i32 0 115*9880d681SAndroid Build Coastguard Worker; CHECK: @g.protected = protected global i32 0 116*9880d681SAndroid Build Coastguard Worker 117*9880d681SAndroid Build Coastguard Worker; Global Variables -- DLLStorageClass 118*9880d681SAndroid Build Coastguard Worker@g.dlldefault = default global i32 0 119*9880d681SAndroid Build Coastguard Worker; CHECK: @g.dlldefault = global i32 0 120*9880d681SAndroid Build Coastguard Worker@g.dllimport = external dllimport global i32 121*9880d681SAndroid Build Coastguard Worker; CHECK: @g.dllimport = external dllimport global i32 122*9880d681SAndroid Build Coastguard Worker@g.dllexport = dllexport global i32 0 123*9880d681SAndroid Build Coastguard Worker; CHECK: @g.dllexport = dllexport global i32 0 124*9880d681SAndroid Build Coastguard Worker 125*9880d681SAndroid Build Coastguard Worker; Global Variables -- ThreadLocal 126*9880d681SAndroid Build Coastguard Worker@g.notthreadlocal = global i32 0 127*9880d681SAndroid Build Coastguard Worker; CHECK: @g.notthreadlocal = global i32 0 128*9880d681SAndroid Build Coastguard Worker@g.generaldynamic = thread_local global i32 0 129*9880d681SAndroid Build Coastguard Worker; CHECK: @g.generaldynamic = thread_local global i32 0 130*9880d681SAndroid Build Coastguard Worker@g.localdynamic = thread_local(localdynamic) global i32 0 131*9880d681SAndroid Build Coastguard Worker; CHECK: @g.localdynamic = thread_local(localdynamic) global i32 0 132*9880d681SAndroid Build Coastguard Worker@g.initialexec = thread_local(initialexec) global i32 0 133*9880d681SAndroid Build Coastguard Worker; CHECK: @g.initialexec = thread_local(initialexec) global i32 0 134*9880d681SAndroid Build Coastguard Worker@g.localexec = thread_local(localexec) global i32 0 135*9880d681SAndroid Build Coastguard Worker; CHECK: @g.localexec = thread_local(localexec) global i32 0 136*9880d681SAndroid Build Coastguard Worker 137*9880d681SAndroid Build Coastguard Worker; Global Variables -- unnamed_addr 138*9880d681SAndroid Build Coastguard Worker@g.unnamed_addr = unnamed_addr global i32 0 139*9880d681SAndroid Build Coastguard Worker; CHECK: @g.unnamed_addr = unnamed_addr global i32 0 140*9880d681SAndroid Build Coastguard Worker 141*9880d681SAndroid Build Coastguard Worker; Global Variables -- AddrSpace 142*9880d681SAndroid Build Coastguard Worker@g.addrspace = addrspace(1) global i32 0 143*9880d681SAndroid Build Coastguard Worker; CHECK: @g.addrspace = addrspace(1) global i32 0 144*9880d681SAndroid Build Coastguard Worker 145*9880d681SAndroid Build Coastguard Worker; Global Variables -- ExternallyInitialized 146*9880d681SAndroid Build Coastguard Worker@g.externally_initialized = external externally_initialized global i32 147*9880d681SAndroid Build Coastguard Worker; CHECK: @g.externally_initialized = external externally_initialized global i32 148*9880d681SAndroid Build Coastguard Worker 149*9880d681SAndroid Build Coastguard Worker; Global Variables -- section 150*9880d681SAndroid Build Coastguard Worker@g.section = global i32 0, section "_DATA" 151*9880d681SAndroid Build Coastguard Worker; CHECK: @g.section = global i32 0, section "_DATA" 152*9880d681SAndroid Build Coastguard Worker 153*9880d681SAndroid Build Coastguard Worker; Global Variables -- align 154*9880d681SAndroid Build Coastguard Worker@g.align = global i32 0, align 4 155*9880d681SAndroid Build Coastguard Worker; CHECK: @g.align = global i32 0, align 4 156*9880d681SAndroid Build Coastguard Worker 157*9880d681SAndroid Build Coastguard Worker; Global Variables -- Intrinsics 158*9880d681SAndroid Build Coastguard Worker%pri.func.data = type { i32, void ()*, i8* } 159*9880d681SAndroid Build Coastguard Worker@g.used1 = global i32 0 160*9880d681SAndroid Build Coastguard Worker@g.used2 = global i32 0 161*9880d681SAndroid Build Coastguard Worker@g.used3 = global i8 0 162*9880d681SAndroid Build Coastguard Workerdeclare void @g.f1() 163*9880d681SAndroid Build Coastguard Worker@llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata" 164*9880d681SAndroid Build Coastguard Worker; CHECK: @llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata" 165*9880d681SAndroid Build Coastguard Worker@llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata" 166*9880d681SAndroid Build Coastguard Worker; CHECK: @llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata" 167*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" 168*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" 169*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" 170*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" 171*9880d681SAndroid Build Coastguard Worker 172*9880d681SAndroid Build Coastguard Worker;; Aliases 173*9880d681SAndroid Build Coastguard Worker; Format: @<Name> = [Linkage] [Visibility] [DLLStorageClass] [ThreadLocal] 174*9880d681SAndroid Build Coastguard Worker; [unnamed_addr] alias <AliaseeTy> @<Aliasee> 175*9880d681SAndroid Build Coastguard Worker 176*9880d681SAndroid Build Coastguard Worker; Aliases -- Linkage 177*9880d681SAndroid Build Coastguard Worker@a.private = private alias i32* @g.private 178*9880d681SAndroid Build Coastguard Worker; CHECK: @a.private = private alias i32, i32* @g.private 179*9880d681SAndroid Build Coastguard Worker@a.internal = internal alias i32* @g.internal 180*9880d681SAndroid Build Coastguard Worker; CHECK: @a.internal = internal alias i32, i32* @g.internal 181*9880d681SAndroid Build Coastguard Worker@a.linkonce = linkonce alias i32* @g.linkonce 182*9880d681SAndroid Build Coastguard Worker; CHECK: @a.linkonce = linkonce alias i32, i32* @g.linkonce 183*9880d681SAndroid Build Coastguard Worker@a.weak = weak alias i32* @g.weak 184*9880d681SAndroid Build Coastguard Worker; CHECK: @a.weak = weak alias i32, i32* @g.weak 185*9880d681SAndroid Build Coastguard Worker@a.linkonce_odr = linkonce_odr alias i32* @g.linkonce_odr 186*9880d681SAndroid Build Coastguard Worker; CHECK: @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr 187*9880d681SAndroid Build Coastguard Worker@a.weak_odr = weak_odr alias i32* @g.weak_odr 188*9880d681SAndroid Build Coastguard Worker; CHECK: @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr 189*9880d681SAndroid Build Coastguard Worker@a.external = external alias i32* @g1 190*9880d681SAndroid Build Coastguard Worker; CHECK: @a.external = alias i32, i32* @g1 191*9880d681SAndroid Build Coastguard Worker 192*9880d681SAndroid Build Coastguard Worker; Aliases -- Visibility 193*9880d681SAndroid Build Coastguard Worker@a.default = default alias i32* @g.default 194*9880d681SAndroid Build Coastguard Worker; CHECK: @a.default = alias i32, i32* @g.default 195*9880d681SAndroid Build Coastguard Worker@a.hidden = hidden alias i32* @g.hidden 196*9880d681SAndroid Build Coastguard Worker; CHECK: @a.hidden = hidden alias i32, i32* @g.hidden 197*9880d681SAndroid Build Coastguard Worker@a.protected = protected alias i32* @g.protected 198*9880d681SAndroid Build Coastguard Worker; CHECK: @a.protected = protected alias i32, i32* @g.protected 199*9880d681SAndroid Build Coastguard Worker 200*9880d681SAndroid Build Coastguard Worker; Aliases -- DLLStorageClass 201*9880d681SAndroid Build Coastguard Worker@a.dlldefault = default alias i32* @g.dlldefault 202*9880d681SAndroid Build Coastguard Worker; CHECK: @a.dlldefault = alias i32, i32* @g.dlldefault 203*9880d681SAndroid Build Coastguard Worker@a.dllimport = dllimport alias i32* @g1 204*9880d681SAndroid Build Coastguard Worker; CHECK: @a.dllimport = dllimport alias i32, i32* @g1 205*9880d681SAndroid Build Coastguard Worker@a.dllexport = dllexport alias i32* @g.dllexport 206*9880d681SAndroid Build Coastguard Worker; CHECK: @a.dllexport = dllexport alias i32, i32* @g.dllexport 207*9880d681SAndroid Build Coastguard Worker 208*9880d681SAndroid Build Coastguard Worker; Aliases -- ThreadLocal 209*9880d681SAndroid Build Coastguard Worker@a.notthreadlocal = alias i32* @g.notthreadlocal 210*9880d681SAndroid Build Coastguard Worker; CHECK: @a.notthreadlocal = alias i32, i32* @g.notthreadlocal 211*9880d681SAndroid Build Coastguard Worker@a.generaldynamic = thread_local alias i32* @g.generaldynamic 212*9880d681SAndroid Build Coastguard Worker; CHECK: @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic 213*9880d681SAndroid Build Coastguard Worker@a.localdynamic = thread_local(localdynamic) alias i32* @g.localdynamic 214*9880d681SAndroid Build Coastguard Worker; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic 215*9880d681SAndroid Build Coastguard Worker@a.initialexec = thread_local(initialexec) alias i32* @g.initialexec 216*9880d681SAndroid Build Coastguard Worker; CHECK: @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec 217*9880d681SAndroid Build Coastguard Worker@a.localexec = thread_local(localexec) alias i32* @g.localexec 218*9880d681SAndroid Build Coastguard Worker; CHECK: @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec 219*9880d681SAndroid Build Coastguard Worker 220*9880d681SAndroid Build Coastguard Worker; Aliases -- unnamed_addr 221*9880d681SAndroid Build Coastguard Worker@a.unnamed_addr = unnamed_addr alias i32* @g.unnamed_addr 222*9880d681SAndroid Build Coastguard Worker; CHECK: @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr 223*9880d681SAndroid Build Coastguard Worker 224*9880d681SAndroid Build Coastguard Worker;; Functions 225*9880d681SAndroid Build Coastguard Worker; Format: define [linkage] [visibility] [DLLStorageClass] 226*9880d681SAndroid Build Coastguard Worker; [cconv] [ret attrs] 227*9880d681SAndroid Build Coastguard Worker; <ResultType> @<FunctionName> ([argument list]) 228*9880d681SAndroid Build Coastguard Worker; [unnamed_addr] [fn Attrs] [section "name"] [comdat [($name)]] 229*9880d681SAndroid Build Coastguard Worker; [align N] [gc] [prefix Constant] 230*9880d681SAndroid Build Coastguard Worker; { ... } 231*9880d681SAndroid Build Coastguard Worker 232*9880d681SAndroid Build Coastguard Worker; Functions -- Simple 233*9880d681SAndroid Build Coastguard Workerdeclare void @f1 () 234*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f1() 235*9880d681SAndroid Build Coastguard Worker 236*9880d681SAndroid Build Coastguard Workerdefine void @f2 () { 237*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f2() 238*9880d681SAndroid Build Coastguard Workerentry: 239*9880d681SAndroid Build Coastguard Worker ret void 240*9880d681SAndroid Build Coastguard Worker} 241*9880d681SAndroid Build Coastguard Worker 242*9880d681SAndroid Build Coastguard Worker; Functions -- linkage 243*9880d681SAndroid Build Coastguard Workerdefine private void @f.private() { 244*9880d681SAndroid Build Coastguard Worker; CHECK: define private void @f.private() 245*9880d681SAndroid Build Coastguard Workerentry: 246*9880d681SAndroid Build Coastguard Worker ret void 247*9880d681SAndroid Build Coastguard Worker} 248*9880d681SAndroid Build Coastguard Workerdefine internal void @f.internal() { 249*9880d681SAndroid Build Coastguard Worker; CHECK: define internal void @f.internal() 250*9880d681SAndroid Build Coastguard Workerentry: 251*9880d681SAndroid Build Coastguard Worker ret void 252*9880d681SAndroid Build Coastguard Worker} 253*9880d681SAndroid Build Coastguard Workerdefine available_externally void @f.available_externally() { 254*9880d681SAndroid Build Coastguard Worker; CHECK: define available_externally void @f.available_externally() 255*9880d681SAndroid Build Coastguard Workerentry: 256*9880d681SAndroid Build Coastguard Worker ret void 257*9880d681SAndroid Build Coastguard Worker} 258*9880d681SAndroid Build Coastguard Workerdefine linkonce void @f.linkonce() { 259*9880d681SAndroid Build Coastguard Worker; CHECK: define linkonce void @f.linkonce() 260*9880d681SAndroid Build Coastguard Workerentry: 261*9880d681SAndroid Build Coastguard Worker ret void 262*9880d681SAndroid Build Coastguard Worker} 263*9880d681SAndroid Build Coastguard Workerdefine weak void @f.weak() { 264*9880d681SAndroid Build Coastguard Worker; CHECK: define weak void @f.weak() 265*9880d681SAndroid Build Coastguard Workerentry: 266*9880d681SAndroid Build Coastguard Worker ret void 267*9880d681SAndroid Build Coastguard Worker} 268*9880d681SAndroid Build Coastguard Workerdefine linkonce_odr void @f.linkonce_odr() { 269*9880d681SAndroid Build Coastguard Worker; CHECK: define linkonce_odr void @f.linkonce_odr() 270*9880d681SAndroid Build Coastguard Workerentry: 271*9880d681SAndroid Build Coastguard Worker ret void 272*9880d681SAndroid Build Coastguard Worker} 273*9880d681SAndroid Build Coastguard Workerdefine weak_odr void @f.weak_odr() { 274*9880d681SAndroid Build Coastguard Worker; CHECK: define weak_odr void @f.weak_odr() 275*9880d681SAndroid Build Coastguard Workerentry: 276*9880d681SAndroid Build Coastguard Worker ret void 277*9880d681SAndroid Build Coastguard Worker} 278*9880d681SAndroid Build Coastguard Workerdeclare external void @f.external() 279*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.external() 280*9880d681SAndroid Build Coastguard Workerdeclare extern_weak void @f.extern_weak() 281*9880d681SAndroid Build Coastguard Worker; CHECK: declare extern_weak void @f.extern_weak() 282*9880d681SAndroid Build Coastguard Worker 283*9880d681SAndroid Build Coastguard Worker; Functions -- visibility 284*9880d681SAndroid Build Coastguard Workerdeclare default void @f.default() 285*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.default() 286*9880d681SAndroid Build Coastguard Workerdeclare hidden void @f.hidden() 287*9880d681SAndroid Build Coastguard Worker; CHECK: declare hidden void @f.hidden() 288*9880d681SAndroid Build Coastguard Workerdeclare protected void @f.protected() 289*9880d681SAndroid Build Coastguard Worker; CHECK: declare protected void @f.protected() 290*9880d681SAndroid Build Coastguard Worker 291*9880d681SAndroid Build Coastguard Worker; Functions -- DLLStorageClass 292*9880d681SAndroid Build Coastguard Workerdeclare dllimport void @f.dllimport() 293*9880d681SAndroid Build Coastguard Worker; CHECK: declare dllimport void @f.dllimport() 294*9880d681SAndroid Build Coastguard Workerdeclare dllexport void @f.dllexport() 295*9880d681SAndroid Build Coastguard Worker; CHECK: declare dllexport void @f.dllexport() 296*9880d681SAndroid Build Coastguard Worker 297*9880d681SAndroid Build Coastguard Worker; Functions -- cconv (Calling conventions) 298*9880d681SAndroid Build Coastguard Workerdeclare ccc void @f.ccc() 299*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.ccc() 300*9880d681SAndroid Build Coastguard Workerdeclare fastcc void @f.fastcc() 301*9880d681SAndroid Build Coastguard Worker; CHECK: declare fastcc void @f.fastcc() 302*9880d681SAndroid Build Coastguard Workerdeclare coldcc void @f.coldcc() 303*9880d681SAndroid Build Coastguard Worker; CHECK: declare coldcc void @f.coldcc() 304*9880d681SAndroid Build Coastguard Workerdeclare cc10 void @f.cc10() 305*9880d681SAndroid Build Coastguard Worker; CHECK: declare ghccc void @f.cc10() 306*9880d681SAndroid Build Coastguard Workerdeclare ghccc void @f.ghccc() 307*9880d681SAndroid Build Coastguard Worker; CHECK: declare ghccc void @f.ghccc() 308*9880d681SAndroid Build Coastguard Workerdeclare cc11 void @f.cc11() 309*9880d681SAndroid Build Coastguard Worker; CHECK: declare cc11 void @f.cc11() 310*9880d681SAndroid Build Coastguard Workerdeclare webkit_jscc void @f.webkit_jscc() 311*9880d681SAndroid Build Coastguard Worker; CHECK: declare webkit_jscc void @f.webkit_jscc() 312*9880d681SAndroid Build Coastguard Workerdeclare anyregcc void @f.anyregcc() 313*9880d681SAndroid Build Coastguard Worker; CHECK: declare anyregcc void @f.anyregcc() 314*9880d681SAndroid Build Coastguard Workerdeclare preserve_mostcc void @f.preserve_mostcc() 315*9880d681SAndroid Build Coastguard Worker; CHECK: declare preserve_mostcc void @f.preserve_mostcc() 316*9880d681SAndroid Build Coastguard Workerdeclare preserve_allcc void @f.preserve_allcc() 317*9880d681SAndroid Build Coastguard Worker; CHECK: declare preserve_allcc void @f.preserve_allcc() 318*9880d681SAndroid Build Coastguard Workerdeclare cc64 void @f.cc64() 319*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_stdcallcc void @f.cc64() 320*9880d681SAndroid Build Coastguard Workerdeclare x86_stdcallcc void @f.x86_stdcallcc() 321*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_stdcallcc void @f.x86_stdcallcc() 322*9880d681SAndroid Build Coastguard Workerdeclare cc65 void @f.cc65() 323*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_fastcallcc void @f.cc65() 324*9880d681SAndroid Build Coastguard Workerdeclare x86_fastcallcc void @f.x86_fastcallcc() 325*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_fastcallcc void @f.x86_fastcallcc() 326*9880d681SAndroid Build Coastguard Workerdeclare cc66 void @f.cc66() 327*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_apcscc void @f.cc66() 328*9880d681SAndroid Build Coastguard Workerdeclare arm_apcscc void @f.arm_apcscc() 329*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_apcscc void @f.arm_apcscc() 330*9880d681SAndroid Build Coastguard Workerdeclare cc67 void @f.cc67() 331*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcscc void @f.cc67() 332*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcscc void @f.arm_aapcscc() 333*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcscc void @f.arm_aapcscc() 334*9880d681SAndroid Build Coastguard Workerdeclare cc68 void @f.cc68() 335*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcs_vfpcc void @f.cc68() 336*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc() 337*9880d681SAndroid Build Coastguard Worker; CHECK: declare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc() 338*9880d681SAndroid Build Coastguard Workerdeclare cc69 void @f.cc69() 339*9880d681SAndroid Build Coastguard Worker; CHECK: declare msp430_intrcc void @f.cc69() 340*9880d681SAndroid Build Coastguard Workerdeclare msp430_intrcc void @f.msp430_intrcc() 341*9880d681SAndroid Build Coastguard Worker; CHECK: declare msp430_intrcc void @f.msp430_intrcc() 342*9880d681SAndroid Build Coastguard Workerdeclare cc70 void @f.cc70() 343*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_thiscallcc void @f.cc70() 344*9880d681SAndroid Build Coastguard Workerdeclare x86_thiscallcc void @f.x86_thiscallcc() 345*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_thiscallcc void @f.x86_thiscallcc() 346*9880d681SAndroid Build Coastguard Workerdeclare cc71 void @f.cc71() 347*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_kernel void @f.cc71() 348*9880d681SAndroid Build Coastguard Workerdeclare ptx_kernel void @f.ptx_kernel() 349*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_kernel void @f.ptx_kernel() 350*9880d681SAndroid Build Coastguard Workerdeclare cc72 void @f.cc72() 351*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_device void @f.cc72() 352*9880d681SAndroid Build Coastguard Workerdeclare ptx_device void @f.ptx_device() 353*9880d681SAndroid Build Coastguard Worker; CHECK: declare ptx_device void @f.ptx_device() 354*9880d681SAndroid Build Coastguard Workerdeclare cc75 void @f.cc75() 355*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_func void @f.cc75() 356*9880d681SAndroid Build Coastguard Workerdeclare spir_func void @f.spir_func() 357*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_func void @f.spir_func() 358*9880d681SAndroid Build Coastguard Workerdeclare cc76 void @f.cc76() 359*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_kernel void @f.cc76() 360*9880d681SAndroid Build Coastguard Workerdeclare spir_kernel void @f.spir_kernel() 361*9880d681SAndroid Build Coastguard Worker; CHECK: declare spir_kernel void @f.spir_kernel() 362*9880d681SAndroid Build Coastguard Workerdeclare cc77 void @f.cc77() 363*9880d681SAndroid Build Coastguard Worker; CHECK: declare intel_ocl_bicc void @f.cc77() 364*9880d681SAndroid Build Coastguard Workerdeclare intel_ocl_bicc void @f.intel_ocl_bicc() 365*9880d681SAndroid Build Coastguard Worker; CHECK: declare intel_ocl_bicc void @f.intel_ocl_bicc() 366*9880d681SAndroid Build Coastguard Workerdeclare cc78 void @f.cc78() 367*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_sysvcc void @f.cc78() 368*9880d681SAndroid Build Coastguard Workerdeclare x86_64_sysvcc void @f.x86_64_sysvcc() 369*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_sysvcc void @f.x86_64_sysvcc() 370*9880d681SAndroid Build Coastguard Workerdeclare cc79 void @f.cc79() 371*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_win64cc void @f.cc79() 372*9880d681SAndroid Build Coastguard Workerdeclare x86_64_win64cc void @f.x86_64_win64cc() 373*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_64_win64cc void @f.x86_64_win64cc() 374*9880d681SAndroid Build Coastguard Workerdeclare cc80 void @f.cc80() 375*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_vectorcallcc void @f.cc80() 376*9880d681SAndroid Build Coastguard Workerdeclare x86_vectorcallcc void @f.x86_vectorcallcc() 377*9880d681SAndroid Build Coastguard Worker; CHECK: declare x86_vectorcallcc void @f.x86_vectorcallcc() 378*9880d681SAndroid Build Coastguard Workerdeclare cc1023 void @f.cc1023() 379*9880d681SAndroid Build Coastguard Worker; CHECK: declare cc1023 void @f.cc1023() 380*9880d681SAndroid Build Coastguard Worker 381*9880d681SAndroid Build Coastguard Worker; Functions -- ret attrs (Return attributes) 382*9880d681SAndroid Build Coastguard Workerdeclare zeroext i64 @f.zeroext() 383*9880d681SAndroid Build Coastguard Worker; CHECK: declare zeroext i64 @f.zeroext() 384*9880d681SAndroid Build Coastguard Workerdeclare signext i64 @f.signext() 385*9880d681SAndroid Build Coastguard Worker; CHECK: declare signext i64 @f.signext() 386*9880d681SAndroid Build Coastguard Workerdeclare inreg i32* @f.inreg() 387*9880d681SAndroid Build Coastguard Worker; CHECK: declare inreg i32* @f.inreg() 388*9880d681SAndroid Build Coastguard Workerdeclare noalias i32* @f.noalias() 389*9880d681SAndroid Build Coastguard Worker; CHECK: declare noalias i32* @f.noalias() 390*9880d681SAndroid Build Coastguard Workerdeclare nonnull i32* @f.nonnull() 391*9880d681SAndroid Build Coastguard Worker; CHECK: declare nonnull i32* @f.nonnull() 392*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable(4) i32* @f.dereferenceable4() 393*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable(4) i32* @f.dereferenceable4() 394*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable(8) i32* @f.dereferenceable8() 395*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable(8) i32* @f.dereferenceable8() 396*9880d681SAndroid Build Coastguard Workerdeclare dereferenceable(16) i32* @f.dereferenceable16() 397*9880d681SAndroid Build Coastguard Worker; CHECK: declare dereferenceable(16) i32* @f.dereferenceable16() 398*9880d681SAndroid Build Coastguard Worker 399*9880d681SAndroid Build Coastguard Worker; Functions -- Parameter attributes 400*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.zeroext(i8 zeroext) 401*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.zeroext(i8 zeroext) 402*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.signext(i8 signext) 403*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.signext(i8 signext) 404*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.inreg(i8 inreg) 405*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.inreg(i8 inreg) 406*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.byval({ i8, i8 }* byval) 407*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.byval({ i8, i8 }* byval) 408*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.inalloca(i8* inalloca) 409*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.inalloca(i8* inalloca) 410*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.sret(i8* sret) 411*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.sret(i8* sret) 412*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.noalias(i8* noalias) 413*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.noalias(i8* noalias) 414*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.nocapture(i8* nocapture) 415*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.nocapture(i8* nocapture) 416*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.nest(i8* nest) 417*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.nest(i8* nest) 418*9880d681SAndroid Build Coastguard Workerdeclare i8* @f.param.returned(i8* returned) 419*9880d681SAndroid Build Coastguard Worker; CHECK: declare i8* @f.param.returned(i8* returned) 420*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.nonnull(i8* nonnull) 421*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.nonnull(i8* nonnull) 422*9880d681SAndroid Build Coastguard Workerdeclare void @f.param.dereferenceable(i8* dereferenceable(4)) 423*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.param.dereferenceable(i8* dereferenceable(4)) 424*9880d681SAndroid Build Coastguard Worker 425*9880d681SAndroid Build Coastguard Worker; Functions -- unnamed_addr 426*9880d681SAndroid Build Coastguard Workerdeclare void @f.unnamed_addr() unnamed_addr 427*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.unnamed_addr() unnamed_addr 428*9880d681SAndroid Build Coastguard Worker 429*9880d681SAndroid Build Coastguard Worker; Functions -- fn Attrs (Function attributes) 430*9880d681SAndroid Build Coastguard Workerdeclare void @f.alignstack4() alignstack(4) 431*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.alignstack4() #0 432*9880d681SAndroid Build Coastguard Workerdeclare void @f.alignstack8() alignstack(8) 433*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.alignstack8() #1 434*9880d681SAndroid Build Coastguard Workerdeclare void @f.alwaysinline() alwaysinline 435*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.alwaysinline() #2 436*9880d681SAndroid Build Coastguard Workerdeclare void @f.cold() cold 437*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.cold() #3 438*9880d681SAndroid Build Coastguard Workerdeclare void @f.inlinehint() inlinehint 439*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.inlinehint() #4 440*9880d681SAndroid Build Coastguard Workerdeclare void @f.jumptable() unnamed_addr jumptable 441*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.jumptable() unnamed_addr #5 442*9880d681SAndroid Build Coastguard Workerdeclare void @f.minsize() minsize 443*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.minsize() #6 444*9880d681SAndroid Build Coastguard Workerdeclare void @f.naked() naked 445*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.naked() #7 446*9880d681SAndroid Build Coastguard Workerdeclare void @f.nobuiltin() nobuiltin 447*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.nobuiltin() #8 448*9880d681SAndroid Build Coastguard Workerdeclare void @f.noduplicate() noduplicate 449*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noduplicate() #9 450*9880d681SAndroid Build Coastguard Workerdeclare void @f.noimplicitfloat() noimplicitfloat 451*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noimplicitfloat() #10 452*9880d681SAndroid Build Coastguard Workerdeclare void @f.noinline() noinline 453*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noinline() #11 454*9880d681SAndroid Build Coastguard Workerdeclare void @f.nonlazybind() nonlazybind 455*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.nonlazybind() #12 456*9880d681SAndroid Build Coastguard Workerdeclare void @f.noredzone() noredzone 457*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noredzone() #13 458*9880d681SAndroid Build Coastguard Workerdeclare void @f.noreturn() noreturn 459*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.noreturn() #14 460*9880d681SAndroid Build Coastguard Workerdeclare void @f.nounwind() nounwind 461*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.nounwind() #15 462*9880d681SAndroid Build Coastguard Workerdeclare void @f.optnone() noinline optnone 463*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.optnone() #16 464*9880d681SAndroid Build Coastguard Workerdeclare void @f.optsize() optsize 465*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.optsize() #17 466*9880d681SAndroid Build Coastguard Workerdeclare void @f.readnone() readnone 467*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.readnone() #18 468*9880d681SAndroid Build Coastguard Workerdeclare void @f.readonly() readonly 469*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.readonly() #19 470*9880d681SAndroid Build Coastguard Workerdeclare void @f.returns_twice() returns_twice 471*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.returns_twice() #20 472*9880d681SAndroid Build Coastguard Workerdeclare void @f.sanitize_address() sanitize_address 473*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sanitize_address() #21 474*9880d681SAndroid Build Coastguard Workerdeclare void @f.sanitize_memory() sanitize_memory 475*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sanitize_memory() #22 476*9880d681SAndroid Build Coastguard Workerdeclare void @f.sanitize_thread() sanitize_thread 477*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sanitize_thread() #23 478*9880d681SAndroid Build Coastguard Workerdeclare void @f.ssp() ssp 479*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.ssp() #24 480*9880d681SAndroid Build Coastguard Workerdeclare void @f.sspreq() sspreq 481*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sspreq() #25 482*9880d681SAndroid Build Coastguard Workerdeclare void @f.sspstrong() sspstrong 483*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.sspstrong() #26 484*9880d681SAndroid Build Coastguard Workerdeclare void @f.uwtable() uwtable 485*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.uwtable() #27 486*9880d681SAndroid Build Coastguard Workerdeclare void @f.kvpair() "cpu"="cortex-a8" 487*9880d681SAndroid Build Coastguard Worker; CHECK:declare void @f.kvpair() #28 488*9880d681SAndroid Build Coastguard Worker 489*9880d681SAndroid Build Coastguard Worker; Functions -- section 490*9880d681SAndroid Build Coastguard Workerdeclare void @f.section() section "80" 491*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.section() section "80" 492*9880d681SAndroid Build Coastguard Worker 493*9880d681SAndroid Build Coastguard Worker; Functions -- comdat 494*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_any() comdat($comdat.any) { 495*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_any() comdat($comdat.any) 496*9880d681SAndroid Build Coastguard Workerentry: 497*9880d681SAndroid Build Coastguard Worker ret void 498*9880d681SAndroid Build Coastguard Worker} 499*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_exactmatch() comdat($comdat.exactmatch) { 500*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_exactmatch() comdat($comdat.exactmatch) 501*9880d681SAndroid Build Coastguard Workerentry: 502*9880d681SAndroid Build Coastguard Worker ret void 503*9880d681SAndroid Build Coastguard Worker} 504*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_largest() comdat($comdat.largest) { 505*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_largest() comdat($comdat.largest) 506*9880d681SAndroid Build Coastguard Workerentry: 507*9880d681SAndroid Build Coastguard Worker ret void 508*9880d681SAndroid Build Coastguard Worker} 509*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_noduplicates() comdat($comdat.noduplicates) { 510*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_noduplicates() comdat($comdat.noduplicates) 511*9880d681SAndroid Build Coastguard Workerentry: 512*9880d681SAndroid Build Coastguard Worker ret void 513*9880d681SAndroid Build Coastguard Worker} 514*9880d681SAndroid Build Coastguard Workerdefine void @f.comdat_samesize() comdat($comdat.samesize) { 515*9880d681SAndroid Build Coastguard Worker; CHECK: define void @f.comdat_samesize() comdat($comdat.samesize) 516*9880d681SAndroid Build Coastguard Workerentry: 517*9880d681SAndroid Build Coastguard Worker ret void 518*9880d681SAndroid Build Coastguard Worker} 519*9880d681SAndroid Build Coastguard Worker 520*9880d681SAndroid Build Coastguard Worker; Functions -- align 521*9880d681SAndroid Build Coastguard Workerdeclare void @f.align2() align 2 522*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.align2() align 2 523*9880d681SAndroid Build Coastguard Workerdeclare void @f.align4() align 4 524*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.align4() align 4 525*9880d681SAndroid Build Coastguard Workerdeclare void @f.align8() align 8 526*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.align8() align 8 527*9880d681SAndroid Build Coastguard Worker 528*9880d681SAndroid Build Coastguard Worker; Functions -- GC 529*9880d681SAndroid Build Coastguard Workerdeclare void @f.gcshadow() gc "shadow-stack" 530*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.gcshadow() gc "shadow-stack" 531*9880d681SAndroid Build Coastguard Worker 532*9880d681SAndroid Build Coastguard Worker; Functions -- Prefix data 533*9880d681SAndroid Build Coastguard Workerdeclare void @f.prefixi32() prefix i32 1684365668 534*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.prefixi32() prefix i32 1684365668 535*9880d681SAndroid Build Coastguard Workerdeclare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3] 536*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3] 537*9880d681SAndroid Build Coastguard Worker 538*9880d681SAndroid Build Coastguard Worker;; Atomic Memory Ordering Constraints 539*9880d681SAndroid Build Coastguard Workerdefine void @atomics(i32* %word) { 540*9880d681SAndroid Build Coastguard Worker %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic 541*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic 542*9880d681SAndroid Build Coastguard Worker %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic 543*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic 544*9880d681SAndroid Build Coastguard Worker %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic 545*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic 546*9880d681SAndroid Build Coastguard Worker %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic 547*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic 548*9880d681SAndroid Build Coastguard Worker %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic 549*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic 550*9880d681SAndroid Build Coastguard Worker %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic 551*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic 552*9880d681SAndroid Build Coastguard Worker %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic 553*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic 554*9880d681SAndroid Build Coastguard Worker %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 singlethread seq_cst monotonic 555*9880d681SAndroid Build Coastguard Worker ; CHECK: %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 singlethread seq_cst monotonic 556*9880d681SAndroid Build Coastguard Worker %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic 557*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic 558*9880d681SAndroid Build Coastguard Worker %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic 559*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic 560*9880d681SAndroid Build Coastguard Worker %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic 561*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic 562*9880d681SAndroid Build Coastguard Worker %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic 563*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic 564*9880d681SAndroid Build Coastguard Worker %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic 565*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic 566*9880d681SAndroid Build Coastguard Worker %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic 567*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic 568*9880d681SAndroid Build Coastguard Worker %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic 569*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic 570*9880d681SAndroid Build Coastguard Worker %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic 571*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic 572*9880d681SAndroid Build Coastguard Worker %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic 573*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic 574*9880d681SAndroid Build Coastguard Worker %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 singlethread monotonic 575*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 singlethread monotonic 576*9880d681SAndroid Build Coastguard Worker %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 singlethread monotonic 577*9880d681SAndroid Build Coastguard Worker ; CHECK: %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 singlethread monotonic 578*9880d681SAndroid Build Coastguard Worker fence acquire 579*9880d681SAndroid Build Coastguard Worker ; CHECK: fence acquire 580*9880d681SAndroid Build Coastguard Worker fence release 581*9880d681SAndroid Build Coastguard Worker ; CHECK: fence release 582*9880d681SAndroid Build Coastguard Worker fence acq_rel 583*9880d681SAndroid Build Coastguard Worker ; CHECK: fence acq_rel 584*9880d681SAndroid Build Coastguard Worker fence singlethread seq_cst 585*9880d681SAndroid Build Coastguard Worker ; CHECK: fence singlethread seq_cst 586*9880d681SAndroid Build Coastguard Worker 587*9880d681SAndroid Build Coastguard Worker ; XXX: The parser spits out the load type here. 588*9880d681SAndroid Build Coastguard Worker %ld.1 = load atomic i32* %word monotonic, align 4 589*9880d681SAndroid Build Coastguard Worker ; CHECK: %ld.1 = load atomic i32, i32* %word monotonic, align 4 590*9880d681SAndroid Build Coastguard Worker %ld.2 = load atomic volatile i32* %word acquire, align 8 591*9880d681SAndroid Build Coastguard Worker ; CHECK: %ld.2 = load atomic volatile i32, i32* %word acquire, align 8 592*9880d681SAndroid Build Coastguard Worker %ld.3 = load atomic volatile i32* %word singlethread seq_cst, align 16 593*9880d681SAndroid Build Coastguard Worker ; CHECK: %ld.3 = load atomic volatile i32, i32* %word singlethread seq_cst, align 16 594*9880d681SAndroid Build Coastguard Worker 595*9880d681SAndroid Build Coastguard Worker store atomic i32 23, i32* %word monotonic, align 4 596*9880d681SAndroid Build Coastguard Worker ; CHECK: store atomic i32 23, i32* %word monotonic, align 4 597*9880d681SAndroid Build Coastguard Worker store atomic volatile i32 24, i32* %word monotonic, align 4 598*9880d681SAndroid Build Coastguard Worker ; CHECK: store atomic volatile i32 24, i32* %word monotonic, align 4 599*9880d681SAndroid Build Coastguard Worker store atomic volatile i32 25, i32* %word singlethread monotonic, align 4 600*9880d681SAndroid Build Coastguard Worker ; CHECK: store atomic volatile i32 25, i32* %word singlethread monotonic, align 4 601*9880d681SAndroid Build Coastguard Worker ret void 602*9880d681SAndroid Build Coastguard Worker} 603*9880d681SAndroid Build Coastguard Worker 604*9880d681SAndroid Build Coastguard Worker;; Fast Math Flags 605*9880d681SAndroid Build Coastguard Workerdefine void @fastmathflags(float %op1, float %op2) { 606*9880d681SAndroid Build Coastguard Worker %f.nnan = fadd nnan float %op1, %op2 607*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.nnan = fadd nnan float %op1, %op2 608*9880d681SAndroid Build Coastguard Worker %f.ninf = fadd ninf float %op1, %op2 609*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.ninf = fadd ninf float %op1, %op2 610*9880d681SAndroid Build Coastguard Worker %f.nsz = fadd nsz float %op1, %op2 611*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.nsz = fadd nsz float %op1, %op2 612*9880d681SAndroid Build Coastguard Worker %f.arcp = fadd arcp float %op1, %op2 613*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.arcp = fadd arcp float %op1, %op2 614*9880d681SAndroid Build Coastguard Worker %f.fast = fadd fast float %op1, %op2 615*9880d681SAndroid Build Coastguard Worker ; CHECK: %f.fast = fadd fast float %op1, %op2 616*9880d681SAndroid Build Coastguard Worker ret void 617*9880d681SAndroid Build Coastguard Worker} 618*9880d681SAndroid Build Coastguard Worker 619*9880d681SAndroid Build Coastguard Worker;; Type System 620*9880d681SAndroid Build Coastguard Worker%opaquety = type opaque 621*9880d681SAndroid Build Coastguard Workerdefine void @typesystem() { 622*9880d681SAndroid Build Coastguard Worker %p0 = bitcast i8* null to i32 (i32)* 623*9880d681SAndroid Build Coastguard Worker ; CHECK: %p0 = bitcast i8* null to i32 (i32)* 624*9880d681SAndroid Build Coastguard Worker %p1 = bitcast i8* null to void (i8*)* 625*9880d681SAndroid Build Coastguard Worker ; CHECK: %p1 = bitcast i8* null to void (i8*)* 626*9880d681SAndroid Build Coastguard Worker %p2 = bitcast i8* null to i32 (i8*, ...)* 627*9880d681SAndroid Build Coastguard Worker ; CHECK: %p2 = bitcast i8* null to i32 (i8*, ...)* 628*9880d681SAndroid Build Coastguard Worker %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)* 629*9880d681SAndroid Build Coastguard Worker ; CHECK: %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)* 630*9880d681SAndroid Build Coastguard Worker %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)* 631*9880d681SAndroid Build Coastguard Worker ; CHECK: %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)* 632*9880d681SAndroid Build Coastguard Worker %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)* 633*9880d681SAndroid Build Coastguard Worker ; CHECK: %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)* 634*9880d681SAndroid Build Coastguard Worker 635*9880d681SAndroid Build Coastguard Worker %t0 = alloca i1942652 636*9880d681SAndroid Build Coastguard Worker ; CHECK: %t0 = alloca i1942652 637*9880d681SAndroid Build Coastguard Worker %t1 = alloca half 638*9880d681SAndroid Build Coastguard Worker ; CHECK: %t1 = alloca half 639*9880d681SAndroid Build Coastguard Worker %t2 = alloca float 640*9880d681SAndroid Build Coastguard Worker ; CHECK: %t2 = alloca float 641*9880d681SAndroid Build Coastguard Worker %t3 = alloca double 642*9880d681SAndroid Build Coastguard Worker ; CHECK: %t3 = alloca double 643*9880d681SAndroid Build Coastguard Worker %t4 = alloca fp128 644*9880d681SAndroid Build Coastguard Worker ; CHECK: %t4 = alloca fp128 645*9880d681SAndroid Build Coastguard Worker %t5 = alloca x86_fp80 646*9880d681SAndroid Build Coastguard Worker ; CHECK: %t5 = alloca x86_fp80 647*9880d681SAndroid Build Coastguard Worker %t6 = alloca ppc_fp128 648*9880d681SAndroid Build Coastguard Worker ; CHECK: %t6 = alloca ppc_fp128 649*9880d681SAndroid Build Coastguard Worker %t7 = alloca x86_mmx 650*9880d681SAndroid Build Coastguard Worker ; CHECK: %t7 = alloca x86_mmx 651*9880d681SAndroid Build Coastguard Worker %t8 = alloca %opaquety* 652*9880d681SAndroid Build Coastguard Worker ; CHECK: %t8 = alloca %opaquety* 653*9880d681SAndroid Build Coastguard Worker 654*9880d681SAndroid Build Coastguard Worker ret void 655*9880d681SAndroid Build Coastguard Worker} 656*9880d681SAndroid Build Coastguard Worker 657*9880d681SAndroid Build Coastguard Worker;; Inline Assembler Expressions 658*9880d681SAndroid Build Coastguard Workerdefine void @inlineasm(i32 %arg) { 659*9880d681SAndroid Build Coastguard Worker call i32 asm "bswap $0", "=r,r"(i32 %arg) 660*9880d681SAndroid Build Coastguard Worker ; CHECK: call i32 asm "bswap $0", "=r,r"(i32 %arg) 661*9880d681SAndroid Build Coastguard Worker call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg) 662*9880d681SAndroid Build Coastguard Worker ; CHECK: call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg) 663*9880d681SAndroid Build Coastguard Worker ret void 664*9880d681SAndroid Build Coastguard Worker} 665*9880d681SAndroid Build Coastguard Worker 666*9880d681SAndroid Build Coastguard Worker;; Instructions 667*9880d681SAndroid Build Coastguard Worker 668*9880d681SAndroid Build Coastguard Worker; Instructions -- Terminators 669*9880d681SAndroid Build Coastguard Workerdefine void @instructions.terminators(i8 %val) { ; XXX: landingpad changed. 670*9880d681SAndroid Build Coastguard Worker; CHECK: define void @instructions.terminators(i8 %val) personality i32 ()* @personality_handler 671*9880d681SAndroid Build Coastguard Worker 672*9880d681SAndroid Build Coastguard Worker br i1 false, label %iftrue, label %iffalse 673*9880d681SAndroid Build Coastguard Worker ; CHECK: br i1 false, label %iftrue, label %iffalse 674*9880d681SAndroid Build Coastguard Worker br label %iftrue 675*9880d681SAndroid Build Coastguard Worker ; CHECK: br label %iftrue 676*9880d681SAndroid Build Coastguard Workeriftrue: 677*9880d681SAndroid Build Coastguard Worker ret void 678*9880d681SAndroid Build Coastguard Worker ; CHECK: ret void 679*9880d681SAndroid Build Coastguard Workeriffalse: 680*9880d681SAndroid Build Coastguard Worker 681*9880d681SAndroid Build Coastguard Worker switch i8 %val, label %defaultdest [ 682*9880d681SAndroid Build Coastguard Worker ; CHECK: switch i8 %val, label %defaultdest [ 683*9880d681SAndroid Build Coastguard Worker i8 0, label %defaultdest.0 684*9880d681SAndroid Build Coastguard Worker ; CHECK: i8 0, label %defaultdest.0 685*9880d681SAndroid Build Coastguard Worker i8 1, label %defaultdest.1 686*9880d681SAndroid Build Coastguard Worker ; CHECK: i8 1, label %defaultdest.1 687*9880d681SAndroid Build Coastguard Worker i8 2, label %defaultdest.2 688*9880d681SAndroid Build Coastguard Worker ; CHECK: i8 2, label %defaultdest.2 689*9880d681SAndroid Build Coastguard Worker ] 690*9880d681SAndroid Build Coastguard Worker ; CHECK: ] 691*9880d681SAndroid Build Coastguard Workerdefaultdest: 692*9880d681SAndroid Build Coastguard Worker ret void 693*9880d681SAndroid Build Coastguard Workerdefaultdest.0: 694*9880d681SAndroid Build Coastguard Worker ret void 695*9880d681SAndroid Build Coastguard Workerdefaultdest.1: 696*9880d681SAndroid Build Coastguard Worker ret void 697*9880d681SAndroid Build Coastguard Workerdefaultdest.2: 698*9880d681SAndroid Build Coastguard Worker 699*9880d681SAndroid Build Coastguard Worker indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2] 700*9880d681SAndroid Build Coastguard Worker ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2] 701*9880d681SAndroid Build Coastguard Worker indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2] 702*9880d681SAndroid Build Coastguard Worker ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2] 703*9880d681SAndroid Build Coastguard Worker 704*9880d681SAndroid Build Coastguard Worker invoke fastcc void @f.fastcc() 705*9880d681SAndroid Build Coastguard Worker ; CHECK: invoke fastcc void @f.fastcc() 706*9880d681SAndroid Build Coastguard Worker to label %defaultdest unwind label %exc 707*9880d681SAndroid Build Coastguard Worker ; CHECK: to label %defaultdest unwind label %exc 708*9880d681SAndroid Build Coastguard Workerexc: 709*9880d681SAndroid Build Coastguard Worker %cleanup = landingpad i32 personality i32()* @personality_handler cleanup 710*9880d681SAndroid Build Coastguard Worker 711*9880d681SAndroid Build Coastguard Worker resume i32 undef 712*9880d681SAndroid Build Coastguard Worker ; CHECK: resume i32 undef 713*9880d681SAndroid Build Coastguard Worker unreachable 714*9880d681SAndroid Build Coastguard Worker ; CHECK: unreachable 715*9880d681SAndroid Build Coastguard Worker 716*9880d681SAndroid Build Coastguard Worker ret void 717*9880d681SAndroid Build Coastguard Worker} 718*9880d681SAndroid Build Coastguard Worker 719*9880d681SAndroid Build Coastguard Worker; Instructions -- Binary Operations 720*9880d681SAndroid Build Coastguard Workerdefine void @instructions.binops(i8 %op1, i8 %op2) { 721*9880d681SAndroid Build Coastguard Worker ; nuw x nsw 722*9880d681SAndroid Build Coastguard Worker add i8 %op1, %op2 723*9880d681SAndroid Build Coastguard Worker ; CHECK: add i8 %op1, %op2 724*9880d681SAndroid Build Coastguard Worker add nuw i8 %op1, %op2 725*9880d681SAndroid Build Coastguard Worker ; CHECK: add nuw i8 %op1, %op2 726*9880d681SAndroid Build Coastguard Worker add nsw i8 %op1, %op2 727*9880d681SAndroid Build Coastguard Worker ; CHECK: add nsw i8 %op1, %op2 728*9880d681SAndroid Build Coastguard Worker add nuw nsw i8 %op1, %op2 729*9880d681SAndroid Build Coastguard Worker ; CHECK: add nuw nsw i8 %op1, %op2 730*9880d681SAndroid Build Coastguard Worker sub i8 %op1, %op2 731*9880d681SAndroid Build Coastguard Worker ; CHECK: sub i8 %op1, %op2 732*9880d681SAndroid Build Coastguard Worker sub nuw i8 %op1, %op2 733*9880d681SAndroid Build Coastguard Worker ; CHECK: sub nuw i8 %op1, %op2 734*9880d681SAndroid Build Coastguard Worker sub nsw i8 %op1, %op2 735*9880d681SAndroid Build Coastguard Worker ; CHECK: sub nsw i8 %op1, %op2 736*9880d681SAndroid Build Coastguard Worker sub nuw nsw i8 %op1, %op2 737*9880d681SAndroid Build Coastguard Worker ; CHECK: sub nuw nsw i8 %op1, %op2 738*9880d681SAndroid Build Coastguard Worker mul i8 %op1, %op2 739*9880d681SAndroid Build Coastguard Worker ; CHECK: mul i8 %op1, %op2 740*9880d681SAndroid Build Coastguard Worker mul nuw i8 %op1, %op2 741*9880d681SAndroid Build Coastguard Worker ; CHECK: mul nuw i8 %op1, %op2 742*9880d681SAndroid Build Coastguard Worker mul nsw i8 %op1, %op2 743*9880d681SAndroid Build Coastguard Worker ; CHECK: mul nsw i8 %op1, %op2 744*9880d681SAndroid Build Coastguard Worker mul nuw nsw i8 %op1, %op2 745*9880d681SAndroid Build Coastguard Worker ; CHECK: mul nuw nsw i8 %op1, %op2 746*9880d681SAndroid Build Coastguard Worker 747*9880d681SAndroid Build Coastguard Worker ; exact 748*9880d681SAndroid Build Coastguard Worker udiv i8 %op1, %op2 749*9880d681SAndroid Build Coastguard Worker ; CHECK: udiv i8 %op1, %op2 750*9880d681SAndroid Build Coastguard Worker udiv exact i8 %op1, %op2 751*9880d681SAndroid Build Coastguard Worker ; CHECK: udiv exact i8 %op1, %op2 752*9880d681SAndroid Build Coastguard Worker sdiv i8 %op1, %op2 753*9880d681SAndroid Build Coastguard Worker ; CHECK: sdiv i8 %op1, %op2 754*9880d681SAndroid Build Coastguard Worker sdiv exact i8 %op1, %op2 755*9880d681SAndroid Build Coastguard Worker ; CHECK: sdiv exact i8 %op1, %op2 756*9880d681SAndroid Build Coastguard Worker 757*9880d681SAndroid Build Coastguard Worker ; none 758*9880d681SAndroid Build Coastguard Worker urem i8 %op1, %op2 759*9880d681SAndroid Build Coastguard Worker ; CHECK: urem i8 %op1, %op2 760*9880d681SAndroid Build Coastguard Worker srem i8 %op1, %op2 761*9880d681SAndroid Build Coastguard Worker ; CHECK: srem i8 %op1, %op2 762*9880d681SAndroid Build Coastguard Worker 763*9880d681SAndroid Build Coastguard Worker ret void 764*9880d681SAndroid Build Coastguard Worker} 765*9880d681SAndroid Build Coastguard Worker 766*9880d681SAndroid Build Coastguard Worker; Instructions -- Bitwise Binary Operations 767*9880d681SAndroid Build Coastguard Workerdefine void @instructions.bitwise_binops(i8 %op1, i8 %op2) { 768*9880d681SAndroid Build Coastguard Worker ; nuw x nsw 769*9880d681SAndroid Build Coastguard Worker shl i8 %op1, %op2 770*9880d681SAndroid Build Coastguard Worker ; CHECK: shl i8 %op1, %op2 771*9880d681SAndroid Build Coastguard Worker shl nuw i8 %op1, %op2 772*9880d681SAndroid Build Coastguard Worker ; CHECK: shl nuw i8 %op1, %op2 773*9880d681SAndroid Build Coastguard Worker shl nsw i8 %op1, %op2 774*9880d681SAndroid Build Coastguard Worker ; CHECK: shl nsw i8 %op1, %op2 775*9880d681SAndroid Build Coastguard Worker shl nuw nsw i8 %op1, %op2 776*9880d681SAndroid Build Coastguard Worker ; CHECK: shl nuw nsw i8 %op1, %op2 777*9880d681SAndroid Build Coastguard Worker 778*9880d681SAndroid Build Coastguard Worker ; exact 779*9880d681SAndroid Build Coastguard Worker lshr i8 %op1, %op2 780*9880d681SAndroid Build Coastguard Worker ; CHECK: lshr i8 %op1, %op2 781*9880d681SAndroid Build Coastguard Worker lshr exact i8 %op1, %op2 782*9880d681SAndroid Build Coastguard Worker ; CHECK: lshr exact i8 %op1, %op2 783*9880d681SAndroid Build Coastguard Worker ashr i8 %op1, %op2 784*9880d681SAndroid Build Coastguard Worker ; CHECK: ashr i8 %op1, %op2 785*9880d681SAndroid Build Coastguard Worker ashr exact i8 %op1, %op2 786*9880d681SAndroid Build Coastguard Worker ; CHECK: ashr exact i8 %op1, %op2 787*9880d681SAndroid Build Coastguard Worker 788*9880d681SAndroid Build Coastguard Worker ; none 789*9880d681SAndroid Build Coastguard Worker and i8 %op1, %op2 790*9880d681SAndroid Build Coastguard Worker ; CHECK: and i8 %op1, %op2 791*9880d681SAndroid Build Coastguard Worker or i8 %op1, %op2 792*9880d681SAndroid Build Coastguard Worker ; CHECK: or i8 %op1, %op2 793*9880d681SAndroid Build Coastguard Worker xor i8 %op1, %op2 794*9880d681SAndroid Build Coastguard Worker ; CHECK: xor i8 %op1, %op2 795*9880d681SAndroid Build Coastguard Worker 796*9880d681SAndroid Build Coastguard Worker ret void 797*9880d681SAndroid Build Coastguard Worker} 798*9880d681SAndroid Build Coastguard Worker 799*9880d681SAndroid Build Coastguard Worker; Instructions -- Vector Operations 800*9880d681SAndroid Build Coastguard Workerdefine void @instructions.vectorops(<4 x float> %vec, <4 x float> %vec2) { 801*9880d681SAndroid Build Coastguard Worker extractelement <4 x float> %vec, i8 0 802*9880d681SAndroid Build Coastguard Worker ; CHECK: extractelement <4 x float> %vec, i8 0 803*9880d681SAndroid Build Coastguard Worker insertelement <4 x float> %vec, float 3.500000e+00, i8 0 804*9880d681SAndroid Build Coastguard Worker ; CHECK: insertelement <4 x float> %vec, float 3.500000e+00, i8 0 805*9880d681SAndroid Build Coastguard Worker shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer 806*9880d681SAndroid Build Coastguard Worker ; CHECK: shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer 807*9880d681SAndroid Build Coastguard Worker 808*9880d681SAndroid Build Coastguard Worker ret void 809*9880d681SAndroid Build Coastguard Worker} 810*9880d681SAndroid Build Coastguard Worker 811*9880d681SAndroid Build Coastguard Worker; Instructions -- Aggregate Operations 812*9880d681SAndroid Build Coastguard Workerdefine void @instructions.aggregateops({ i8, i32 } %up, <{ i8, i32 }> %p, 813*9880d681SAndroid Build Coastguard Worker [3 x i8] %arr, { i8, { i32 }} %n, 814*9880d681SAndroid Build Coastguard Worker <2 x i8*> %pvec, <2 x i64> %offsets) { 815*9880d681SAndroid Build Coastguard Worker extractvalue { i8, i32 } %up, 0 816*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue { i8, i32 } %up, 0 817*9880d681SAndroid Build Coastguard Worker extractvalue <{ i8, i32 }> %p, 1 818*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue <{ i8, i32 }> %p, 1 819*9880d681SAndroid Build Coastguard Worker extractvalue [3 x i8] %arr, 2 820*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue [3 x i8] %arr, 2 821*9880d681SAndroid Build Coastguard Worker extractvalue { i8, { i32 } } %n, 1, 0 822*9880d681SAndroid Build Coastguard Worker ; CHECK: extractvalue { i8, { i32 } } %n, 1, 0 823*9880d681SAndroid Build Coastguard Worker 824*9880d681SAndroid Build Coastguard Worker insertvalue { i8, i32 } %up, i8 1, 0 825*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue { i8, i32 } %up, i8 1, 0 826*9880d681SAndroid Build Coastguard Worker insertvalue <{ i8, i32 }> %p, i32 2, 1 827*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue <{ i8, i32 }> %p, i32 2, 1 828*9880d681SAndroid Build Coastguard Worker insertvalue [3 x i8] %arr, i8 0, 0 829*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue [3 x i8] %arr, i8 0, 0 830*9880d681SAndroid Build Coastguard Worker insertvalue { i8, { i32 } } %n, i32 0, 1, 0 831*9880d681SAndroid Build Coastguard Worker ; CHECK: insertvalue { i8, { i32 } } %n, i32 0, 1, 0 832*9880d681SAndroid Build Coastguard Worker 833*9880d681SAndroid Build Coastguard Worker %up.ptr = alloca { i8, i32 } 834*9880d681SAndroid Build Coastguard Worker %p.ptr = alloca <{ i8, i32 }> 835*9880d681SAndroid Build Coastguard Worker %arr.ptr = alloca [3 x i8] 836*9880d681SAndroid Build Coastguard Worker %n.ptr = alloca { i8, { i32 } } 837*9880d681SAndroid Build Coastguard Worker 838*9880d681SAndroid Build Coastguard Worker ; XXX: The parser spits out the load type here. 839*9880d681SAndroid Build Coastguard Worker getelementptr { i8, i32 }* %up.ptr, i8 0 840*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr { i8, i32 }, { i8, i32 }* %up.ptr, i8 0 841*9880d681SAndroid Build Coastguard Worker getelementptr <{ i8, i32 }>* %p.ptr, i8 1 842*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr <{ i8, i32 }>, <{ i8, i32 }>* %p.ptr, i8 1 843*9880d681SAndroid Build Coastguard Worker getelementptr [3 x i8]* %arr.ptr, i8 2 844*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr [3 x i8], [3 x i8]* %arr.ptr, i8 2 845*9880d681SAndroid Build Coastguard Worker getelementptr { i8, { i32 } }* %n.ptr, i32 0, i32 1 846*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 0, i32 1 847*9880d681SAndroid Build Coastguard Worker getelementptr inbounds { i8, { i32 } }* %n.ptr, i32 1, i32 0 848*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr inbounds { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 1, i32 0 849*9880d681SAndroid Build Coastguard Worker getelementptr <2 x i8*> %pvec, <2 x i64> %offsets 850*9880d681SAndroid Build Coastguard Worker ; CHECK: getelementptr i8, <2 x i8*> %pvec, <2 x i64> %offsets 851*9880d681SAndroid Build Coastguard Worker 852*9880d681SAndroid Build Coastguard Worker ret void 853*9880d681SAndroid Build Coastguard Worker} 854*9880d681SAndroid Build Coastguard Worker 855*9880d681SAndroid Build Coastguard Worker; Instructions -- Memory Access and Addressing Operations 856*9880d681SAndroid Build Coastguard Worker!7 = !{i32 1} 857*9880d681SAndroid Build Coastguard Worker!8 = !{} 858*9880d681SAndroid Build Coastguard Worker!9 = !{i64 4} 859*9880d681SAndroid Build Coastguard Workerdefine void @instructions.memops(i32** %base) { 860*9880d681SAndroid Build Coastguard Worker alloca i32, i8 4, align 4 861*9880d681SAndroid Build Coastguard Worker ; CHECK: alloca i32, i8 4, align 4 862*9880d681SAndroid Build Coastguard Worker alloca inalloca i32, i8 4, align 4 863*9880d681SAndroid Build Coastguard Worker ; CHECK: alloca inalloca i32, i8 4, align 4 864*9880d681SAndroid Build Coastguard Worker 865*9880d681SAndroid Build Coastguard Worker load i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9 866*9880d681SAndroid Build Coastguard Worker ; CHECK: load i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9 867*9880d681SAndroid Build Coastguard Worker load volatile i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9 868*9880d681SAndroid Build Coastguard Worker ; CHECK: load volatile i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9 869*9880d681SAndroid Build Coastguard Worker 870*9880d681SAndroid Build Coastguard Worker store i32* null, i32** %base, align 4, !nontemporal !8 871*9880d681SAndroid Build Coastguard Worker ; CHECK: store i32* null, i32** %base, align 4, !nontemporal !8 872*9880d681SAndroid Build Coastguard Worker store volatile i32* null, i32** %base, align 4, !nontemporal !8 873*9880d681SAndroid Build Coastguard Worker ; CHECK: store volatile i32* null, i32** %base, align 4, !nontemporal !8 874*9880d681SAndroid Build Coastguard Worker 875*9880d681SAndroid Build Coastguard Worker ret void 876*9880d681SAndroid Build Coastguard Worker} 877*9880d681SAndroid Build Coastguard Worker 878*9880d681SAndroid Build Coastguard Worker; Instructions -- Conversion Operations 879*9880d681SAndroid Build Coastguard Workerdefine void @instructions.conversions() { 880*9880d681SAndroid Build Coastguard Worker trunc i32 -1 to i1 881*9880d681SAndroid Build Coastguard Worker ; CHECK: trunc i32 -1 to i1 882*9880d681SAndroid Build Coastguard Worker zext i32 -1 to i64 883*9880d681SAndroid Build Coastguard Worker ; CHECK: zext i32 -1 to i64 884*9880d681SAndroid Build Coastguard Worker sext i32 -1 to i64 885*9880d681SAndroid Build Coastguard Worker ; CHECK: sext i32 -1 to i64 886*9880d681SAndroid Build Coastguard Worker fptrunc float undef to half 887*9880d681SAndroid Build Coastguard Worker ; CHECK: fptrunc float undef to half 888*9880d681SAndroid Build Coastguard Worker fpext half undef to float 889*9880d681SAndroid Build Coastguard Worker ; CHECK: fpext half undef to float 890*9880d681SAndroid Build Coastguard Worker fptoui float undef to i32 891*9880d681SAndroid Build Coastguard Worker ; CHECK: fptoui float undef to i32 892*9880d681SAndroid Build Coastguard Worker fptosi float undef to i32 893*9880d681SAndroid Build Coastguard Worker ; CHECK: fptosi float undef to i32 894*9880d681SAndroid Build Coastguard Worker uitofp i32 1 to float 895*9880d681SAndroid Build Coastguard Worker ; CHECK: uitofp i32 1 to float 896*9880d681SAndroid Build Coastguard Worker sitofp i32 -1 to float 897*9880d681SAndroid Build Coastguard Worker ; CHECK: sitofp i32 -1 to float 898*9880d681SAndroid Build Coastguard Worker ptrtoint i8* null to i64 899*9880d681SAndroid Build Coastguard Worker ; CHECK: ptrtoint i8* null to i64 900*9880d681SAndroid Build Coastguard Worker inttoptr i64 0 to i8* 901*9880d681SAndroid Build Coastguard Worker ; CHECK: inttoptr i64 0 to i8* 902*9880d681SAndroid Build Coastguard Worker bitcast i32 0 to i32 903*9880d681SAndroid Build Coastguard Worker ; CHECK: bitcast i32 0 to i32 904*9880d681SAndroid Build Coastguard Worker addrspacecast i32* null to i32 addrspace(1)* 905*9880d681SAndroid Build Coastguard Worker ; CHECK: addrspacecast i32* null to i32 addrspace(1)* 906*9880d681SAndroid Build Coastguard Worker 907*9880d681SAndroid Build Coastguard Worker ret void 908*9880d681SAndroid Build Coastguard Worker} 909*9880d681SAndroid Build Coastguard Worker 910*9880d681SAndroid Build Coastguard Worker; Instructions -- Other Operations 911*9880d681SAndroid Build Coastguard Workerdefine void @instructions.other(i32 %op1, i32 %op2, half %fop1, half %fop2) { 912*9880d681SAndroid Build Coastguard Workerentry: 913*9880d681SAndroid Build Coastguard Worker icmp eq i32 %op1, %op2 914*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp eq i32 %op1, %op2 915*9880d681SAndroid Build Coastguard Worker icmp ne i32 %op1, %op2 916*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ne i32 %op1, %op2 917*9880d681SAndroid Build Coastguard Worker icmp ugt i32 %op1, %op2 918*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ugt i32 %op1, %op2 919*9880d681SAndroid Build Coastguard Worker icmp uge i32 %op1, %op2 920*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp uge i32 %op1, %op2 921*9880d681SAndroid Build Coastguard Worker icmp ult i32 %op1, %op2 922*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ult i32 %op1, %op2 923*9880d681SAndroid Build Coastguard Worker icmp ule i32 %op1, %op2 924*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp ule i32 %op1, %op2 925*9880d681SAndroid Build Coastguard Worker icmp sgt i32 %op1, %op2 926*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp sgt i32 %op1, %op2 927*9880d681SAndroid Build Coastguard Worker icmp sge i32 %op1, %op2 928*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp sge i32 %op1, %op2 929*9880d681SAndroid Build Coastguard Worker icmp slt i32 %op1, %op2 930*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp slt i32 %op1, %op2 931*9880d681SAndroid Build Coastguard Worker icmp sle i32 %op1, %op2 932*9880d681SAndroid Build Coastguard Worker ; CHECK: icmp sle i32 %op1, %op2 933*9880d681SAndroid Build Coastguard Worker 934*9880d681SAndroid Build Coastguard Worker fcmp false half %fop1, %fop2 935*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp false half %fop1, %fop2 936*9880d681SAndroid Build Coastguard Worker fcmp oeq half %fop1, %fop2 937*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp oeq half %fop1, %fop2 938*9880d681SAndroid Build Coastguard Worker fcmp ogt half %fop1, %fop2 939*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ogt half %fop1, %fop2 940*9880d681SAndroid Build Coastguard Worker fcmp oge half %fop1, %fop2 941*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp oge half %fop1, %fop2 942*9880d681SAndroid Build Coastguard Worker fcmp olt half %fop1, %fop2 943*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp olt half %fop1, %fop2 944*9880d681SAndroid Build Coastguard Worker fcmp ole half %fop1, %fop2 945*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ole half %fop1, %fop2 946*9880d681SAndroid Build Coastguard Worker fcmp one half %fop1, %fop2 947*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp one half %fop1, %fop2 948*9880d681SAndroid Build Coastguard Worker fcmp ord half %fop1, %fop2 949*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ord half %fop1, %fop2 950*9880d681SAndroid Build Coastguard Worker fcmp ueq half %fop1, %fop2 951*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ueq half %fop1, %fop2 952*9880d681SAndroid Build Coastguard Worker fcmp ugt half %fop1, %fop2 953*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ugt half %fop1, %fop2 954*9880d681SAndroid Build Coastguard Worker fcmp uge half %fop1, %fop2 955*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp uge half %fop1, %fop2 956*9880d681SAndroid Build Coastguard Worker fcmp ult half %fop1, %fop2 957*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ult half %fop1, %fop2 958*9880d681SAndroid Build Coastguard Worker fcmp ule half %fop1, %fop2 959*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp ule half %fop1, %fop2 960*9880d681SAndroid Build Coastguard Worker fcmp une half %fop1, %fop2 961*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp une half %fop1, %fop2 962*9880d681SAndroid Build Coastguard Worker fcmp uno half %fop1, %fop2 963*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp uno half %fop1, %fop2 964*9880d681SAndroid Build Coastguard Worker fcmp true half %fop1, %fop2 965*9880d681SAndroid Build Coastguard Worker ; CHECK: fcmp true half %fop1, %fop2 966*9880d681SAndroid Build Coastguard Worker 967*9880d681SAndroid Build Coastguard Worker br label %exit 968*9880d681SAndroid Build Coastguard WorkerL1: 969*9880d681SAndroid Build Coastguard Worker %v1 = add i32 %op1, %op2 970*9880d681SAndroid Build Coastguard Worker br label %exit 971*9880d681SAndroid Build Coastguard WorkerL2: 972*9880d681SAndroid Build Coastguard Worker %v2 = add i32 %op1, %op2 973*9880d681SAndroid Build Coastguard Worker br label %exit 974*9880d681SAndroid Build Coastguard Workerexit: 975*9880d681SAndroid Build Coastguard Worker phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ] 976*9880d681SAndroid Build Coastguard Worker ; CHECK: phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ] 977*9880d681SAndroid Build Coastguard Worker 978*9880d681SAndroid Build Coastguard Worker select i1 true, i32 0, i32 1 979*9880d681SAndroid Build Coastguard Worker ; CHECK: select i1 true, i32 0, i32 1 980*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> 981*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> 982*9880d681SAndroid Build Coastguard Worker 983*9880d681SAndroid Build Coastguard Worker call void @f.nobuiltin() builtin 984*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @f.nobuiltin() #33 985*9880d681SAndroid Build Coastguard Worker 986*9880d681SAndroid Build Coastguard Worker call fastcc noalias i32* @f.noalias() noinline 987*9880d681SAndroid Build Coastguard Worker ; CHECK: call fastcc noalias i32* @f.noalias() #11 988*9880d681SAndroid Build Coastguard Worker tail call ghccc nonnull i32* @f.nonnull() minsize 989*9880d681SAndroid Build Coastguard Worker ; CHECK: tail call ghccc nonnull i32* @f.nonnull() #6 990*9880d681SAndroid Build Coastguard Worker 991*9880d681SAndroid Build Coastguard Worker ret void 992*9880d681SAndroid Build Coastguard Worker} 993*9880d681SAndroid Build Coastguard Worker 994*9880d681SAndroid Build Coastguard Workerdefine void @instructions.call_musttail(i8* inalloca %val) { 995*9880d681SAndroid Build Coastguard Worker musttail call void @f.param.inalloca(i8* inalloca %val) 996*9880d681SAndroid Build Coastguard Worker ; CHECK: musttail call void @f.param.inalloca(i8* inalloca %val) 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 Workerdeclare void @llvm.donothing() nounwind readnone 1002*9880d681SAndroid Build Coastguard Worker 1003*9880d681SAndroid Build Coastguard Workerdeclare i32 @personality_handler() 1004*9880d681SAndroid Build Coastguard Worker 1005*9880d681SAndroid Build Coastguard Workerdefine void @instructions.landingpad() { 1006*9880d681SAndroid Build Coastguard Worker; CHECK: define void @instructions.landingpad() personality i32 ()* @personality_handler 1007*9880d681SAndroid Build Coastguard Worker 1008*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch1 1009*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch2 1010*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch3 1011*9880d681SAndroid Build Coastguard Worker invoke void @llvm.donothing() to label %proceed unwind label %catch4 1012*9880d681SAndroid Build Coastguard Worker 1013*9880d681SAndroid Build Coastguard Workercatch1: 1014*9880d681SAndroid Build Coastguard Worker landingpad i32 1015*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1016*9880d681SAndroid Build Coastguard Worker personality i32()* @personality_handler 1017*9880d681SAndroid Build Coastguard Worker cleanup 1018*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanup 1019*9880d681SAndroid Build Coastguard Worker br label %proceed 1020*9880d681SAndroid Build Coastguard Worker 1021*9880d681SAndroid Build Coastguard Workercatch2: 1022*9880d681SAndroid Build Coastguard Worker landingpad i32 1023*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1024*9880d681SAndroid Build Coastguard Worker personality i32()* @personality_handler 1025*9880d681SAndroid Build Coastguard Worker cleanup 1026*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanup 1027*9880d681SAndroid Build Coastguard Worker catch i32* null 1028*9880d681SAndroid Build Coastguard Worker ; CHECK: catch i32* null 1029*9880d681SAndroid Build Coastguard Worker br label %proceed 1030*9880d681SAndroid Build Coastguard Worker 1031*9880d681SAndroid Build Coastguard Workercatch3: 1032*9880d681SAndroid Build Coastguard Worker landingpad i32 1033*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1034*9880d681SAndroid Build Coastguard Worker personality i32()* @personality_handler 1035*9880d681SAndroid Build Coastguard Worker cleanup 1036*9880d681SAndroid Build Coastguard Worker ; CHECK: cleanup 1037*9880d681SAndroid Build Coastguard Worker catch i32* null 1038*9880d681SAndroid Build Coastguard Worker ; CHECK: catch i32* null 1039*9880d681SAndroid Build Coastguard Worker catch i32* null 1040*9880d681SAndroid Build Coastguard Worker ; CHECK: catch i32* null 1041*9880d681SAndroid Build Coastguard Worker br label %proceed 1042*9880d681SAndroid Build Coastguard Worker 1043*9880d681SAndroid Build Coastguard Workercatch4: 1044*9880d681SAndroid Build Coastguard Worker landingpad i32 1045*9880d681SAndroid Build Coastguard Worker ; CHECK: landingpad i32 1046*9880d681SAndroid Build Coastguard Worker personality i32()* @personality_handler 1047*9880d681SAndroid Build Coastguard Worker filter [2 x i32] zeroinitializer 1048*9880d681SAndroid Build Coastguard Worker ; CHECK: filter [2 x i32] zeroinitializer 1049*9880d681SAndroid Build Coastguard Worker br label %proceed 1050*9880d681SAndroid Build Coastguard Worker 1051*9880d681SAndroid Build Coastguard Workerproceed: 1052*9880d681SAndroid Build Coastguard Worker ret void 1053*9880d681SAndroid Build Coastguard Worker} 1054*9880d681SAndroid Build Coastguard Worker 1055*9880d681SAndroid Build Coastguard Worker;; Intrinsic Functions 1056*9880d681SAndroid Build Coastguard Worker 1057*9880d681SAndroid Build Coastguard Worker; Intrinsic Functions -- Variable Argument Handling 1058*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_start(i8*) 1059*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_copy(i8*, i8*) 1060*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_end(i8*) 1061*9880d681SAndroid Build Coastguard Workerdefine void @instructions.va_arg(i8* %v, ...) { 1062*9880d681SAndroid Build Coastguard Worker %ap = alloca i8* 1063*9880d681SAndroid Build Coastguard Worker %ap2 = bitcast i8** %ap to i8* 1064*9880d681SAndroid Build Coastguard Worker 1065*9880d681SAndroid Build Coastguard Worker call void @llvm.va_start(i8* %ap2) 1066*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.va_start(i8* %ap2) 1067*9880d681SAndroid Build Coastguard Worker 1068*9880d681SAndroid Build Coastguard Worker va_arg i8* %ap2, i32 1069*9880d681SAndroid Build Coastguard Worker ; CHECK: va_arg i8* %ap2, i32 1070*9880d681SAndroid Build Coastguard Worker 1071*9880d681SAndroid Build Coastguard Worker call void @llvm.va_copy(i8* %v, i8* %ap2) 1072*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.va_copy(i8* %v, i8* %ap2) 1073*9880d681SAndroid Build Coastguard Worker 1074*9880d681SAndroid Build Coastguard Worker call void @llvm.va_end(i8* %ap2) 1075*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.va_end(i8* %ap2) 1076*9880d681SAndroid Build Coastguard Worker 1077*9880d681SAndroid Build Coastguard Worker ret void 1078*9880d681SAndroid Build Coastguard Worker} 1079*9880d681SAndroid Build Coastguard Worker 1080*9880d681SAndroid Build Coastguard Worker; Intrinsic Functions -- Accurate Garbage Collection 1081*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.gcroot(i8**, i8*) 1082*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.gcread(i8*, i8**) 1083*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.gcwrite(i8*, i8*, i8**) 1084*9880d681SAndroid Build Coastguard Workerdefine void @intrinsics.gc() gc "shadow-stack" { 1085*9880d681SAndroid Build Coastguard Worker %ptrloc = alloca i8* 1086*9880d681SAndroid Build Coastguard Worker call void @llvm.gcroot(i8** %ptrloc, i8* null) 1087*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.gcroot(i8** %ptrloc, i8* null) 1088*9880d681SAndroid Build Coastguard Worker 1089*9880d681SAndroid Build Coastguard Worker call i8* @llvm.gcread(i8* null, i8** %ptrloc) 1090*9880d681SAndroid Build Coastguard Worker ; CHECK: call i8* @llvm.gcread(i8* null, i8** %ptrloc) 1091*9880d681SAndroid Build Coastguard Worker 1092*9880d681SAndroid Build Coastguard Worker %ref = alloca i8 1093*9880d681SAndroid Build Coastguard Worker call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc) 1094*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc) 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; Intrinsic Functions -- Code Generation 1100*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.returnaddress(i32) 1101*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.frameaddress(i32) 1102*9880d681SAndroid Build Coastguard Workerdeclare i32 @llvm.read_register.i32(metadata) 1103*9880d681SAndroid Build Coastguard Workerdeclare i64 @llvm.read_register.i64(metadata) 1104*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.write_register.i32(metadata, i32) 1105*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.write_register.i64(metadata, i64) 1106*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.stacksave() 1107*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.stackrestore(i8*) 1108*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.prefetch(i8*, i32, i32, i32) 1109*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.pcmarker(i32) 1110*9880d681SAndroid Build Coastguard Workerdeclare i64 @llvm.readcyclecounter() 1111*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.clear_cache(i8*, i8*) 1112*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.instrprof_increment(i8*, i64, i32, i32) 1113*9880d681SAndroid Build Coastguard Worker 1114*9880d681SAndroid Build Coastguard Worker!10 = !{!"rax"} 1115*9880d681SAndroid Build Coastguard Workerdefine void @intrinsics.codegen() { 1116*9880d681SAndroid Build Coastguard Worker call i8* @llvm.returnaddress(i32 1) 1117*9880d681SAndroid Build Coastguard Worker ; CHECK: call i8* @llvm.returnaddress(i32 1) 1118*9880d681SAndroid Build Coastguard Worker call i8* @llvm.frameaddress(i32 1) 1119*9880d681SAndroid Build Coastguard Worker ; CHECK: call i8* @llvm.frameaddress(i32 1) 1120*9880d681SAndroid Build Coastguard Worker 1121*9880d681SAndroid Build Coastguard Worker call i32 @llvm.read_register.i32(metadata !10) 1122*9880d681SAndroid Build Coastguard Worker ; CHECK: call i32 @llvm.read_register.i32(metadata !10) 1123*9880d681SAndroid Build Coastguard Worker call i64 @llvm.read_register.i64(metadata !10) 1124*9880d681SAndroid Build Coastguard Worker ; CHECK: call i64 @llvm.read_register.i64(metadata !10) 1125*9880d681SAndroid Build Coastguard Worker call void @llvm.write_register.i32(metadata !10, i32 0) 1126*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.write_register.i32(metadata !10, i32 0) 1127*9880d681SAndroid Build Coastguard Worker call void @llvm.write_register.i64(metadata !10, i64 0) 1128*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.write_register.i64(metadata !10, i64 0) 1129*9880d681SAndroid Build Coastguard Worker 1130*9880d681SAndroid Build Coastguard Worker %stack = call i8* @llvm.stacksave() 1131*9880d681SAndroid Build Coastguard Worker ; CHECK: %stack = call i8* @llvm.stacksave() 1132*9880d681SAndroid Build Coastguard Worker call void @llvm.stackrestore(i8* %stack) 1133*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.stackrestore(i8* %stack) 1134*9880d681SAndroid Build Coastguard Worker 1135*9880d681SAndroid Build Coastguard Worker call void @llvm.prefetch(i8* %stack, i32 0, i32 3, i32 0) 1136*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.prefetch(i8* %stack, i32 0, i32 3, i32 0) 1137*9880d681SAndroid Build Coastguard Worker 1138*9880d681SAndroid Build Coastguard Worker call void @llvm.pcmarker(i32 1) 1139*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.pcmarker(i32 1) 1140*9880d681SAndroid Build Coastguard Worker 1141*9880d681SAndroid Build Coastguard Worker call i64 @llvm.readcyclecounter() 1142*9880d681SAndroid Build Coastguard Worker ; CHECK: call i64 @llvm.readcyclecounter() 1143*9880d681SAndroid Build Coastguard Worker 1144*9880d681SAndroid Build Coastguard Worker call void @llvm.clear_cache(i8* null, i8* null) 1145*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.clear_cache(i8* null, i8* null) 1146*9880d681SAndroid Build Coastguard Worker 1147*9880d681SAndroid Build Coastguard Worker call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0) 1148*9880d681SAndroid Build Coastguard Worker ; CHECK: call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0) 1149*9880d681SAndroid Build Coastguard Worker 1150*9880d681SAndroid Build Coastguard Worker ret void 1151*9880d681SAndroid Build Coastguard Worker} 1152*9880d681SAndroid Build Coastguard Worker 1153*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #0 = { alignstack=4 } 1154*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #1 = { alignstack=8 } 1155*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #2 = { alwaysinline } 1156*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #3 = { cold } 1157*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #4 = { inlinehint } 1158*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #5 = { jumptable } 1159*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #6 = { minsize } 1160*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #7 = { naked } 1161*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #8 = { nobuiltin } 1162*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #9 = { noduplicate } 1163*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #10 = { noimplicitfloat } 1164*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #11 = { noinline } 1165*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #12 = { nonlazybind } 1166*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #13 = { noredzone } 1167*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #14 = { noreturn } 1168*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #15 = { nounwind } 1169*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #16 = { noinline optnone } 1170*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #17 = { optsize } 1171*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #18 = { readnone } 1172*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #19 = { readonly } 1173*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #20 = { returns_twice } 1174*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #21 = { sanitize_address } 1175*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #22 = { sanitize_memory } 1176*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #23 = { sanitize_thread } 1177*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #24 = { ssp } 1178*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #25 = { sspreq } 1179*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #26 = { sspstrong } 1180*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #27 = { uwtable } 1181*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #28 = { "cpu"="cortex-a8" } 1182*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #29 = { nounwind readnone } 1183*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #30 = { argmemonly nounwind readonly } 1184*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #31 = { argmemonly nounwind } 1185*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #32 = { nounwind readonly } 1186*9880d681SAndroid Build Coastguard Worker; CHECK: attributes #33 = { builtin } 1187*9880d681SAndroid Build Coastguard Worker 1188*9880d681SAndroid Build Coastguard Worker;; Metadata 1189*9880d681SAndroid Build Coastguard Worker 1190*9880d681SAndroid Build Coastguard Worker; Metadata -- Module flags 1191*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!0, !1, !2, !4, !5, !6} 1192*9880d681SAndroid Build Coastguard Worker; CHECK: !llvm.module.flags = !{!0, !1, !2, !4, !5, !6} 1193*9880d681SAndroid Build Coastguard Worker 1194*9880d681SAndroid Build Coastguard Worker!0 = !{i32 1, !"mod1", i32 0} 1195*9880d681SAndroid Build Coastguard Worker; CHECK: !0 = !{i32 1, !"mod1", i32 0} 1196*9880d681SAndroid Build Coastguard Worker!1 = !{i32 2, !"mod2", i32 0} 1197*9880d681SAndroid Build Coastguard Worker; CHECK: !1 = !{i32 2, !"mod2", i32 0} 1198*9880d681SAndroid Build Coastguard Worker!2 = !{i32 3, !"mod3", !3} 1199*9880d681SAndroid Build Coastguard Worker; CHECK: !2 = !{i32 3, !"mod3", !3} 1200*9880d681SAndroid Build Coastguard Worker!3 = !{!"mod6", !0} 1201*9880d681SAndroid Build Coastguard Worker; CHECK: !3 = !{!"mod6", !0} 1202*9880d681SAndroid Build Coastguard Worker!4 = !{i32 4, !"mod4", i32 0} 1203*9880d681SAndroid Build Coastguard Worker; CHECK: !4 = !{i32 4, !"mod4", i32 0} 1204*9880d681SAndroid Build Coastguard Worker!5 = !{i32 5, !"mod5", !0} 1205*9880d681SAndroid Build Coastguard Worker; CHECK: !5 = !{i32 5, !"mod5", !0} 1206*9880d681SAndroid Build Coastguard Worker!6 = !{i32 6, !"mod6", !0} 1207*9880d681SAndroid Build Coastguard Worker; CHECK: !6 = !{i32 6, !"mod6", !0} 1208