Index: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp =================================================================== --- lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp +++ lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp @@ -880,6 +880,89 @@ } } +static void emitRuntimeMetadataForKernelArg(const DataLayout &DL, + std::unique_ptr &OutStreamer, Type *T, + RuntimeMD::KernelArg::Kind Kind, + StringRef TypeName = "", StringRef BaseTypeName = "", + StringRef ArgName = "", StringRef TypeQual = "", StringRef AccQual = "") { + // Emit KeyArgBegin. + OutStreamer->EmitIntValue(RuntimeMD::KeyArgBegin, 1); + + // Emit KeyArgSize and KeyArgAlign. + emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgSize, + DL.getTypeAllocSize(T), 4); + emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgAlign, + DL.getABITypeAlignment(T), 4); + + // Emit KeyArgTypeName. + if (!TypeName.empty()) + emitRuntimeMDStringValue(*OutStreamer, RuntimeMD::KeyArgTypeName, TypeName); + + // Emit KeyArgName. + if (!ArgName.empty()) + emitRuntimeMDStringValue(*OutStreamer, RuntimeMD::KeyArgName, ArgName); + + // Emit KeyArgIsVolatile, KeyArgIsRestrict, KeyArgIsConst and KeyArgIsPipe. + SmallVector SplitQ; + TypeQual.split(SplitQ, " ", -1, false /* Drop empty entry */); + + for (StringRef KeyName : SplitQ) { + auto Key = StringSwitch(KeyName) + .Case("volatile", RuntimeMD::KeyArgIsVolatile) + .Case("restrict", RuntimeMD::KeyArgIsRestrict) + .Case("const", RuntimeMD::KeyArgIsConst) + .Case("pipe", RuntimeMD::KeyArgIsPipe) + .Default(RuntimeMD::KeyNull); + OutStreamer->EmitIntValue(Key, 1); + } + + // Emit KeyArgKind. + emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgKind, Kind, 1); + + // Emit KeyArgValueType. + emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgValueType, + getRuntimeMDValueType(T, BaseTypeName), 2); + + // Emit KeyArgAccQual. + if (!AccQual.empty()) { + auto AQ = StringSwitch(AccQual) + .Case("read_only", RuntimeMD::KernelArg::ReadOnly) + .Case("write_only", RuntimeMD::KernelArg::WriteOnly) + .Case("read_write", RuntimeMD::KernelArg::ReadWrite) + .Default(RuntimeMD::KernelArg::None); + emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgAccQual, AQ, 1); + } + + // Emit KeyArgAddrQual. + if (auto *PT = dyn_cast(T)) { + RuntimeMD::KernelArg::AddressSpaceQualifer Addr; + switch(PT->getAddressSpace()) { + case 1: + Addr = RuntimeMD::KernelArg::Global; + break; + case 2: + Addr = RuntimeMD::KernelArg::Constant; + break; + case 3: + Addr = RuntimeMD::KernelArg::Local; + break; + case 4: + Addr = RuntimeMD::KernelArg::Generic; + break; + case 5: + Addr = RuntimeMD::KernelArg::Region; + break; + default: + Addr = RuntimeMD::KernelArg::Private; + break; + } + emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgAddrQual, Addr, 1); + } + + // Emit KeyArgEnd + OutStreamer->EmitIntValue(RuntimeMD::KeyArgEnd, 1); +} + void AMDGPUAsmPrinter::emitRuntimeMetadata(const Function &F) { if (!F.getMetadata("kernel_arg_type")) return; @@ -890,50 +973,25 @@ OutStreamer->EmitIntValue(RuntimeMD::KeyKernelBegin, 1); emitRuntimeMDStringValue(*OutStreamer, RuntimeMD::KeyKernelName, F.getName()); + const DataLayout &DL = F.getParent()->getDataLayout(); for (auto &Arg : F.args()) { - // Emit KeyArgBegin. unsigned I = Arg.getArgNo(); - OutStreamer->EmitIntValue(RuntimeMD::KeyArgBegin, 1); - - // Emit KeyArgSize and KeyArgAlign. Type *T = Arg.getType(); - const DataLayout &DL = F.getParent()->getDataLayout(); - emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgSize, - DL.getTypeAllocSize(T), 4); - emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgAlign, - DL.getABITypeAlignment(T), 4); - - // Emit KeyArgTypeName. auto TypeName = dyn_cast(F.getMetadata( - "kernel_arg_type")->getOperand(I))->getString(); - emitRuntimeMDStringValue(*OutStreamer, RuntimeMD::KeyArgTypeName, TypeName); - - // Emit KeyArgName. - if (auto ArgNameMD = F.getMetadata("kernel_arg_name")) { - auto ArgName = cast(ArgNameMD->getOperand(I))->getString(); - emitRuntimeMDStringValue(*OutStreamer, RuntimeMD::KeyArgName, ArgName); - } - - // Emit KeyArgIsVolatile, KeyArgIsRestrict, KeyArgIsConst and KeyArgIsPipe. + "kernel_arg_type")->getOperand(I))->getString(); + auto BaseTypeName = cast(F.getMetadata( + "kernel_arg_base_type")->getOperand(I))->getString(); + StringRef ArgName; + if (auto ArgNameMD = F.getMetadata("kernel_arg_name")) + ArgName = cast(ArgNameMD->getOperand(I))->getString(); auto TypeQual = cast(F.getMetadata( - "kernel_arg_type_qual")->getOperand(I))->getString(); - SmallVector SplitQ; - TypeQual.split(SplitQ, " ", -1, false /* Drop empty entry */); - - for (StringRef KeyName : SplitQ) { - auto Key = StringSwitch(KeyName) - .Case("volatile", RuntimeMD::KeyArgIsVolatile) - .Case("restrict", RuntimeMD::KeyArgIsRestrict) - .Case("const", RuntimeMD::KeyArgIsConst) - .Case("pipe", RuntimeMD::KeyArgIsPipe) - .Default(RuntimeMD::KeyNull); - OutStreamer->EmitIntValue(Key, 1); - } - - // Emit KeyArgTypeKind. - auto BaseTypeName = cast( - F.getMetadata("kernel_arg_base_type")->getOperand(I))->getString(); - auto TypeKind = StringSwitch(BaseTypeName) + "kernel_arg_type_qual")->getOperand(I))->getString(); + auto AccQual = cast(F.getMetadata( + "kernel_arg_access_qual")->getOperand(I))->getString(); + RuntimeMD::KernelArg::Kind Kind; + if (TypeQual.find("pipe") != StringRef::npos) + Kind = RuntimeMD::KernelArg::Pipe; + else Kind = StringSwitch(BaseTypeName) .Case("sampler_t", RuntimeMD::KernelArg::Sampler) .Case("queue_t", RuntimeMD::KernelArg::Queue) .Cases("image1d_t", "image1d_array_t", "image1d_buffer_t", @@ -943,32 +1001,29 @@ "image2d_msaa_depth_t", RuntimeMD::KernelArg::Image) .Cases("image2d_array_msaa_depth_t", "image3d_t", RuntimeMD::KernelArg::Image) - .Default(isa(T) ? RuntimeMD::KernelArg::Pointer : - RuntimeMD::KernelArg::Value); - emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgTypeKind, TypeKind, 1); - - // Emit KeyArgValueType. - emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgValueType, - getRuntimeMDValueType(T, BaseTypeName), 2); - - // Emit KeyArgAccQual. - auto AccQual = cast(F.getMetadata( - "kernel_arg_access_qual")->getOperand(I))->getString(); - auto AQ = StringSwitch(AccQual) - .Case("read_only", RuntimeMD::KernelArg::ReadOnly) - .Case("write_only", RuntimeMD::KernelArg::WriteOnly) - .Case("read_write", RuntimeMD::KernelArg::ReadWrite) - .Default(RuntimeMD::KernelArg::None); - emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgAccQual, AQ, 1); + .Default(!isa(T) ? RuntimeMD::KernelArg::ByValue : + T->getPointerAddressSpace() == 3 ? + RuntimeMD::KernelArg::DynamicSharedPointer : + RuntimeMD::KernelArg::GlobalBuffer); + emitRuntimeMetadataForKernelArg(DL, OutStreamer, T, + Kind, BaseTypeName, TypeName, ArgName, TypeQual, AccQual); + } - // Emit KeyArgAddrQual. - if (auto *PT = dyn_cast(T)) { - emitRuntimeMDIntValue(*OutStreamer, RuntimeMD::KeyArgAddrQual, - PT->getAddressSpace(), 1); + // Emit hidden kernel arguments for OpenCL kernels. + if (F.getParent()->getNamedMetadata("opencl.ocl.version")) { + auto Int64T = Type::getInt64Ty(F.getContext()); + emitRuntimeMetadataForKernelArg(DL, OutStreamer, Int64T, + RuntimeMD::KernelArg::HiddenGlobalOffsetX); + emitRuntimeMetadataForKernelArg(DL, OutStreamer, Int64T, + RuntimeMD::KernelArg::HiddenGlobalOffsetY); + emitRuntimeMetadataForKernelArg(DL, OutStreamer, Int64T, + RuntimeMD::KernelArg::HiddenGlobalOffsetZ); + if (auto MD = F.getParent()->getNamedMetadata("llvm.printf.fmts")) { + auto Int8PtrT = Type::getInt8PtrTy(F.getContext(), + RuntimeMD::KernelArg::Global); + emitRuntimeMetadataForKernelArg(DL, OutStreamer, Int8PtrT, + RuntimeMD::KernelArg::HiddenPrintfBuffer); } - - // Emit KeyArgEnd - OutStreamer->EmitIntValue(RuntimeMD::KeyArgEnd, 1); } // Emit KeyReqdWorkGroupSize, KeyWorkGroupSizeHint, and KeyVecTypeHint. Index: lib/Target/AMDGPU/AMDGPURuntimeMetadata.h =================================================================== --- lib/Target/AMDGPU/AMDGPURuntimeMetadata.h +++ lib/Target/AMDGPU/AMDGPURuntimeMetadata.h @@ -65,7 +65,7 @@ KeyArgAlign = 10, // Kernel arg alignment KeyArgTypeName = 11, // Kernel type name KeyArgName = 12, // Kernel name - KeyArgTypeKind = 13, // Kernel argument type kind + KeyArgKind = 13, // Kernel argument kind KeyArgValueType = 14, // Kernel argument value type KeyArgAddrQual = 15, // Kernel argument address qualifier KeyArgAccQual = 16, // Kernel argument access qualifier @@ -77,14 +77,13 @@ KeyWorkGroupSizeHint = 22, // Work group size hint KeyVecTypeHint = 23, // Vector type hint KeyKernelIndex = 24, // Kernel index for device enqueue - KeySGPRs = 25, // Number of SGPRs - KeyVGPRs = 26, // Number of VGPRs - KeyMinWavesPerSIMD = 27, // Minimum number of waves per SIMD - KeyMaxWavesPerSIMD = 28, // Maximum number of waves per SIMD - KeyFlatWorkGroupSizeLimits = 29, // Flat work group size limits - KeyMaxWorkGroupSize = 30, // Maximum work group size - KeyNoPartialWorkGroups = 31, // No partial work groups - KeyPrintfInfo = 32, // Prinf function call information + KeyMinWavesPerSIMD = 25, // Minimum number of waves per SIMD + KeyMaxWavesPerSIMD = 26, // Maximum number of waves per SIMD + KeyFlatWorkGroupSizeLimits = 27, // Flat work group size limits + KeyMaxWorkGroupSize = 28, // Maximum work group size + KeyNoPartialWorkGroups = 29, // No partial work groups + KeyPrintfInfo = 30, // Prinf function call information + KeyArgActualAcc = 31, // The actual kernel argument access qualifier }; enum Language : uint8_t { @@ -103,12 +102,21 @@ }; namespace KernelArg { - enum TypeKind : uint8_t { - Value = 0, - Pointer = 1, - Image = 2, - Sampler = 3, - Queue = 4, + enum Kind : uint8_t { + ByValue = 0, + GlobalBuffer = 1, + DynamicSharedPointer = 2, + Sampler = 3, + Image = 4, + Pipe = 5, + Queue = 6, + HiddenGlobalOffsetX = 7, + HiddenGlobalOffsetY = 8, + HiddenGlobalOffsetZ = 9, + HiddenNone = 10, + HiddenPrintfBuffer = 11, + HiddenDefaultQueue = 12, + HiddenCompletionAction = 13, }; enum ValueType : uint16_t { @@ -138,6 +146,8 @@ Global = 1, Constant = 2, Local = 3, + Generic = 4, + Region = 5, }; } // namespace KernelArg } // namespace RuntimeMD Index: test/CodeGen/AMDGPU/runtime-metadata.ll =================================================================== --- test/CodeGen/AMDGPU/runtime-metadata.ll +++ test/CodeGen/AMDGPU/runtime-metadata.ll @@ -16,12 +16,12 @@ ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 3 ; CHECK-NEXT: .short 200 -; CHECK-NEXT: .byte 32 -; CHECK-NEXT: .long 10 -; CHECK-NEXT: .ascii "1:1:4:%d\\n" -; CHECK-NEXT: .byte 32 -; CHECK-NEXT: .long 10 -; CHECK-NEXT: .ascii "2:1:8:%g\\n" +; CHECK-NEXT: .byte 30 +; CHECK-NEXT: .long 10 +; CHECK-NEXT: .ascii "1:1:4:%d\\n" +; CHECK-NEXT: .byte 30 +; CHECK-NEXT: .long 10 +; CHECK-NEXT: .ascii "2:1:8:%g\\n" ; CHECK-LABEL:{{^}}test_char: ; CHECK: .section .AMDGPU.runtime_metadata @@ -44,6 +44,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_char(i8 %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !9 !kernel_arg_base_type !9 !kernel_arg_type_qual !4 { @@ -71,6 +113,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_ushort2(<2 x i16> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !10 !kernel_arg_base_type !10 !kernel_arg_type_qual !4 { @@ -98,6 +182,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_int3(<3 x i32> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !11 !kernel_arg_base_type !11 !kernel_arg_type_qual !4 { @@ -125,6 +251,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_ulong4(<4 x i64> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !12 !kernel_arg_base_type !12 !kernel_arg_type_qual !4 { @@ -152,6 +320,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_half8(<8 x half> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !13 !kernel_arg_base_type !13 !kernel_arg_type_qual !4 { @@ -179,6 +389,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_float16(<16 x float> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !14 !kernel_arg_base_type !14 !kernel_arg_type_qual !4 { @@ -206,32 +458,116 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 -; CHECK-NEXT: .byte 5 - -define amdgpu_kernel void @test_double16(<16 x double> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !15 !kernel_arg_base_type !15 !kernel_arg_type_qual !4 { - ret void -} - -; CHECK-LABEL:{{^}}test_pointer: -; CHECK: .section .AMDGPU.runtime_metadata -; CHECK-NEXT: .byte 4 -; CHECK-NEXT: .byte 6 -; CHECK-NEXT: .long 12 -; CHECK-NEXT: .ascii "test_pointer" ; CHECK-NEXT: .byte 7 ; CHECK-NEXT: .byte 9 ; CHECK-NEXT: .long 8 ; CHECK-NEXT: .byte 10 ; CHECK-NEXT: .long 8 -; CHECK-NEXT: .byte 11 -; CHECK-NEXT: .long 5 -; CHECK-NEXT: .ascii "int *" ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 7 ; CHECK-NEXT: .byte 14 -; CHECK-NEXT: .short 6 -; CHECK-NEXT: .byte 16 -; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 5 + +define amdgpu_kernel void @test_double16(<16 x double> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !15 !kernel_arg_base_type !15 !kernel_arg_type_qual !4 { + ret void +} + +; CHECK-LABEL:{{^}}test_pointer: +; CHECK: .section .AMDGPU.runtime_metadata +; CHECK-NEXT: .byte 4 +; CHECK-NEXT: .byte 6 +; CHECK-NEXT: .long 12 +; CHECK-NEXT: .ascii "test_pointer" +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .long 5 +; CHECK-NEXT: .ascii "int *" +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 6 +; CHECK-NEXT: .byte 16 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 @@ -256,7 +592,7 @@ ; CHECK-NEXT: .long 9 ; CHECK-NEXT: .ascii "image2d_t" ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 4 ; CHECK-NEXT: .byte 14 ; CHECK-NEXT: .short 0 ; CHECK-NEXT: .byte 16 @@ -264,6 +600,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_image(%opencl.image2d_t addrspace(1)* %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !17 !kernel_arg_base_type !17 !kernel_arg_type_qual !4 { @@ -291,6 +669,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_sampler(i32 %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !18 !kernel_arg_base_type !18 !kernel_arg_type_qual !4 { @@ -312,7 +732,7 @@ ; CHECK-NEXT: .long 7 ; CHECK-NEXT: .ascii "queue_t" ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 4 +; CHECK-NEXT: .byte 6 ; CHECK-NEXT: .byte 14 ; CHECK-NEXT: .short 0 ; CHECK-NEXT: .byte 16 @@ -320,6 +740,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_queue(%opencl.queue_t addrspace(1)* %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !19 !kernel_arg_base_type !19 !kernel_arg_type_qual !4 { @@ -349,6 +811,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_struct(%struct.A* byval %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !20 !kernel_arg_base_type !20 !kernel_arg_type_qual !4 { @@ -376,6 +880,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_i128(i128 %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !21 !kernel_arg_base_type !21 !kernel_arg_type_qual !4 { @@ -433,6 +979,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_multi_arg(i32 %a, <2 x i16> %b, <3 x i8> %c) !kernel_arg_addr_space !22 !kernel_arg_access_qual !23 !kernel_arg_type !24 !kernel_arg_base_type !24 !kernel_arg_type_qual !25 { @@ -488,7 +1076,7 @@ ; CHECK-NEXT: .long 5 ; CHECK-NEXT: .ascii "int *" ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 2 ; CHECK-NEXT: .byte 14 ; CHECK-NEXT: .short 6 ; CHECK-NEXT: .byte 16 @@ -496,6 +1084,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 3 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_addr_space(i32 addrspace(1)* %g, i32 addrspace(2)* %c, i32 addrspace(3)* %l) !kernel_arg_addr_space !50 !kernel_arg_access_qual !23 !kernel_arg_type !51 !kernel_arg_base_type !51 !kernel_arg_type_qual !25 { @@ -555,7 +1185,7 @@ ; CHECK-NEXT: .ascii "int *" ; CHECK-NEXT: .byte 20 ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 5 ; CHECK-NEXT: .byte 14 ; CHECK-NEXT: .short 0 ; CHECK-NEXT: .byte 16 @@ -563,6 +1193,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_type_qual(i32 addrspace(1)* %a, i32 addrspace(1)* %b, %opencl.pipe_t addrspace(1)* %c) !kernel_arg_addr_space !22 !kernel_arg_access_qual !23 !kernel_arg_type !51 !kernel_arg_base_type !51 !kernel_arg_type_qual !70 { @@ -584,7 +1256,7 @@ ; CHECK-NEXT: .long 9 ; CHECK-NEXT: .ascii "image1d_t" ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 4 ; CHECK-NEXT: .byte 14 ; CHECK-NEXT: .short 0 ; CHECK-NEXT: .byte 16 @@ -601,7 +1273,7 @@ ; CHECK-NEXT: .long 9 ; CHECK-NEXT: .ascii "image2d_t" ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 4 ; CHECK-NEXT: .byte 14 ; CHECK-NEXT: .short 0 ; CHECK-NEXT: .byte 16 @@ -618,7 +1290,7 @@ ; CHECK-NEXT: .long 9 ; CHECK-NEXT: .ascii "image3d_t" ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 4 ; CHECK-NEXT: .byte 14 ; CHECK-NEXT: .short 0 ; CHECK-NEXT: .byte 16 @@ -626,6 +1298,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_access_qual(%opencl.image1d_t addrspace(1)* %ro, %opencl.image2d_t addrspace(1)* %wo, %opencl.image3d_t addrspace(1)* %rw) !kernel_arg_addr_space !60 !kernel_arg_access_qual !61 !kernel_arg_type !62 !kernel_arg_base_type !62 !kernel_arg_type_qual !25 { @@ -640,18 +1354,60 @@ ; CHECK-NEXT: .ascii "test_vec_type_hint_half" ; CHECK-NEXT: .byte 7 ; CHECK-NEXT: .byte 9 -; CHECK-NEXT: .long 4 +; CHECK-NEXT: .long 4 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 4 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .long 3 +; CHECK-NEXT: .ascii "int" +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 6 +; CHECK-NEXT: .byte 16 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 ; CHECK-NEXT: .byte 10 -; CHECK-NEXT: .long 4 -; CHECK-NEXT: .byte 11 -; CHECK-NEXT: .long 3 -; CHECK-NEXT: .ascii "int" +; CHECK-NEXT: .long 8 ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .byte 9 ; CHECK-NEXT: .byte 14 -; CHECK-NEXT: .short 6 -; CHECK-NEXT: .byte 16 -; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .long 4 @@ -683,6 +1439,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .long 5 ; CHECK-NEXT: .ascii "float" @@ -713,6 +1511,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .long 6 ; CHECK-NEXT: .ascii "double" @@ -743,6 +1583,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .long 4 ; CHECK-NEXT: .ascii "char" @@ -773,6 +1655,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .long 5 ; CHECK-NEXT: .ascii "short" @@ -803,6 +1727,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .long 4 ; CHECK-NEXT: .ascii "long" @@ -820,18 +1786,60 @@ ; CHECK-NEXT: .ascii "test_vec_type_hint_unknown" ; CHECK-NEXT: .byte 7 ; CHECK-NEXT: .byte 9 -; CHECK-NEXT: .long 4 +; CHECK-NEXT: .long 4 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 4 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .long 3 +; CHECK-NEXT: .ascii "int" +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 6 +; CHECK-NEXT: .byte 16 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 ; CHECK-NEXT: .byte 10 -; CHECK-NEXT: .long 4 -; CHECK-NEXT: .byte 11 -; CHECK-NEXT: .long 3 -; CHECK-NEXT: .ascii "int" +; CHECK-NEXT: .long 8 ; CHECK-NEXT: .byte 13 -; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .byte 11 ; CHECK-NEXT: .byte 14 -; CHECK-NEXT: .short 6 -; CHECK-NEXT: .byte 16 -; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 23 ; CHECK-NEXT: .long 7 @@ -863,6 +1871,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 21 ; CHECK-NEXT: .long 1 ; CHECK-NEXT: .long 2 @@ -897,6 +1947,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 22 ; CHECK-NEXT: .long 8 ; CHECK-NEXT: .long 16 @@ -933,6 +2025,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_arg_ptr_to_ptr(i32 * addrspace(1)* %a) !kernel_arg_addr_space !81 !kernel_arg_access_qual !2 !kernel_arg_type !80 !kernel_arg_base_type !80 !kernel_arg_type_qual !4 { @@ -962,6 +2096,48 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_arg_struct_contains_ptr(%struct.B * byval %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !82 !kernel_arg_base_type !82 !kernel_arg_type_qual !4 { @@ -989,6 +2165,48 @@ ; CHECK-NEXT: .byte 16 ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 define amdgpu_kernel void @test_arg_vector_of_ptr(<2 x i32 addrspace(1)*> %a) !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !83 !kernel_arg_base_type !83 !kernel_arg_type_qual !4 { @@ -1018,8 +2236,51 @@ ; CHECK-NEXT: .byte 15 ; CHECK-NEXT: .byte 1 ; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 9 +; CHECK-NEXT: .byte 8 +; CHECK-NEXT: .byte 7 +; CHECK-NEXT: .byte 9 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 10 +; CHECK-NEXT: .long 8 +; CHECK-NEXT: .byte 13 +; CHECK-NEXT: .byte 11 +; CHECK-NEXT: .byte 14 +; CHECK-NEXT: .short 1 +; CHECK-NEXT: .byte 15 +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 8 ; CHECK-NEXT: .byte 5 + define amdgpu_kernel void @test_arg_unknown_builtin_type(%opencl.clk_event_t addrspace(1)* %a) !kernel_arg_addr_space !81 !kernel_arg_access_qual !2 !kernel_arg_type !84 !kernel_arg_base_type !84 !kernel_arg_type_qual !4 { ret void }