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