From 6222f1ff6ba7f00b085003c1a05fdbdc31356235 Mon Sep 17 00:00:00 2001 From: qiaojbao Date: Thu, 6 Feb 2025 18:10:13 +0800 Subject: [PATCH] Update llpc from commit 1acb5e9b [Continuations] Share WaitMask handling code lgc: Refine wmma/swmma intrinsic selection via a map Fix for upstream move to CmpPredicate [llvmraytracing] Replace `Data.Kind` checks with helper [Continuations] Move/combinie rematerialization utils into RematSupport lgc: Allow globallyCoherent flag to be set for InlineBuffer Do not query entry point for GPURT library [llvmraytracing] Add lgc.cps.jump.uniform dialect op lgc: Set correct lds size in InitializeWorkgroupMemory pass lgc: Support per draw vertex input rate Fix fast math flag for modfStruct Rename folder patch to lowering lgc: Replace InstCombine with Scalarizer in continuation transform Some renaming in passes Fix spir-v validation always passes Update RayTrace test pipeline to remove spv lgc: use reconfigWorkgroupLayout without foldXY [Continuations] Promote pointer argument for Traversal Fix LLVM_OPTIMIZED_TABLEGEN Add support for WaveMultiPrefixBitOr [llvmraytracing] Use return value of 'earlyGpurtTransform' [llvmraytracing] Make lgc.cps the default mode and remove non-lgc.cps mode [Continuations] Use size_t for enumerate::index instead of long int [Continuations] Use anonymous namespace instead of static Cleanup specialize uniform implementation lgc: Fix logic error in reconfigWorkgroupLayout [llvmraytracing] Remove remaining references to lgc.cps mode [Continuations] Check for valid continuation state layout [llvmraytracing] Handle _AmdVgprArguments struct from the scheduler function. Fix assertions in vkgcUtil that could never be triggered --- CMakeLists.txt | 9 +- cmake/llpc_version.cmake | 63 +++- cmake/llvm.cmake | 4 +- docs/DdnRelocatableShaderElf.md | 4 +- include/vkgcDefs.h | 40 +-- lgc/CMakeLists.txt | 158 ++++----- lgc/builder/DescBuilder.cpp | 13 +- lgc/builder/ImageBuilder.cpp | 57 +-- lgc/builder/InOutBuilder.cpp | 4 +- lgc/elfLinker/ColorExportShader.cpp | 4 +- lgc/elfLinker/ColorExportShader.h | 4 +- lgc/elfLinker/NullFragmentShader.cpp | 4 +- lgc/include/lgc/builder/BuilderImpl.h | 4 +- .../lgc/lowering/AddBufferOperationMetadata.h | 61 ++++ .../lgc/{patch => lowering}/AddLoopMetadata.h | 4 +- .../{patch => lowering}/ApplyWorkarounds.h | 6 +- .../{patch => lowering}/CheckShaderCache.h | 6 +- .../CollectImageOperations.h | 4 +- .../CollectResourceUsage.h | 6 +- .../CombineCooperativeMatrix.h | 4 +- .../lgc/{patch => lowering}/Continufy.h | 2 +- .../{patch => lowering}/FragmentColorExport.h | 2 +- .../{patch => lowering}/GenerateCopyShader.h | 6 +- .../lgc/{patch => lowering}/IncludeLlvmIr.h | 4 +- .../InitializeWorkgroupMemory.h | 7 +- .../lgc/{patch => lowering}/LgcLowering.h | 4 +- .../LowerBufferOperations.h | 6 +- .../LowerCooperativeMatrix.h | 4 +- .../{patch => lowering}/LowerDebugPrintf.h | 4 +- .../lgc/{patch => lowering}/LowerDesc.h | 4 +- .../lgc/{patch => lowering}/LowerGpuRt.h | 2 +- .../LowerImageDerivatives.h | 4 +- .../lgc/{patch => lowering}/LowerInOut.h | 6 +- .../{patch => lowering}/LowerInvariantLoads.h | 2 +- .../lgc/{patch => lowering}/LowerMulDx9Zero.h | 6 +- .../{patch => lowering}/LowerReadFirstLane.h | 2 +- .../{patch => lowering}/LowerSubgroupOps.h | 6 +- .../{patch => lowering}/MutateEntryPoint.h | 6 +- .../PassthroughHullShader.h | 6 +- .../PeepholeOptimization.h | 4 +- .../{patch => lowering}/PreparePipelineAbi.h | 4 +- .../lgc/{patch => lowering}/ScalarizeLoads.h | 6 +- .../{patch => lowering}/SetupTargetFeatures.h | 4 +- .../lgc/{patch => lowering}/ShaderInputs.h | 2 +- .../{patch => lowering}/StructurizeBuffers.h | 6 +- .../lgc/{patch => lowering}/SystemValues.h | 2 +- .../lgc/{patch => lowering}/VertexFetch.h | 7 +- .../WorkaroundDsSubdwordWrite.h | 4 +- lgc/include/lgc/state/AbiMetadata.h | 5 +- lgc/include/lgc/state/IntrinsDefs.h | 4 +- lgc/interface/lgc/Builder.h | 4 +- lgc/interface/lgc/LgcDialect.td | 8 +- lgc/interface/lgc/Pipeline.h | 13 +- lgc/{patch => lowering}/AddLoopMetadata.cpp | 6 +- lgc/{patch => lowering}/ApplyWorkarounds.cpp | 6 +- lgc/{patch => lowering}/CheckShaderCache.cpp | 6 +- .../CollectImageOperations.cpp | 8 +- .../CollectResourceUsage.cpp | 8 +- .../CombineCooperativeMatrix.cpp | 4 +- lgc/{patch => lowering}/ConfigBuilderBase.cpp | 2 +- lgc/{patch => lowering}/ConfigBuilderBase.h | 2 +- lgc/{patch => lowering}/Continufy.cpp | 8 +- .../FragmentColorExport.cpp | 8 +- .../GenerateCopyShader.cpp | 4 +- .../GenerateNullFragmentShader.cpp | 8 +- .../GenerateNullFragmentShader.h | 4 +- lgc/{patch => lowering}/IncludeLlvmIr.cpp | 4 +- .../InitializeWorkgroupMemory.cpp | 43 +-- lgc/{patch => lowering}/LgcLowering.cpp | 72 ++-- .../LowerBufferOperations.cpp | 23 +- .../LowerCooperativeMatrix.cpp | 116 +++--- lgc/{patch => lowering}/LowerDebugPrintf.cpp | 12 +- lgc/{patch => lowering}/LowerDesc.cpp | 10 +- lgc/{patch => lowering}/LowerGpuRt.cpp | 8 +- .../LowerImageDerivatives.cpp | 8 +- lgc/{patch => lowering}/LowerInOut.cpp | 6 +- .../LowerInvariantLoads.cpp | 6 +- lgc/{patch => lowering}/LowerMulDx9Zero.cpp | 10 +- .../LowerPopsInterlock.cpp | 6 +- lgc/{patch => lowering}/LowerPopsInterlock.h | 2 +- .../LowerRayQueryWrapper.cpp | 2 +- .../LowerRayQueryWrapper.h | 2 +- .../LowerReadFirstLane.cpp | 6 +- lgc/{patch => lowering}/LowerSubgroupOps.cpp | 8 +- lgc/{patch => lowering}/MeshTaskShader.cpp | 27 +- lgc/{patch => lowering}/MeshTaskShader.h | 8 +- lgc/{patch => lowering}/MutateEntryPoint.cpp | 10 +- lgc/{patch => lowering}/NggPrimShader.cpp | 4 +- lgc/{patch => lowering}/NggPrimShader.h | 2 +- lgc/{patch => lowering}/PassRegistry.inc | 8 +- .../PassthroughHullShader.cpp | 8 +- .../PeepholeOptimization.cpp | 8 +- .../PreparePipelineAbi.cpp | 8 +- .../RegisterMetadataBuilder.cpp | 2 +- .../RegisterMetadataBuilder.h | 2 +- lgc/{patch => lowering}/ScalarizeLoads.cpp | 6 +- .../SetupTargetFeatures.cpp | 8 +- lgc/{patch => lowering}/ShaderInputs.cpp | 4 +- lgc/{patch => lowering}/ShaderMerger.cpp | 8 +- lgc/{patch => lowering}/ShaderMerger.h | 2 +- .../StructurizeBuffers.cpp | 8 +- lgc/{patch => lowering}/SystemValues.cpp | 4 +- lgc/{patch => lowering}/VertexFetch.cpp | 173 ++++++++- .../WorkaroundDsSubdwordWrite.cpp | 6 +- lgc/state/Compiler.cpp | 4 +- lgc/state/LgcContext.cpp | 4 +- lgc/state/PassManagerCache.cpp | 6 +- lgc/state/PipelineState.cpp | 10 +- lgc/test/CsComputeLibrary.lgc | 2 +- lgc/test/CsReconfigWorkgroup.lgc | 8 +- lgc/test/ElfRelocationAndNote.lgc | 2 +- lgc/test/ElfRelocationSize.lgc | 4 +- lgc/test/InOutPackingNonZeroBase.lgc | 4 +- lgc/test/PartPipeline.lgc | 4 +- lgc/test/PhiWithArgument.lgc | 2 +- .../ScalarizeInputWithDynamicIndexUser.lgc | 6 +- lgc/test/TestWaterfallLoopForStruct.lgc | 4 +- .../strided-buffer-ops.lgc | 22 +- lgc/test/UberFetchShader.lgc | 4 +- lgc/test/lgcdis.lgc | 4 +- .../scalarizationOfDescriptorLoadsTest1.lgc | 4 +- .../scalarizationOfDescriptorLoadsTest2.lgc | 4 +- .../scalarizationOfDescriptorLoadsTest3.lgc | 4 +- .../scalarizationOfDescriptorLoadsTest4.lgc | 4 +- .../scalarizationOfDescriptorLoadsTest5.lgc | 4 +- lgc/tool/lgc/lgc.cpp | 4 +- lgc/util/WorkgroupLayout.cpp | 30 +- llpc/context/llpcCompiler.cpp | 25 +- llpc/context/llpcContext.cpp | 3 +- llpc/context/llpcDialect.h | 4 +- llpc/context/llpcPipelineContext.cpp | 12 +- llpc/docs/AddingPasses.md | 2 +- llpc/lowering/LinkTransformShaders.cpp | 4 +- llpc/lowering/LowerAccessChain.cpp | 6 +- llpc/lowering/LowerAccessChain.h | 6 +- llpc/lowering/LowerAdvancedBlend.cpp | 4 +- llpc/lowering/LowerAdvancedBlend.h | 6 +- llpc/lowering/LowerCfgMerges.cpp | 6 +- llpc/lowering/LowerCfgMerges.h | 6 +- llpc/lowering/LowerConstImmediateStore.cpp | 4 +- llpc/lowering/LowerConstImmediateStore.h | 6 +- llpc/lowering/LowerCooperativeMatrix.cpp | 4 +- llpc/lowering/LowerCooperativeMatrix.h | 4 +- llpc/lowering/LowerGlCompatibility.cpp | 6 +- llpc/lowering/LowerGlCompatibility.h | 6 +- llpc/lowering/LowerGlobals.cpp | 176 +++++----- llpc/lowering/LowerGlobals.h | 8 +- llpc/lowering/LowerInstMetaRemove.cpp | 4 +- llpc/lowering/LowerInstMetaRemove.h | 6 +- llpc/lowering/LowerMath.cpp | 8 +- llpc/lowering/LowerMath.h | 16 +- llpc/lowering/LowerMemoryOp.cpp | 4 +- llpc/lowering/LowerMemoryOp.h | 6 +- llpc/lowering/LowerPostInline.cpp | 6 +- llpc/lowering/LowerPostInline.h | 6 +- llpc/lowering/LowerRayTracing.cpp | 6 +- llpc/lowering/LowerRayTracing.h | 6 +- llpc/lowering/LowerTerminator.cpp | 4 +- llpc/lowering/LowerTerminator.h | 6 +- llpc/lowering/LowerTranslator.h | 4 +- llpc/lowering/Lowering.cpp | 4 +- llpc/lowering/Lowering.h | 4 +- llpc/lowering/LoweringUtil.cpp | 4 +- llpc/lowering/PassRegistry.inc | 8 +- llpc/lowering/PrepareContinuations.cpp | 5 +- .../lowering/PrepareTransformVertexShader.cpp | 4 +- llpc/lowering/ProcessGfxRuntimeLibrary.cpp | 6 +- llpc/lowering/ProcessGpuRtLibrary.cpp | 104 ++---- llpc/lowering/ProcessGpuRtLibrary.h | 4 +- llpc/lowering/ScalarReplacementOfBuiltins.cpp | 4 +- ...Chain_TestGeneralVarVectorExtract_lit.frag | 2 +- ...ccessChain_TestInOutVectorExtract_lit.frag | 2 +- ...AccessChain_TestMultiLevelChain_lit.spvasm | 4 +- ..._TestOutBlockMemberLocUnspecified_lit.vert | 2 +- ...essChain_TestUniformVectorExtract_lit.frag | 2 +- .../core/OpArrayLength_TestGeneral_lit.frag | 6 +- ...OpAtomicAnd_TestInt64ImageAtomicAnd.spvasm | 4 +- ...change_TestInt64ImageAtomicCompSwap.spvasm | 4 +- ...icCompareExchange_TestStrongCompare.spvasm | 2 +- ...change_TestInt64ImageAtomicExchange.spvasm | 4 +- ...pAtomicIAdd_TestInt64ImageAtomicAdd.spvasm | 4 +- ...ement_TestInt64ImageAtomicDecrement.spvasm | 4 +- ...omicIDecrement_TestStorageBlock_lit.spvasm | 4 +- ...ement_TestInt64ImageAtomicIncrement.spvasm | 4 +- ...omicIIncrement_TestStorageBlock_lit.spvasm | 4 +- ...cIIncrement_TestVariablePointer_lit.spvasm | 4 +- ...pAtomicISub_TestInt64ImageAtomicSub.spvasm | 4 +- ...AtomicLoad_TestInt64ImageAtomicLoad.spvasm | 4 +- .../OpAtomicLoad_TestStorageBlock_lit.spvasm | 4 +- .../OpAtomicOr_TestInt64ImageAtomicOr.spvasm | 4 +- ...pAtomicSMax_TestInt64ImageAtomicMax.spvasm | 4 +- ...pAtomicSMin_TestInt64ImageAtomicMin.spvasm | 4 +- ...omicStore_TestInt64ImageAtomicStore.spvasm | 4 +- .../OpAtomicStore_TestStorageBlock_lit.spvasm | 4 +- ...pAtomicUMax_TestInt64ImageAtomicMax.spvasm | 4 +- ...pAtomicUMin_TestInt64ImageAtomicMin.spvasm | 4 +- .../OpAtomicXXX_TestImageDimension_lit.comp | 4 +- ...tomicXXX_TestImageMemoryQualifier_lit.comp | 4 +- .../core/OpAtomicXXX_TestImage_lit.comp | 4 +- .../core/OpAtomicXXX_TestImage_lit.frag | 4 +- .../OpAtomicXXX_TestSharedVariable_lit.comp | 2 +- ...stStorageBlockAndSharedWithData64_lit.comp | 4 +- .../OpAtomicXXX_TestStorageBlock_lit.frag | 4 +- ...OpAtomicXor_TestInt64ImageAtomicXor.spvasm | 4 +- .../core/OpBitCount_TestIntConst_lit.frag | 2 +- .../shaderdb/core/OpBitCount_TestInt_lit.frag | 2 +- .../core/OpBitCount_TestIvec4_lit.frag | 2 +- .../core/OpBitCount_TestUint_lit.frag | 2 +- .../OpBitFieldInsert_TestIntConst_lit.frag | 2 +- .../OpBitFieldSExtract_TestGeneral_lit.frag | 2 +- .../OpBitFieldSExtract_TestIntConst_lit.frag | 2 +- .../OpBitFieldUExtract_TestGeneral_lit.frag | 2 +- .../core/OpBitFieldUExtract_TestUint_lit.frag | 2 +- .../core/OpBitReverse_TestInt_lit.frag | 2 +- .../core/OpBitcast_TestIvec3ToUvec3_lit.frag | 2 +- .../core/OpBitcast_TestUintToInt_lit.frag | 2 +- .../OpControlBarrier_TestGeneral_lit.comp | 2 +- .../OpConvertFToS_TestDoubleToInt_lit.frag | 2 +- ...yMemory_TestCopyUniformToOutput_lit.spvasm | 2 +- .../core/OpCopyMemory_TestStruct_lit.spvasm | 2 +- .../core/OpDPdx_TestFineCoarse_lit.frag | 2 +- .../core/OpDPdy_TestFineCoarse_lit.frag | 2 +- .../OpEmitStreamVertex_TestGeneral_lit.geom | 2 +- .../core/OpEmitVertex_TestGeneral_lit.geom | 2 +- .../shaderdb/core/OpFAdd_TestMatrix_lit.frag | 4 +- .../shaderdb/core/OpFAdd_TestVector_lit.frag | 2 +- .../core/OpFConvert_TestDmat4ToMat4_lit.frag | 4 +- .../OpFConvert_TestDoubleToFloat_lit.frag | 4 +- .../OpFConvert_TestMat2X3ToDmat2X3_lit.frag | 4 +- .../OpFConvert_TestRoundingModeRTN_lit.spvasm | 2 +- .../OpFConvert_TestRoundingModeRTP_lit.spvasm | 2 +- .../core/OpFConvert_TestVec3ToDvec3_lit.frag | 2 +- .../shaderdb/core/OpFDiv_TestVector_lit.frag | 2 +- .../shaderdb/core/OpFMod_TestFloat_lit.frag | 2 +- .../shaderdb/core/OpFMod_TestVec4_lit.frag | 2 +- .../shaderdb/core/OpFMul_TestMatrix_lit.frag | 2 +- .../shaderdb/core/OpFMul_TestVector_lit.frag | 2 +- .../core/OpFNegate_TestDvec3_lit.frag | 2 +- .../shaderdb/core/OpFNegate_TestVec3_lit.frag | 2 +- .../OpFOrdGreaterThanEqual_TestVec3_lit.frag | 4 +- .../core/OpFOrdGreaterThan_TestVec3_lit.frag | 4 +- .../OpFOrdLessThanEqual_TestVec3_lit.frag | 4 +- .../core/OpFOrdLessThan_TestVec3_lit.frag | 4 +- .../shaderdb/core/OpFSub_TestMatrix_lit.frag | 4 +- .../shaderdb/core/OpFSub_TestVector_lit.frag | 4 +- .../core/OpIAddCarry_TestInt_lit.frag | 2 +- .../core/OpIAddCarry_TestUvec4_lit.frag | 2 +- .../shaderdb/core/OpIMul_TestVector_lit.frag | 2 +- .../core/OpINotEqual_TestSignMatch_lit.vert | 2 +- .../OpINotEqual_TestSignedUnsigned_lit.frag | 2 +- .../shaderdb/core/OpISub_TestVector_lit.frag | 2 +- .../core/OpImageDrefGather_TestBasic_lit.frag | 4 +- .../OpImageDrefGather_TestOffset_lit.frag | 4 +- ...refGather_TestTextureGatherOffset_lit.frag | 4 +- ...efGather_TestTextureGatherOffsets_lit.frag | 4 +- ...ImageDrefGather_TestTextureGather_lit.frag | 4 +- ...mageExplicitLod_TestDrefLodOffset_lit.frag | 4 +- ..._Test2DMSArray_disableShadowTable_lit.frag | 2 +- .../core/OpImageFetch_Test2DMSArray_lit.frag | 4 +- .../core/OpImageFetch_Test2DMS_lit.frag | 4 +- .../core/OpImageFetch_TestBasic_lit.frag | 4 +- .../core/OpImageFetch_TestBuffer_lit.comp | 4 +- .../OpImageFetch_TestDynamicOffset.spvasm | 2 +- .../OpImageFetch_TestIntegerSampler_lit.frag | 4 +- .../core/OpImageFetch_TestOffset_lit.frag | 4 +- ...OpImageFetch_TestTexelFetchOffset_lit.frag | 4 +- .../core/OpImageFetch_TestTexelFetch_lit.frag | 4 +- .../core/OpImageGather_TestBasic_lit.frag | 4 +- .../OpImageGather_TestConstOffsets_lit.frag | 4 +- ...pImageGather_TestDrefConstOffsets_lit.frag | 4 +- .../OpImageGather_TestIntegerSampler.frag | 4 +- .../core/OpImageGather_TestOffset_lit.frag | 4 +- ...geGather_TestTextureGatherBiasLod_lit.frag | 4 +- ...ageGather_TestTextureGatherOffset_lit.frag | 4 +- ...geGather_TestTextureGatherOffsets_lit.frag | 4 +- .../OpImageGather_TestTextureGather_lit.frag | 4 +- .../OpImageQueryLevels_TestBasic_lit.comp | 4 +- ...ueryLevels_TestTextureQueryLevels_lit.frag | 4 +- .../core/OpImageQueryLod_TestBasic_lit.frag | 2 +- .../OpImageQuerySamples_TestBasic_lit.comp | 4 +- ...mageQuerySamples_TestImageSamples_lit.frag | 4 +- ...geQuerySamples_TestTextureSamples_lit.frag | 4 +- ...ImageQuerySizeLod_TestTextureSize_lit.frag | 4 +- .../core/OpImageQuerySize_TestBasic_lit.frag | 4 +- .../OpImageQuerySize_TestImageSize_lit.frag | 4 +- .../core/OpImageQuerySize_TestImage_lit.comp | 4 +- .../OpImageQuerySize_TestSeparated_lit.frag | 4 +- .../OpImageQuerySize_TestTextureSize_lit.frag | 4 +- ...geReadWrite_TestImageLoadStoreLod_lit.comp | 4 +- .../core/OpImageRead_Test2DMS_lit.comp | 4 +- .../core/OpImageRead_TestBasic_lit.comp | 4 +- .../core/OpImageRead_TestBuffer_lit.comp | 4 +- .../core/OpImageRead_TestCube_lit.comp | 4 +- .../core/OpImageRead_TestImageLoad_lit.frag | 4 +- .../OpImageRead_TestInt64ImageLoad.spvasm | 4 +- .../core/OpImageRead_TestIntImage_lit.comp | 4 +- .../OpImageRead_TestMemoryQualifier_lit.comp | 4 +- .../OpImageRead_TestNonVec4Data_lit.spvasm | 4 +- .../OpImageRead_TestSubpassInput_lit.frag | 4 +- .../OpImageSampleExplicitLod_TestLod_lit.frag | 4 +- ...eExplicitLod_TestTextureGradClamp_lit.frag | 4 +- ...ExplicitLod_TestTextureGradOffset_lit.frag | 4 +- ...SampleExplicitLod_TestTextureGrad_lit.frag | 4 +- ...eExplicitLod_TestTextureLodOffset_lit.frag | 4 +- ...eSampleExplicitLod_TestTextureLod_lit.frag | 4 +- ...mageSampleImplicitLod_Test1DArray_lit.frag | 4 +- .../OpImageSampleImplicitLod_Test1D_lit.frag | 4 +- ...mageSampleImplicitLod_Test2DArray_lit.frag | 4 +- ...ImageSampleImplicitLod_Test2DRect_lit.frag | 4 +- .../OpImageSampleImplicitLod_Test3D_lit.frag | 4 +- ...ImplicitLod_TestArrayDirectAccess_lit.frag | 4 +- ...pImageSampleImplicitLod_TestBasic_lit.frag | 4 +- ...OpImageSampleImplicitLod_TestBias_lit.frag | 4 +- ...geSampleImplicitLod_TestCubeArray_lit.frag | 4 +- ...eSampleImplicitLod_TestCubeShadow_lit.frag | 4 +- ...OpImageSampleImplicitLod_TestCube_lit.frag | 4 +- ...ageSampleImplicitLod_TestDrefGrad_lit.frag | 4 +- ...OpImageSampleImplicitLod_TestGrad_lit.frag | 4 +- ...pleImplicitLod_TestIntegerSampler_lit.frag | 4 +- ...Lod_TestMultiDimArrayDirectAccess_lit.frag | 4 +- ...ImageSampleImplicitLod_TestOffset_lit.frag | 4 +- ...mplicitLod_TestProjDrefGradOffset_lit.frag | 4 +- ...ageSampleImplicitLod_TestSeparate_lit.frag | 4 +- ...eImplicitLod_TestTextureBiasClamp_lit.frag | 4 +- ...ampleImplicitLod_TestTextureClamp_lit.frag | 4 +- ...eImplicitLod_TestTextureGradClamp_lit.frag | 4 +- ...citLod_TestTextureGradOffsetClamp_lit.frag | 4 +- ...mplicitLod_TestTextureOffsetClamp_lit.frag | 4 +- ...mpleImplicitLod_TestTextureOffset_lit.frag | 4 +- ...mageSampleImplicitLod_TestTexture_lit.frag | 4 +- ...OpImageSample_TestSeparateSampler_lit.frag | 4 +- ...SparseRead_TestInt64SparseImageLoad.spvasm | 4 +- .../OpImageWrite_TestInt64ImageStore.spvasm | 4 +- .../shaderdb/core/OpIsInf_TestDouble_lit.frag | 2 +- .../shaderdb/core/OpIsInf_TestFloat_lit.frag | 2 +- .../core/OpKill_TestFunctionBranch_lit.spvasm | 2 +- .../core/OpKill_TestFunctionDynamic_lit.frag | 2 +- .../OpKill_TestFunctionInlineReturn_lit.frag | 4 +- .../core/OpKill_TestFunctionInline_lit.frag | 4 +- .../OpKill_TestFunctionUnreachable_lit.spvasm | 2 +- .../shaderdb/core/OpKill_TestGeneral_lit.frag | 2 +- .../core/OpLoad_TestAggregate_lit.frag | 4 +- .../shaderdb/core/OpLoad_TestMatrix_lit.frag | 4 +- ...MatrixTimesMatrix_TestDmat2xDmat2_lit.frag | 2 +- ...ixTimesMatrix_TestDmat4X3xDmat3X4_lit.frag | 2 +- ...trixTimesMatrix_TestMat2X3xMat4X3_lit.frag | 2 +- ...OpMatrixTimesMatrix_TestMat2xMat2_lit.frag | 2 +- ...OpMatrixTimesMatrix_TestMat3xMat3_lit.frag | 2 +- ...OpMatrixTimesMatrix_TestMat4xMat4_lit.frag | 4 +- ...atrixTimesScalar_TestDmat3xDouble_lit.frag | 2 +- ...atrixTimesScalar_TestDoublexDmat4_bit.frag | 2 +- ...atrixTimesScalar_TestMat3X4xFloat_lit.frag | 4 +- ...TimesScalar_TestMat4X2xConstFloat_lit.frag | 2 +- ...trixTimesVector_TestDmat2X3xDvec2_lit.frag | 2 +- ...MatrixTimesVector_TestDmat2xDvec2_lit.frag | 2 +- ...trixTimesVector_TestDmat4X2xDvec4_lit.frag | 2 +- ...MatrixTimesVector_TestMat3X4xVec4_lit.frag | 2 +- ...OpMatrixTimesVector_TestMat3xVec3_lit.frag | 2 +- .../core/OpPhi_Switch_FunctionCall_Phi.spvasm | 2 +- .../OpPhi_TestMultiIncomingFromSwitch.spvasm | 2 +- .../core/OpSDotAccSat_TestIVec16bit.spvasm | 2 +- .../shaderdb/core/OpSMod_TestInt_lit.frag | 2 +- .../core/OpSelect_TestDescriptorArray.spvasm | 2 +- .../OpSelectionMerge_TestFlatten_lit.spvasm | 2 +- ...OpSpecConstantOp_TestArithLogicOp_lit.frag | 2 +- ...onstantOp_TestQuantizeFlushToZero_lit.pipe | 4 +- ...peSampledImage_TestWaterfallInsertion.frag | 2 +- ...peSampledImage_TestWaterfallScalarize.frag | 6 +- ...Image_TestWaterfallScalarizeVgprLimit.frag | 2 +- ...age_TestWaterfallScalarize_MultiBlock.frag | 6 +- ...age_TestWaterfallScalarize_SharedDesc.frag | 6 +- .../core/OpUDotAccSat_TestUVec16bit.spvasm | 2 +- ...ffle_TestDifferentInputVecSizes_lit.spvasm | 2 +- ...rShuffle_TestDvec4UndefVariable_lit.spvasm | 2 +- ...fle_TestDvec4UnspecifiedChannel_lit.spvasm | 2 +- ...ffle_TestVec4UnspecifiedChannel_lit.spvasm | 2 +- .../core/OpVectorShuffle_TestVec_lit.frag | 2 +- .../OverrideThreadGroupSize16X16X1.spvasm | 2 +- .../core/OverrideThreadGroupSize8X8X1.spvasm | 2 +- .../TestEnableImplicitInvariantExports.vert | 4 +- .../TestForceNonUniformResourceIndex.frag | 4 +- .../shaderdb/core/TestReverseThreadGroup.comp | 4 +- .../shaderdb/core/TestThreadGroupSwizzle.comp | 8 +- .../shaderdb/core/TestXfbStateMetadata.vert | 4 +- ...PipelineGsTess_TestVsTesGsMergeShader.pipe | 2 +- .../PipelineGs_TestVsGSMergeShader.pipe | 2 +- .../DebugInfo_DebugCompilationUnit.spvasm | 2 +- .../avoid/DebugInfo_DebugDeclare.spvasm | 2 +- .../avoid/DebugInfo_DebugExpression.spvasm | 2 +- .../DebugInfo_DebugFunctionDeclaration.spvasm | 2 +- .../avoid/DebugInfo_DebugLexicalBlock.spvasm | 2 +- .../avoid/DebugInfo_DebugSourceNoText.spvasm | 2 +- .../avoid/DebugInfo_DebugTypeArray.spvasm | 2 +- .../avoid/DebugInfo_DebugTypeEnum.spvasm | 2 +- .../avoid/DebugInfo_DebugTypeFunction.spvasm | 2 +- .../DebugInfo_DebugTypeInheritance.spvasm | 2 +- .../avoid/DebugInfo_DebugTypePointer.spvasm | 2 +- .../avoid/DebugInfo_DebugTypeQualifier.spvasm | 2 +- .../avoid/DebugInfo_DebugTypeVector.spvasm | 2 +- .../avoid/DebugInfo_DebugTypedef.spvasm | 2 +- .../avoid/DebugInfo_TestFsBasic.frag | 2 +- .../avoid/DebugInfo_TestVsBasic.vert | 2 +- .../Ext16bitStorage_TestFsInput_lit.frag | 2 +- .../Ext16bitStorage_TestGsInput_lit.geom | 2 +- .../Ext16bitStorage_TestGsOutput_lit.geom | 2 +- .../Ext16bitStorage_TestTcsInput_lit.tesc | 2 +- .../Ext16bitStorage_TestTcsOutput_lit.tesc | 2 +- .../Ext16bitStorage_TestTesInput_lit.tese | 2 +- .../Ext16bitStorage_TestTesOutput_lit.tese | 2 +- .../Ext16bitStorage_TestVsInput_lit.vert | 2 +- .../Ext16bitStorage_TestVsOutput_lit.vert | 2 +- ...ExtBufferReference_TestPointerCasting.frag | 2 +- .../ExtDemoteToHelper_TestDemote.frag | 4 +- ...DemoteToHelper_TestIsHelperInvocation.frag | 4 +- .../ExtDeviceGroup_TestComputeShader_lit.comp | 2 +- ...ExtDeviceGroup_TestGraphicsShader_lit.vert | 2 +- ...xtExplicitVertexParam_TestBuiltIn_lit.frag | 2 +- ...xplicitVertexParam_TestInterpFunc_lit.frag | 2 +- .../ExtFragMask_TestFragFetch_lit.frag | 4 +- .../ExtGcnShader_TestBuiltInFunc_lit.frag | 4 +- .../ExtMultiView_TestSubpassLoad_lit.pipe | 2 +- ...ExtShaderBallot_TestArithmeticAMD_lit.frag | 5 + .../ExtShaderBallot_TestGeneral_lit.frag | 4 +- .../ExtShaderBallot_TestMiscAMD_lit.frag | 2 +- .../ExtShaderBallot_TestSwizzleAMD_lit.frag | 2 +- ...ExtShaderFloat16_TestArithmeticOp_lit.frag | 4 +- .../ExtShaderFloat16_TestCommonFuncs_lit.frag | 6 +- .../ExtShaderFloat16_TestDerivFuncs_lit.frag | 4 +- ...haderFloat16_TestExponentialFuncs_lit.frag | 2 +- .../ExtShaderFloat16_TestInterpFuncs_lit.frag | 4 +- .../ExtShaderFloat16_TestMatrixFuncs_lit.frag | 4 +- ...ShaderFloat16_TestPackUnpackFuncs_lit.frag | 4 +- .../ExtShaderInt64_TestBuiltInFunc_lit.frag | 4 +- ...ShaderInt8_TestSharedVarLoadStore_lit.comp | 4 +- .../ExtShaderInt8_TestShiftOp_lit.comp | 4 +- .../ExtShaderInt8_TestTypeConvert_lit.comp | 4 +- .../ExtShaderInt8_TestVsInOut_lit.vert | 4 +- .../ExtShaderVote_TestGeneral_lit.frag | 2 +- ...ubgroupQuad_TestSubgroupQuadBroadcast.frag | 4 +- ...roupQuad_TestSubgroupQuadSwapDiagonal.frag | 4 +- ...roupQuad_TestSubgroupQuadSwapVertical.frag | 4 +- .../ExtTrinaryMinMax_TestGeneral_lit.frag | 2 +- .../ExtXfb_TessGsDoubleOutput_lit.geom | 2 +- .../ExtXfb_TestGsFloatOutput_lit.geom | 2 +- .../ExtXfb_TestTesDoubleOutput_lit.tese | 2 +- .../ExtXfb_TestTesFloatOutput_lit.tese | 2 +- .../ExtXfb_TestVsDoubleOutput_lit.vert | 2 +- .../ExtXfb_TestVsFloatOutput_lit.vert | 2 +- ...ObjFloat16_TestTrinaryMinMaxFuncs_lit.frag | 4 +- .../OpExtInst_TestFloorDouble_lit.frag | 4 +- .../OpExtInst_TestFloorFloat_lit.frag | 4 +- .../OpExtInst_TestFloorVec4Const_lit.frag | 2 +- .../OpExtInst_TestFractDouble_lit.frag | 2 +- .../OpExtInst_TestFractFloat_lit.frag | 2 +- .../OpExtInst_TestFractVec4Const-lit.frag | 2 +- .../OpExtInst_TestFrexpDouble_lit.frag | 2 +- .../OpExtInst_TestFrexpFloat_lit.frag | 2 +- .../OpExtInst_TestFrexpStructDouble_lit.frag | 2 +- .../OpExtInst_TestFrexpStructFloat_lit.frag | 2 +- .../OpExtInst_TestFrexpStructVec4_lit.frag | 2 +- .../OpExtInst_TestIntBitsToFloat_lit.frag | 4 +- ..._TestInterpolateAtCentroidNoPersp_lit.frag | 4 +- ...ExtInst_TestInterpolateAtCentroid_lit.frag | 4 +- ...OpExtInst_TestInterpolateAtOffset_lit.frag | 2 +- ...OpExtInst_TestInterpolateAtSample_lit.frag | 4 +- ...pExtInst_TestInterpolateDynIdx1DArray.frag | 2 +- ..._TestInterpolateDynIdx1DArrayInStruct.frag | 2 +- ...st_TestInterpolateDynIdx1DStructArray.frag | 2 +- ..._TestInterpolateDynIdx2DArrayInStruct.frag | 2 +- ...terpolateDynIdx2DArrayInStructInArray.frag | 2 +- ...st_TestInterpolateDynIdx2DStructArray.frag | 2 +- ...pExtInst_TestInterpolateDynIdx3DArray.frag | 2 +- ...OpExtInst_TestInterpolateDynIdxVector.frag | 2 +- .../OpExtInst_TestLdexpDouble_lit.frag | 2 +- .../OpExtInst_TestLdexpFloat_lit.frag | 2 +- .../OpExtInst_TestLdexpVec4_lit.frag | 2 +- .../OpExtInst_TestLog2Vec4Const_lit.frag | 4 +- .../extensions/OpExtInst_TestLog2_lit.frag | 4 +- .../OpExtInst_TestLogVec4Const_lit.frag | 4 +- .../extensions/OpExtInst_TestLog_lit.frag | 4 +- .../OpExtInst_TestMaxBasic_lit.frag | 2 +- .../extensions/OpExtInst_TestPow2_lit.frag | 2 +- .../OpExtInst_TestPowVec4Const_lit.frag | 4 +- .../extensions/OpExtInst_TestPow_lit.frag | 2 +- .../OpExtInst_TestRadiansVec4Const_lit.frag | 4 +- .../extensions/OpExtInst_TestRadians_lit.frag | 2 +- .../OpExtInst_TestReflectFloat_lit.frag | 2 +- .../OpExtInst_TestSignDouble_lit.frag | 2 +- .../OpExtInst_TestSignFloat_lit.frag | 2 +- .../extensions/OpExtInst_TestSignInt_lit.frag | 2 +- .../OpExtInst_TestSignIvec4_lit.frag | 2 +- .../OpExtInst_TestSinVec4Const_lit.frag | 4 +- .../extensions/OpExtInst_TestSin_lit.frag | 2 +- .../OpExtInst_TestTanVec4Const_lit.frag | 4 +- .../extensions/OpExtInst_TestTan_lit.frag | 2 +- .../OpExtInst_TestTanhFloat_lit.frag | 2 +- .../extensions/OpExtInst_TestTanh_lit.frag | 2 +- .../general/AggressiveInvariantLoads.pipe | 2 +- .../CallInstAsUserOfGlobalVariable.spvasm | 8 +- llpc/test/shaderdb/general/CoherentArray.frag | 2 +- .../general/DisableInvariantLoads.pipe | 2 +- .../DiscardToDemoteTransformations.frag | 8 +- ...ardToDemoteTransformationsNotRequired.frag | 4 +- llpc/test/shaderdb/general/ImgDescLoad.comp | 2 +- .../shaderdb/general/OutputPrimitiveTest.geom | 2 +- .../PipelineCs_MultipleRootInlineBuffer.pipe | 6 +- ..._OverrideShaderThreadGroupSize16X16X1.pipe | 2 +- ...Cs_OverrideShaderThreadGroupSize8X8X1.pipe | 2 +- .../PipelineCs_TestDynDescNoSpill_lit.pipe | 4 +- ...ipelineCs_TestFetch2DMSFmaskBased_lit.pipe | 4 +- .../PipelineCs_TestInlineConstDirect_lit.pipe | 4 +- .../PipelineCs_TestMultiEntryPoint_lit.pipe | 4 +- .../PipelineGsTess_TestInOutPacking.pipe | 2 +- ...ineTcsTes_TestLocMapLoadBuiltInOutput.pipe | 2 +- .../PipelineTess_TestInOutPacking.pipe | 6 +- .../general/PipelineVsFs_GlPositionFMF.pipe | 2 +- ...estIgnoreDynamicDualSourceBlendEnable.pipe | 2 +- .../PipelineVsFs_TestInOutPacking.pipe | 6 +- ...pelineVsFs_TestIndirectResourceLayout.pipe | 6 +- ...eVsFs_TestInterpAtCentriodBarycentric.pipe | 4 +- .../PipelineVsFs_TestPervertexVariable.pipe | 2 +- .../PipelineVsFs_TestPointerInOut.pipe | 10 +- .../PipelineVsFs_TestPrimitiveID_First.pipe | 2 +- .../PipelineVsFs_TestPrimitiveID_Last.pipe | 2 +- .../general/PipelineVsFs_TestUberShader.pipe | 2 +- ...estCombineOfMultipleStoreInstructions.frag | 2 +- .../TestConstantImmStore_FunctionInline.frag | 2 +- .../general/TestDeduplicateConstTables.frag | 2 +- .../general/TestDeduplicateConstTables.spvasm | 2 +- .../general/TestWorkgroupMemoryLayout.spvasm | 2 +- .../general/WorkgroupSizeLiteral.spvasm | 2 +- .../gfx10/PipelineMergeAttributes_GsVs.pipe | 2 +- .../PipelineMergeAttributes_GsVsNgg.pipe | 2 +- .../gfx10/PipelineMergeAttributes_HsLs.pipe | 2 +- llpc/test/shaderdb/gfx11/FlatParamDpp.frag | 2 +- llpc/test/shaderdb/gfx11/HalfAttribute.frag | 2 +- .../PipelineRays_TestStaticCompile.pipe | 82 +++-- .../ray_tracing/Shader_0x04BDF3B158225AFA.spv | Bin 16872 -> 0 bytes .../ray_tracing/Shader_0x89ABD17F2942EFC4.spv | Bin 15600 -> 0 bytes .../ray_tracing/Shader_0xAD98DA756C353EFE.spv | Bin 3340 -> 0 bytes .../ray_tracing/Shader_0xE7D0EF376FDDEA56.spv | Bin 2512 -> 0 bytes .../ray_tracing/Shader_0xF10BE264545A9F4B.spv | Bin 14364 -> 0 bytes .../PipelineVsFs_TestGraphicsLibrary.pipe | 2 +- ...Hlsl_TestLoadRowMajorMatrixInStruct.spvasm | 2 +- ...lsl_TestStoreRowMajorMatrixInStruct.spvasm | 2 +- .../hlsl/Hlsl_TestStructuredBuffers.spvasm | 2 +- .../SpirvTwoEntryPoints.spvasm | 4 +- .../object/ObjConstant_TestArray_lit.frag | 2 +- .../object/ObjConstant_TestMatrix_lit.frag | 2 +- ...onstant_TestSpecConstantArraySize_lit.vert | 2 +- .../ObjConstant_TestSpecConstantOp_lit.vert | 2 +- ...Constant_TestSpecialSourceSwizzle_lit.frag | 2 +- .../object/ObjConstant_TestStruct_lit.frag | 2 +- .../object/ObjFragMask_TestFragFetch_lit.frag | 4 +- .../ObjImage_TestCubeAtomicAdd_lit.comp | 2 +- .../ObjImage_TestMemoryQualifier_lit.frag | 2 +- .../object/ObjInput_TestCsBuiltIn_lit.comp | 2 +- .../object/ObjInput_TestDrawParams_lit.vert | 2 +- .../object/ObjInput_TestFsBasic_lit.frag | 2 +- .../object/ObjInput_TestFsBuiltIn_lit.frag | 2 +- .../ObjInput_TestFsCompSpecifier_lit.frag | 4 +- .../object/ObjInput_TestFsDouble_lit.frag | 4 +- .../object/ObjInput_TestFsInBlock_lit.frag | 4 +- ...nput_TestFsInterpQualifierInBlock_lit.frag | 4 +- ...put_TestFsInterpQualifierOnStruct_lit.frag | 4 +- .../ObjInput_TestFsInterpQualifier_lit.frag | 4 +- .../ObjInput_TestFsMatrixArray_lit.frag | 4 +- .../object/ObjInput_TestFsMatrix_lit.frag | 4 +- ...t_TestFsNonVolatileHelperInvocation.spvasm | 2 +- .../object/ObjInput_TestFsStruct_lit.frag | 4 +- .../ObjInput_TestFsVectorArray_lit.frag | 4 +- ...nput_TestFsVolatileHelperInvocation.spvasm | 2 +- .../object/ObjInput_TestGsBasic_lit.geom | 2 +- .../object/ObjInput_TestGsBuiltIn_lit.geom | 2 +- .../ObjInput_TestGsCompSpecifier_lit.geom | 2 +- .../object/ObjInput_TestTcsBasic_lit.tesc | 2 +- .../object/ObjInput_TestTcsBuiltIn_lit.tesc | 2 +- .../ObjInput_TestTcsCompSpecifier_lit.tesc | 2 +- ...put_TestTcsLoadEntireInputArray_lit.spvasm | 2 +- .../object/ObjInput_TestTcsViewIndex.spvasm | 2 +- .../object/ObjInput_TestTesBasic_lit.tese | 2 +- .../object/ObjInput_TestTesBuiltIn_lit.tese | 2 +- .../ObjInput_TestTesCompSpecifier_lit.tese | 2 +- .../ObjInput_TestTesComplexInBlock_lit.tese | 2 +- ...jInput_TestTesComplexPatchInBlock_lit.tese | 2 +- .../object/ObjInput_TestTesConstExpr_lit.tese | 2 +- .../object/ObjInput_TestVsBasic_lit.vert | 4 +- .../object/ObjInput_TestVsBuiltIn_lit.vert | 2 +- .../ObjInput_TestVsCompSpecifier_lit.vert | 8 +- .../object/ObjInput_TestVsDouble_lit.vert | 4 +- .../ObjInput_TestVsVectorArray_lit.vert | 4 +- .../object/ObjNonUniform_TestImageSample.frag | 6 +- .../ObjNonUniform_TestMinNonUniform.spvasm | 2 +- .../object/ObjOutput_TestFsBasic_lit.frag | 2 +- .../object/ObjOutput_TestFsBuiltIn_lit.frag | 4 +- .../ObjOutput_TestFsCompSpecifier_lit.frag | 2 +- .../object/ObjOutput_TestFsVector_lit.frag | 2 +- .../object/ObjOutput_TestGsBasic_lit.geom | 2 +- .../object/ObjOutput_TestGsBuiltIn_lit.geom | 2 +- .../ObjOutput_TestGsCompSpecifier_lit.geom | 2 +- .../object/ObjOutput_TestTcsBasic_lit.tesc | 2 +- .../object/ObjOutput_TestTcsBuiltIn_lit.tesc | 2 +- .../ObjOutput_TestTcsCompSpecifier_lit.tesc | 2 +- .../ObjOutput_TestTcsComplexOutBlock_lit.tesc | 2 +- ...utput_TestTcsComplexPatchOutBlock_lit.tesc | 2 +- .../ObjOutput_TestTcsConstExpr_lit.tesc | 2 +- .../object/ObjOutput_TestTesBasic_lit.tese | 2 +- .../object/ObjOutput_TestTesBuiltIn_lit.tese | 2 +- .../ObjOutput_TestTesCompSpecifier_lit.tese | 2 +- .../object/ObjOutput_TestVsBasic_lit.vert | 4 +- .../object/ObjOutput_TestVsBuiltIn_lit.vert | 4 +- .../ObjOutput_TestVsCompSpecifier_lit.vert | 4 +- .../object/ObjOutput_TestVsDouble_lit.vert | 4 +- .../object/ObjOutput_TestVsMatrix.vert | 4 +- .../object/ObjOutput_TestVsMatrixArray.vert | 4 +- .../object/ObjOutput_TestVsNoBuiltIn_lit.vert | 4 +- .../object/ObjOutput_TestVsNoGeneric_lit.vert | 4 +- .../object/ObjOutput_TestVsOutBlock_lit.vert | 2 +- .../object/ObjOutput_TestVsStruct_lit.vert | 4 +- .../ObjOutput_TestVsVectorArray_lit.vert | 4 +- .../object/ObjPushConst_TestBasic_lit.vert | 2 +- .../ObjPushConst_TestNestedStruct_lit.vert | 2 +- .../ObjPushConst_TestSpillToMemory_lit.vert | 2 +- .../object/ObjPushConstant_TestBasic_lit.frag | 2 +- ...hConstant_TestMultiPushConstant_lit.spvasm | 2 +- .../object/ObjResource_TestAlias_lit.frag | 2 +- .../object/ObjSampler_TestLargeId_lit.frag | 2 +- ...Sampler_TestSeparateSamplerShadow_lit.frag | 2 +- .../ObjShaderBallot_TestGeneral_lit.comp | 4 +- .../object/ObjStorageBlock_TestAlign_lit.frag | 2 +- .../ObjStorageBlock_TestDirectIndex_lit.frag | 2 +- .../ObjStorageBlock_TestDouble_lit.frag | 2 +- ...ObjStorageBlock_TestIndirectIndex_lit.frag | 2 +- ...bjStorageBlock_TestMatrixInStruct_lit.vert | 2 +- .../ObjStorageBlock_TestMemCpyInt16.comp | 2 +- .../ObjStorageBlock_TestMemCpyInt32.comp | 2 +- .../ObjStorageBlock_TestMemCpyInt8.comp | 2 +- .../ObjStorageBlock_TestMemSetInt16.comp | 2 +- .../ObjStorageBlock_TestMemSetInt32.comp | 2 +- .../ObjStorageBlock_TestMemSetInt8.comp | 2 +- ...jStorageBlock_TestMemoryQualifier_lit.frag | 2 +- ...geBlock_TestMultiLevelAccessChain_lit.vert | 2 +- .../ObjStorageBlock_TestOffset_lit.frag | 2 +- ...StorageBlock_TestStoreBasicDouble_lit.vert | 2 +- ...jStorageBlock_TestStoreBasicFloat_lit.vert | 2 +- ...ObjStorageBlock_TestStoreBasicInt_lit.vert | 2 +- ...bjStorageBlock_TestStoreBasicUint_lit.vert | 2 +- ...StorageBlock_TestStoreMatrixArray_lit.vert | 2 +- .../ObjStorageBlock_TestStoreMatrix_lit.vert | 2 +- ...geBlock_TestStoreMixedMatrixStyle_lit.frag | 2 +- ...rageBlock_TestStoreRowMajorMatrix_lit.frag | 2 +- ...StorageBlock_TestStoreScalarArray_lit.vert | 2 +- .../ObjStorageBlock_TestStoreStruct_lit.vert | 2 +- ...orageBlock_TestStoreToMatrixArray_lit.vert | 2 +- ...ObjStorageBlock_TestStoreToMatrix_lit.vert | 2 +- ...geBlock_TestStoreToRowMajorMatrix_lit.frag | 2 +- ...lock_TestStoreToScalarVectorArray_lit.vert | 2 +- ...StorageBlock_TestStoreVectorArray_lit.vert | 2 +- ...StorageBlock_TestUseStorageBuffer_lit.frag | 4 +- ...ageBlock_TestVectorComponentStore_lit.comp | 2 +- .../object/ObjUniformBlock_TestAlign_lit.frag | 2 +- .../ObjUniformBlock_TestDirectIndex_lit.frag | 4 +- ...ObjUniformBlock_TestIndirectIndex_lit.frag | 2 +- ...jUniformBlock_TestLoadBasicDouble_lit.vert | 2 +- ...bjUniformBlock_TestLoadBasicFloat_lit.vert | 2 +- .../ObjUniformBlock_TestLoadBasicInt_lit.vert | 2 +- ...ObjUniformBlock_TestLoadBasicUint_lit.vert | 2 +- ...formBlock_TestLoadFromMatrixArray_lit.vert | 2 +- ...bjUniformBlock_TestLoadFromMatrix_lit.vert | 2 +- ...mBlock_TestLoadFromRowMajorMatrix_lit.frag | 2 +- ...ock_TestLoadFromScalarVectorArray_lit.vert | 2 +- .../ObjUniformBlock_TestLoadMatrix_lit.vert | 2 +- ...ormBlock_TestLoadMixedMatrixStyle_lit.frag | 2 +- ...UniformBlock_TestLoadNestedStruct_lit.vert | 2 +- ...iformBlock_TestLoadRowMajorMatrix_lit.frag | 2 +- ...jUniformBlock_TestLoadScalarArray_lit.vert | 2 +- .../ObjUniformBlock_TestLoadStruct_lit.vert | 2 +- ...jUniformBlock_TestLoadVectorArray_lit.vert | 2 +- .../ObjUniformBlock_TestOffset_lit.frag | 2 +- .../ObjUniformConstant_TestArray_lit.frag | 2 +- .../ObjUniformConstant_TestSimple_lit.frag | 4 +- .../shaderdb/object/ObjXfb_TestBasic_lit.vert | 2 +- .../PipelineRays_TestWaveSize.pipe | 332 ++++++++++++++++++ .../shaderdb/ray_tracing/TestContState.rchit | 47 +++ .../PipelineVsFs_EnableColorExport.pipe | 2 +- .../PipelineVsFs_MultiDwordPushConst.pipe | 2 +- ...Fs_TestRelocatableSeparateCompilation.pipe | 6 +- llpc/translator/lib/SPIRV/SPIRVReader.cpp | 19 +- .../lib/SPIRV/libSPIRV/SPIRVInstruction.h | 12 +- llpc/util/llpcTimerProfiler.cpp | 14 +- llpc/util/llpcTimerProfiler.h | 16 +- llvmraytracing/CMakeLists.txt | 4 +- llvmraytracing/include/lgc/LgcCpsDialect.td | 18 +- .../include/llvmraytracing/Continuations.h | 28 +- .../llvmraytracing/ContinuationsUtil.h | 17 +- llvmraytracing/lib/CleanupContinuations.cpp | 4 +- llvmraytracing/lib/ContStateBuilder.cpp | 117 ++++-- llvmraytracing/lib/Continuations.cpp | 200 +++++------ .../lib/DXILContPrepareGpurtLibrary.cpp | 61 ++-- .../lib/LowerRaytracingPipeline.cpp | 118 ++++--- .../lib/{DXILSupport.cpp => RematSupport.cpp} | 155 +++++++- llvmraytracing/lib/RematSupport.h | 56 +++ .../lib/SpecializeDriverShaders.cpp | 5 +- .../test/intrinsics/get-func-addr.ll | 2 +- .../test/intrinsics/shader-start.ll | 5 +- llvmraytracing/test/lgccps/alloca-select.ll | 2 - llvmraytracing/test/lgccps/await-if-else.ll | 2 - llvmraytracing/test/lgccps/await-if.ll | 2 - llvmraytracing/test/lgccps/await-in-loop.ll | 2 - .../test/lgccps/call-shader-i1-payload.ll | 2 - .../test/lgccps/cleanup-store-loads.ll | 2 - llvmraytracing/test/lgccps/cps-no-await.ll | 2 - .../test/lgccps/entry-point-with-cps.ll | 2 - .../cont-payload-registers-get-i32.ll | 10 +- .../cont-payload-registers-i32-count.ll | 9 +- .../cont-payload-registers-set-i32.ll | 10 +- llvmraytracing/test/lgccps/multiple-await.ll | 2 - .../test/lgccps/simple-await-more-state.ll | 2 - llvmraytracing/test/lgccps/simple-await.ll | 2 - .../lgccps/traversal-padding-hitattr-size.ll | 17 +- script/gc-amdvlk-docker-images.py | 127 ------- script/spv-to-shaderdb-test.py | 4 +- script/switch-coding-style.sh | 8 +- test/query_gfxip.py | 3 +- tool/dumper/vkgcPipelineDumper.cpp | 10 +- tool/update_llpc_test_checks.py | 4 +- tool/vfx/vfxPipelineDoc.cpp | 7 +- tool/vfx/vfxPipelineDoc.h | 7 +- tool/vfx/vfxVkSection.h | 36 +- util/vkgcUtil.cpp | 12 +- version/CMakeLists.txt | 71 +--- version/include/llpc/GpurtIntrinsics.h | 5 +- version/include/llpcVersion.h.in | 5 +- 733 files changed, 2913 insertions(+), 2265 deletions(-) create mode 100644 lgc/include/lgc/lowering/AddBufferOperationMetadata.h rename lgc/include/lgc/{patch => lowering}/AddLoopMetadata.h (96%) rename lgc/include/lgc/{patch => lowering}/ApplyWorkarounds.h (94%) rename lgc/include/lgc/{patch => lowering}/CheckShaderCache.h (94%) rename lgc/include/lgc/{patch => lowering}/CollectImageOperations.h (94%) rename lgc/include/lgc/{patch => lowering}/CollectResourceUsage.h (97%) rename lgc/include/lgc/{patch => lowering}/CombineCooperativeMatrix.h (95%) rename lgc/include/lgc/{patch => lowering}/Continufy.h (97%) rename lgc/include/lgc/{patch => lowering}/FragmentColorExport.h (99%) rename lgc/include/lgc/{patch => lowering}/GenerateCopyShader.h (96%) rename lgc/include/lgc/{patch => lowering}/IncludeLlvmIr.h (95%) rename lgc/include/lgc/{patch => lowering}/InitializeWorkgroupMemory.h (91%) rename lgc/include/lgc/{patch => lowering}/LgcLowering.h (95%) rename lgc/include/lgc/{patch => lowering}/LowerBufferOperations.h (97%) rename lgc/include/lgc/{patch => lowering}/LowerCooperativeMatrix.h (99%) rename lgc/include/lgc/{patch => lowering}/LowerDebugPrintf.h (96%) rename lgc/include/lgc/{patch => lowering}/LowerDesc.h (96%) rename lgc/include/lgc/{patch => lowering}/LowerGpuRt.h (98%) rename lgc/include/lgc/{patch => lowering}/LowerImageDerivatives.h (94%) rename lgc/include/lgc/{patch => lowering}/LowerInOut.h (98%) rename lgc/include/lgc/{patch => lowering}/LowerInvariantLoads.h (97%) rename lgc/include/lgc/{patch => lowering}/LowerMulDx9Zero.h (93%) rename lgc/include/lgc/{patch => lowering}/LowerReadFirstLane.h (97%) rename lgc/include/lgc/{patch => lowering}/LowerSubgroupOps.h (95%) rename lgc/include/lgc/{patch => lowering}/MutateEntryPoint.h (98%) rename lgc/include/lgc/{patch => lowering}/PassthroughHullShader.h (93%) rename lgc/include/lgc/{patch => lowering}/PeepholeOptimization.h (93%) rename lgc/include/lgc/{patch => lowering}/PreparePipelineAbi.h (97%) rename lgc/include/lgc/{patch => lowering}/ScalarizeLoads.h (93%) rename lgc/include/lgc/{patch => lowering}/SetupTargetFeatures.h (95%) rename lgc/include/lgc/{patch => lowering}/ShaderInputs.h (99%) rename lgc/include/lgc/{patch => lowering}/StructurizeBuffers.h (91%) rename lgc/include/lgc/{patch => lowering}/SystemValues.h (99%) rename lgc/include/lgc/{patch => lowering}/VertexFetch.h (88%) rename lgc/include/lgc/{patch => lowering}/WorkaroundDsSubdwordWrite.h (94%) rename lgc/{patch => lowering}/AddLoopMetadata.cpp (98%) rename lgc/{patch => lowering}/ApplyWorkarounds.cpp (98%) rename lgc/{patch => lowering}/CheckShaderCache.cpp (97%) rename lgc/{patch => lowering}/CollectImageOperations.cpp (93%) rename lgc/{patch => lowering}/CollectResourceUsage.cpp (99%) rename lgc/{patch => lowering}/CombineCooperativeMatrix.cpp (99%) rename lgc/{patch => lowering}/ConfigBuilderBase.cpp (99%) rename lgc/{patch => lowering}/ConfigBuilderBase.h (99%) rename lgc/{patch => lowering}/Continufy.cpp (97%) rename lgc/{patch => lowering}/FragmentColorExport.cpp (99%) rename lgc/{patch => lowering}/GenerateCopyShader.cpp (99%) rename lgc/{patch => lowering}/GenerateNullFragmentShader.cpp (95%) rename lgc/{patch => lowering}/GenerateNullFragmentShader.h (95%) rename lgc/{patch => lowering}/IncludeLlvmIr.cpp (96%) rename lgc/{patch => lowering}/InitializeWorkgroupMemory.cpp (87%) rename lgc/{patch => lowering}/LgcLowering.cpp (92%) rename lgc/{patch => lowering}/LowerBufferOperations.cpp (99%) rename lgc/{patch => lowering}/LowerCooperativeMatrix.cpp (97%) rename lgc/{patch => lowering}/LowerDebugPrintf.cpp (97%) rename lgc/{patch => lowering}/LowerDesc.cpp (95%) rename lgc/{patch => lowering}/LowerGpuRt.cpp (99%) rename lgc/{patch => lowering}/LowerImageDerivatives.cpp (96%) rename lgc/{patch => lowering}/LowerInOut.cpp (99%) rename lgc/{patch => lowering}/LowerInvariantLoads.cpp (98%) rename lgc/{patch => lowering}/LowerMulDx9Zero.cpp (95%) rename lgc/{patch => lowering}/LowerPopsInterlock.cpp (98%) rename lgc/{patch => lowering}/LowerPopsInterlock.h (97%) rename lgc/{patch => lowering}/LowerRayQueryWrapper.cpp (96%) rename lgc/{patch => lowering}/LowerRayQueryWrapper.h (95%) rename lgc/{patch => lowering}/LowerReadFirstLane.cpp (99%) rename lgc/{patch => lowering}/LowerSubgroupOps.cpp (95%) rename lgc/{patch => lowering}/MeshTaskShader.cpp (99%) rename lgc/{patch => lowering}/MeshTaskShader.h (98%) rename lgc/{patch => lowering}/MutateEntryPoint.cpp (99%) rename lgc/{patch => lowering}/NggPrimShader.cpp (99%) rename lgc/{patch => lowering}/NggPrimShader.h (99%) rename lgc/{patch => lowering}/PassRegistry.inc (94%) rename lgc/{patch => lowering}/PassthroughHullShader.cpp (98%) rename lgc/{patch => lowering}/PeepholeOptimization.cpp (97%) rename lgc/{patch => lowering}/PreparePipelineAbi.cpp (99%) rename lgc/{patch => lowering}/RegisterMetadataBuilder.cpp (99%) rename lgc/{patch => lowering}/RegisterMetadataBuilder.h (97%) rename lgc/{patch => lowering}/ScalarizeLoads.cpp (97%) rename lgc/{patch => lowering}/SetupTargetFeatures.cpp (97%) rename lgc/{patch => lowering}/ShaderInputs.cpp (99%) rename lgc/{patch => lowering}/ShaderMerger.cpp (99%) rename lgc/{patch => lowering}/ShaderMerger.h (98%) rename lgc/{patch => lowering}/StructurizeBuffers.cpp (96%) rename lgc/{patch => lowering}/SystemValues.cpp (99%) rename lgc/{patch => lowering}/VertexFetch.cpp (90%) rename lgc/{patch => lowering}/WorkaroundDsSubdwordWrite.cpp (95%) delete mode 100644 llpc/test/shaderdb/gfx11/ray_tracing/Shader_0x04BDF3B158225AFA.spv delete mode 100644 llpc/test/shaderdb/gfx11/ray_tracing/Shader_0x89ABD17F2942EFC4.spv delete mode 100644 llpc/test/shaderdb/gfx11/ray_tracing/Shader_0xAD98DA756C353EFE.spv delete mode 100644 llpc/test/shaderdb/gfx11/ray_tracing/Shader_0xE7D0EF376FDDEA56.spv delete mode 100644 llpc/test/shaderdb/gfx11/ray_tracing/Shader_0xF10BE264545A9F4B.spv create mode 100644 llpc/test/shaderdb/ray_tracing/PipelineRays_TestWaveSize.pipe create mode 100644 llpc/test/shaderdb/ray_tracing/TestContState.rchit rename llvmraytracing/lib/{DXILSupport.cpp => RematSupport.cpp} (60%) create mode 100644 llvmraytracing/lib/RematSupport.h delete mode 100755 script/gc-amdvlk-docker-images.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 6616314223..669411ac49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -33,12 +33,9 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(LLPC_IS_STANDALONE ON) endif() -### Find LLVM (needed by llpc_version.cmake). -include("cmake/findllvm.cmake") - -### Version info ### +### Version info ####################################################################################################### +# Also runs findllvm.cmake. include(cmake/llpc_version.cmake) - add_llpc_version_projects() ### Cached Project Options ############################################################################################# diff --git a/cmake/llpc_version.cmake b/cmake/llpc_version.cmake index 32d82f577e..ee029391bc 100644 --- a/cmake/llpc_version.cmake +++ b/cmake/llpc_version.cmake @@ -1,7 +1,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -25,12 +25,59 @@ set(LLPC_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/..") -include("${LLPC_SOURCE_DIR}/cmake/findllvm.cmake") +# Function to set variable named ${varName} to the first of: +# +# - the value it already has (which might be set by driver or developer); +# - the value of the variable whose name has PAL_ instead of LLPC_ (which might be set by driver or developer); +# - the given default. +# +# Then, if the value is true, the function adds it to the target_compile_definitions of ${target} at +# scope ${scope}, and appends the setting to LLPC_SET_PROPERTY_SUMMARY_${target} for the caller to report the +# summary. +# +# This function is defined here so that multiple components in the LLPC repo, starting with llvm_version, +# can use it. +# +function(llpc_set_property target scope varName default propertyName) + if (NOT DEFINED ${varName}) + string(REGEX REPLACE "^[A-Z][A-Z]*_(.*)$" "PAL_\\1" palVarName "${varName}") + if (DEFINED ${palVarName}) + set(${varName} ${${palVarName}}) + else() + set(${varName} ${default}) + endif() + # For an LLPC_ variable, cache it as an option so that GPURT can see it. + if ("${varName}" MATCHES "^LLPC_") + option(${varName} "Support ${varName}?" ${${varName}}) + endif() + set(${varName} ${${varName}} PARENT_SCOPE) + endif() + if (${${varName}}) + target_compile_definitions(${target} ${scope} ${varName}=1) + set(LLPC_SET_PROPERTY_SUMMARY_${target} + "${LLPC_SET_PROPERTY_SUMMARY_${target}} ${varName}=${${varName}}" PARENT_SCOPE) + endif() +endfunction() + +if (FALSE + OR ICD_BUILD_LLPC +) -macro(add_llpc_version_projects) - if (NOT TARGET llpc_version) - # Force the binary directory to account for the possibility that LLPC is - # taken from an external source directory. - add_subdirectory(${LLPC_SOURCE_DIR}/version ${CMAKE_CURRENT_BINARY_DIR}/llpc_version) + # Find LLVM source. + if (NOT DISABLE_LLPC_VERSION_USES_LLVM) + include("${LLPC_SOURCE_DIR}/cmake/findllvm.cmake") endif() -endmacro() + + # Macro for caller to call the llpc_version CMakeLists.txt and add its target. + macro(add_llpc_version_projects) + if (NOT TARGET llpc_version) + # Force the binary directory to account for the possibility that LLPC is + # taken from an external source directory. + add_subdirectory(${LLPC_SOURCE_DIR}/version ${CMAKE_CURRENT_BINARY_DIR}/llpc_version) + endif() + endmacro() + +else() + macro(add_llpc_version_projects) + endmacro() +endif() diff --git a/cmake/llvm.cmake b/cmake/llvm.cmake index 640a7fbe71..107824b670 100644 --- a/cmake/llvm.cmake +++ b/cmake/llvm.cmake @@ -1,7 +1,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -45,7 +45,7 @@ set(LLVM_INCLUDE_UTILS ON CACHE BOOL "LLVM include utils") set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "LLVM enable terminfo") set(LLVM_RAM_PER_TABLEGEN_JOB 4000 CACHE STRING "LLVM RAM per tablegen job") set(LLVM_RAM_PER_LINK_JOB 5000 CACHE STRING "LLVM RAM per link job") -if(CMAKE_BUILD_TYPE_DEBUG) +if("${CMAKE_BUILD_TYPE}" STREQUAL Debug) # Build optimized version of llvm-tblgen even in debug builds, for faster build times. set(LLVM_OPTIMIZED_TABLEGEN ON CACHE BOOL "Build optimized llvm-tblgen") #if _WIN32 diff --git a/docs/DdnRelocatableShaderElf.md b/docs/DdnRelocatableShaderElf.md index ee5ec5cefe..e217a789c0 100644 --- a/docs/DdnRelocatableShaderElf.md +++ b/docs/DdnRelocatableShaderElf.md @@ -110,7 +110,7 @@ and the `.vertexInputs` metadata to load all of the vertex input attributes into registers. See the `FetchShader` class in [GlueShader.cpp](../lgc/elfLinker/GlueShader.cpp) for the generation of the prologue. To see how the unlinked shader handles vertex inputs see the -`LowerVertexFetch` pass in [VertexFetch.cpp](../lgc/patch/VertexFetch.cpp). +`LowerVertexFetch` pass in [VertexFetch.cpp](../lgc/lowering/VertexFetch.cpp). A fragment shader will require a epilogue to export its outputs. The unlinked fragment shader will have the standard name for the fragment shader. Instead of @@ -122,7 +122,7 @@ appended to the end of the unlinked shader. See the `ColorExportShader` class in [GlueShader.cpp](../lgc/elfLinker/GlueShader.cpp) for the generation of the epilogue. To see how the unlinked shader handles color export see the `LowerFragmentColorExport` pass in -[FragmentColorExport.cpp](../lgc/patch/FragmentColorExport.cpp). +[FragmentColorExport.cpp](../lgc/lowering/FragmentColorExport.cpp). These epilogues and prologues mean that unlinked shaders do not have to depend on the format of the vertex input attributes and color exports. diff --git a/include/vkgcDefs.h b/include/vkgcDefs.h index 44fbb1280b..6f908b7d29 100644 --- a/include/vkgcDefs.h +++ b/include/vkgcDefs.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -233,6 +233,9 @@ enum InternalBinding : unsigned { SpecConstInternalBufferBindingIdEnd = SpecConstInternalBufferBindingId + ShaderStageCount, ConstantBuffer0Binding = 24, ///< Binding ID of default uniform block ConstantBuffer0BindingEnd = ConstantBuffer0Binding + ShaderStageGfxCount, + DescHeapBufferBindingId = 32, ///< Binding ID of internal buffer for buffer descriptor heap. + DescHeapImageBindingId = 33, ///< Binding ID of internal buffer for image descriptor heap. + DescHeapSamplerBindingId = 34, ///< Binding ID of internal buffer for sampler descriptor heap. }; /// Internal vertex attribute location start from 0. @@ -494,26 +497,7 @@ struct PipelineOptions { bool internalRtShaders; ///< Whether this pipeline has internal raytracing shaders unsigned forceNonUniformResourceIndexStageMask; ///< Mask of the stage to force using non-uniform resource index. bool reserved16; -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 73 - bool replaceSetWithResourceType; ///< For OGL only, replace 'set' with resource type during spirv translate - bool disableSampleMask; ///< For OGL only, disabled if framebuffer doesn't attach multisample texture - bool buildResourcesDataForShaderModule; ///< For OGL only, build resources usage data while building shader module - bool disableTruncCoordForGather; ///< If set, trunc_coord of sampler srd is disabled for gather4 - bool enableCombinedTexture; ///< For OGL only, use the 'set' for DescriptorCombinedTexture - ///< for sampled images and samplers - bool vertex64BitsAttribSingleLoc; ///< For OGL only, dvec3/dvec4 vertex attrib only consumes 1 location. - bool enableFragColor; ///< For OGL only, need to do frag color broadcast if it is enabled. - bool disableBaseVertex; ///< For OGL only, force the BaseVertex builtin to 0 instead of - /// loading it from userdata - bool bindlessTextureMode; ///< For OGL only, true if bindless textures are used - bool bindlessImageMode; ///< For OGL only, true if bindless images are used - bool enablePolygonStipple; ///< For OGL only, enable polygon stipple pattern. - bool enableLineSmooth; ///< For OGL only, enable line smooth mode. - bool emulateWideLineStipple; ///< For OGL only, enable line AA stipple. - bool enablePointSmooth; ///< For OGL only, enable point smooth mode. - bool enableRemapLocation; ///< For OGL only, enables location remapping. - const auto &getGlState() const { return *this; } -#else + struct GLState { bool replaceSetWithResourceType; ///< For OGL only, replace 'set' with resource type during spirv translate bool disableSampleMask; ///< For OGL only, disabled if framebuffer doesn't attach multisample texture @@ -533,7 +517,7 @@ struct PipelineOptions { bool enableRemapLocation; ///< For OGL only, enables location remapping. } glState; const auto &getGlState() const { return glState; } -#endif + unsigned reserved20; bool enablePrimGeneratedQuery; ///< If set, primitive generated query is enabled bool disablePerCompFetch; ///< Disable per component fetch in uber fetch shader. @@ -1386,15 +1370,7 @@ struct GraphicsPipelineBuildInfo { BinaryData shaderLibrary; ///< SPIR-V library binary data #endif RtState rtState; ///< Ray tracing state -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 71 - bool originUpperLeft; ///< Whether origin coordinate of framebuffer is upper-left. - unsigned numUniformConstantMaps; ///< Number of uniform constant maps - UniformConstantMap **ppUniformMaps; ///< Pointers to array of pointers for the uniform constant map. - ApiXfbOutData apiXfbOutData; ///< Transform feedback data specified by API interface. - bool vbAddressLowBitsKnown; ///< Whether vbAddressLowBits is valid - uint8_t vbAddressLowBits[MaxVertexBindings]; ///< Lowest two bits of vertex buffer addresses - const auto &getGlState() const { return *this; } -#else + struct { bool originUpperLeft; ///< Whether origin coordinate of framebuffer is upper-left. bool vbAddressLowBitsKnown; ///< Whether vbAddressLowBits is valid @@ -1417,7 +1393,7 @@ struct GraphicsPipelineBuildInfo { AlphaTestFunc alphaTestFunc; ///< AlphaTestFunc type } glState; const auto &getGlState() const { return glState; } -#endif + const void *pClientMetadata; ///< Pointer to (optional) client-defined data to be stored inside the ELF size_t clientMetadataSize; ///< Size (in bytes) of the client-defined data AdvancedBlendInfo advancedBlendInfo; ///< The info of advanced blend diff --git a/lgc/CMakeLists.txt b/lgc/CMakeLists.txt index f0a3a07420..79e2021fd5 100644 --- a/lgc/CMakeLists.txt +++ b/lgc/CMakeLists.txt @@ -1,7 +1,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -156,90 +156,90 @@ target_sources(LLVMlgc PRIVATE elfLinker/NullFragmentShader.h ) -# lgc/patch +# lgc/lowering target_sources(LLVMlgc PRIVATE - patch/ConfigBuilderBase.cpp - patch/Continufy.cpp - patch/FragmentColorExport.cpp - patch/LowerDebugPrintf.cpp - patch/LowerDesc.cpp - patch/LowerPopsInterlock.cpp - patch/LowerSubgroupOps.cpp - patch/MeshTaskShader.cpp - patch/NggPrimShader.cpp - patch/LgcLowering.cpp - patch/StructurizeBuffers.cpp - patch/LowerBufferOperations.cpp - patch/CheckShaderCache.cpp - patch/GenerateCopyShader.cpp - patch/MutateEntryPoint.cpp - patch/LowerImageDerivatives.cpp - patch/LowerInOut.cpp - patch/LowerInvariantLoads.cpp - patch/IncludeLlvmIr.cpp - patch/InitializeWorkgroupMemory.cpp - patch/ScalarizeLoads.cpp - patch/LowerMulDx9Zero.cpp - patch/AddLoopMetadata.cpp - patch/GenerateNullFragmentShader.cpp - patch/PeepholeOptimization.cpp - patch/PreparePipelineAbi.cpp - patch/LowerReadFirstLane.cpp - patch/CollectResourceUsage.cpp - patch/SetupTargetFeatures.cpp - patch/PassthroughHullShader.cpp - patch/ApplyWorkarounds.cpp - patch/ShaderInputs.cpp - patch/ShaderMerger.cpp - patch/SystemValues.cpp - patch/VertexFetch.cpp - patch/CollectImageOperations.cpp - patch/RegisterMetadataBuilder.cpp + lowering/ConfigBuilderBase.cpp + lowering/Continufy.cpp + lowering/FragmentColorExport.cpp + lowering/LowerDebugPrintf.cpp + lowering/LowerDesc.cpp + lowering/LowerPopsInterlock.cpp + lowering/LowerSubgroupOps.cpp + lowering/MeshTaskShader.cpp + lowering/NggPrimShader.cpp + lowering/LgcLowering.cpp + lowering/StructurizeBuffers.cpp + lowering/LowerBufferOperations.cpp + lowering/CheckShaderCache.cpp + lowering/GenerateCopyShader.cpp + lowering/MutateEntryPoint.cpp + lowering/LowerImageDerivatives.cpp + lowering/LowerInOut.cpp + lowering/LowerInvariantLoads.cpp + lowering/IncludeLlvmIr.cpp + lowering/InitializeWorkgroupMemory.cpp + lowering/ScalarizeLoads.cpp + lowering/LowerMulDx9Zero.cpp + lowering/AddLoopMetadata.cpp + lowering/GenerateNullFragmentShader.cpp + lowering/PeepholeOptimization.cpp + lowering/PreparePipelineAbi.cpp + lowering/LowerReadFirstLane.cpp + lowering/CollectResourceUsage.cpp + lowering/SetupTargetFeatures.cpp + lowering/PassthroughHullShader.cpp + lowering/ApplyWorkarounds.cpp + lowering/ShaderInputs.cpp + lowering/ShaderMerger.cpp + lowering/SystemValues.cpp + lowering/VertexFetch.cpp + lowering/CollectImageOperations.cpp + lowering/RegisterMetadataBuilder.cpp #if LLPC_BUILD_STRIX1 - patch/WorkaroundDsSubdwordWrite.cpp + lowering/WorkaroundDsSubdwordWrite.cpp #endif - patch/CombineCooperativeMatrix.cpp - patch/LowerCooperativeMatrix.cpp - patch/LowerGpuRt.cpp - patch/LowerRayQueryWrapper.cpp + lowering/CombineCooperativeMatrix.cpp + lowering/LowerCooperativeMatrix.cpp + lowering/LowerGpuRt.cpp + lowering/LowerRayQueryWrapper.cpp ) -# include/lgc/patch +# include/lgc/lowering target_sources(LLVMlgc PRIVATE - include/lgc/patch/AddLoopMetadata.h - include/lgc/patch/ApplyWorkarounds.h - include/lgc/patch/CheckShaderCache.h - include/lgc/patch/CollectImageOperations.h - include/lgc/patch/CollectResourceUsage.h - include/lgc/patch/CombineCooperativeMatrix.h - include/lgc/patch/Continufy.h - include/lgc/patch/FragmentColorExport.h - include/lgc/patch/GenerateCopyShader.h - include/lgc/patch/IncludeLlvmIr.h - include/lgc/patch/InitializeWorkgroupMemory.h - include/lgc/patch/LgcLowering.h - include/lgc/patch/LowerBufferOperations.h - include/lgc/patch/LowerCooperativeMatrix.h - include/lgc/patch/LowerDebugPrintf.h - include/lgc/patch/LowerDesc.h - include/lgc/patch/LowerGpuRt.h - include/lgc/patch/LowerImageDerivatives.h - include/lgc/patch/LowerInOut.h - include/lgc/patch/LowerInvariantLoads.h - include/lgc/patch/LowerMulDx9Zero.h - include/lgc/patch/LowerReadFirstLane.h - include/lgc/patch/LowerSubgroupOps.h - include/lgc/patch/MutateEntryPoint.h - include/lgc/patch/PassthroughHullShader.h - include/lgc/patch/PeepholeOptimization.h - include/lgc/patch/PreparePipelineAbi.h - include/lgc/patch/ScalarizeLoads.h - include/lgc/patch/SetupTargetFeatures.h - include/lgc/patch/ShaderInputs.h - include/lgc/patch/StructurizeBuffers.h - include/lgc/patch/SystemValues.h - include/lgc/patch/VertexFetch.h - include/lgc/patch/WorkaroundDsSubdwordWrite.h + include/lgc/lowering/AddLoopMetadata.h + include/lgc/lowering/ApplyWorkarounds.h + include/lgc/lowering/CheckShaderCache.h + include/lgc/lowering/CollectImageOperations.h + include/lgc/lowering/CollectResourceUsage.h + include/lgc/lowering/CombineCooperativeMatrix.h + include/lgc/lowering/Continufy.h + include/lgc/lowering/FragmentColorExport.h + include/lgc/lowering/GenerateCopyShader.h + include/lgc/lowering/IncludeLlvmIr.h + include/lgc/lowering/InitializeWorkgroupMemory.h + include/lgc/lowering/LgcLowering.h + include/lgc/lowering/LowerBufferOperations.h + include/lgc/lowering/LowerCooperativeMatrix.h + include/lgc/lowering/LowerDebugPrintf.h + include/lgc/lowering/LowerDesc.h + include/lgc/lowering/LowerGpuRt.h + include/lgc/lowering/LowerImageDerivatives.h + include/lgc/lowering/LowerInOut.h + include/lgc/lowering/LowerInvariantLoads.h + include/lgc/lowering/LowerMulDx9Zero.h + include/lgc/lowering/LowerReadFirstLane.h + include/lgc/lowering/LowerSubgroupOps.h + include/lgc/lowering/MutateEntryPoint.h + include/lgc/lowering/PassthroughHullShader.h + include/lgc/lowering/PeepholeOptimization.h + include/lgc/lowering/PreparePipelineAbi.h + include/lgc/lowering/ScalarizeLoads.h + include/lgc/lowering/SetupTargetFeatures.h + include/lgc/lowering/ShaderInputs.h + include/lgc/lowering/StructurizeBuffers.h + include/lgc/lowering/SystemValues.h + include/lgc/lowering/VertexFetch.h + include/lgc/lowering/WorkaroundDsSubdwordWrite.h ) # lgc/state diff --git a/lgc/builder/DescBuilder.cpp b/lgc/builder/DescBuilder.cpp index e74fbf234b..fbd99d5183 100644 --- a/lgc/builder/DescBuilder.cpp +++ b/lgc/builder/DescBuilder.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -96,8 +96,9 @@ Value *BuilderImpl::createBufferDesc(uint64_t descSet, unsigned binding, Value * if (!node) report_fatal_error("Resource node not found"); - const bool isCompact = (node && (node->concreteType == ResourceNodeType::DescriptorBufferCompact || - node->concreteType == ResourceNodeType::DescriptorConstBufferCompact)); + const bool isCompact = node && (node->concreteType == ResourceNodeType::DescriptorBufferCompact || + node->concreteType == ResourceNodeType::DescriptorConstBufferCompact); + const bool globallyCoherent = flags & BufferFlagCoherent; if (node == topNode && isa(descIndex) && node->concreteType != ResourceNodeType::InlineBuffer) { // Handle a descriptor in the root table (a "dynamic descriptor") specially, as long as it is not variably @@ -119,7 +120,6 @@ Value *BuilderImpl::createBufferDesc(uint64_t descSet, unsigned binding, Value * if (return64Address) return desc; assert(convertFatPointer); - bool globallyCoherent = flags & BufferFlagCoherent; if (isCompact) { desc = CreateBitCast(desc, getInt64Ty()); if (stride == 0) @@ -140,9 +140,9 @@ Value *BuilderImpl::createBufferDesc(uint64_t descSet, unsigned binding, Value * assert(convertFatPointer); desc = CreatePtrToInt(descPtr, getInt64Ty()); if (stride == 0) - desc = create(desc, false); + desc = create(desc, globallyCoherent); else - desc = create(desc, getInt32(stride), false); + desc = create(desc, getInt32(stride), globallyCoherent); } else { ResourceNodeType resType = node->concreteType; ResourceNodeType abstractType = node->abstractType; @@ -171,7 +171,6 @@ Value *BuilderImpl::createBufferDesc(uint64_t descSet, unsigned binding, Value * descPtr = CreateBitCast(descPtr, getDescPtrTy()); if (convertFatPointer) { bool forceRawView = flags & BufferFlagForceRawView; - bool globallyCoherent = flags & BufferFlagCoherent; if (stride == 0) desc = create(descPtr, forceRawView, isCompact, globallyCoherent); else diff --git a/lgc/builder/ImageBuilder.cpp b/lgc/builder/ImageBuilder.cpp index 86d7bed32d..48048837a7 100644 --- a/lgc/builder/ImageBuilder.cpp +++ b/lgc/builder/ImageBuilder.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -637,14 +637,7 @@ Value *BuilderImpl::CreateImageLoad(Type *resultTy, unsigned dim, unsigned flags args.push_back(imageDesc); args.push_back(getInt32(tfe)); - // glc/dlc bits - CoherentFlag coherent = {}; - if (m_pipelineState->getTargetInfo().getGfxIpVersion().major <= 11) { - if (flags & (ImageFlagCoherent | ImageFlagVolatile)) { - coherent.bits.glc = true; - coherent.bits.dlc = true; - } - } + CoherentFlag coherent = getImageCoherentFlag(flags, true); args.push_back(getInt32(coherent.u32All)); @@ -860,13 +853,7 @@ Value *BuilderImpl::CreateImageStore(Value *texel, unsigned dim, unsigned flags, args.push_back(imageDesc); args.push_back(getInt32(0)); // tfe/lwe - // glc bit - CoherentFlag coherent = {}; - if (m_pipelineState->getTargetInfo().getGfxIpVersion().major <= 11) { - if (flags & (ImageFlagCoherent | ImageFlagVolatile)) { - coherent.bits.glc = true; - } - } + CoherentFlag coherent = getImageCoherentFlag(flags, false); args.push_back(getInt32(coherent.u32All)); @@ -1231,14 +1218,7 @@ Value *BuilderImpl::CreateImageSampleGather(Type *resultTy, unsigned dim, unsign bool tfe = isa(resultTy); args.push_back(getInt32(tfe)); - // glc/dlc bits - CoherentFlag coherent = {}; - if (m_pipelineState->getTargetInfo().getGfxIpVersion().major <= 11) { - if (flags & (ImageFlagCoherent | ImageFlagVolatile)) { - coherent.bits.glc = true; - coherent.bits.dlc = true; - } - } + CoherentFlag coherent = getImageCoherentFlag(flags, true); args.push_back(getInt32(coherent.u32All)); @@ -2343,3 +2323,32 @@ bool BuilderImpl::isUniformDescriptor(Value *descPtr, unsigned flags, bool isIma } return worklist.empty(); } + +// ===================================================================================================================== +// Get CoherentFlag for image read/write operations. +// +// @param flags : Image flags +// @param isRead : Whether is a image read operation +CoherentFlag BuilderImpl::getImageCoherentFlag(unsigned flags, bool isRead) { + CoherentFlag coherent = {}; + + // Images declared as volatile are automatically treated as coherent. + if (flags & ImageFlagVolatile) + flags |= ImageFlagCoherent; + + if (m_pipelineState->getTargetInfo().getGfxIpVersion().major <= 10) { + if (flags & ImageFlagCoherent) { + coherent.bits.glc = true; + coherent.bits.dlc = isRead; + } + } else if (m_pipelineState->getTargetInfo().getGfxIpVersion().major == 11) { + // On gfx11 glc is only used for load operations. + if (isRead && (flags & ImageFlagCoherent)) + coherent.bits.glc = true; + + if (flags & ImageFlagLlcNoAlloc) + coherent.bits.dlc = true; + } + + return coherent; +} diff --git a/lgc/builder/InOutBuilder.cpp b/lgc/builder/InOutBuilder.cpp index 9f39a854ea..e2095500f4 100644 --- a/lgc/builder/InOutBuilder.cpp +++ b/lgc/builder/InOutBuilder.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #include "lgc/LgcContext.h" #include "lgc/LgcDialect.h" #include "lgc/builder/BuilderImpl.h" -#include "lgc/patch/ShaderInputs.h" +#include "lgc/lowering/ShaderInputs.h" #include "lgc/state/AbiUnlinked.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" diff --git a/lgc/elfLinker/ColorExportShader.cpp b/lgc/elfLinker/ColorExportShader.cpp index 216a7fdab7..99d1a58ed3 100644 --- a/lgc/elfLinker/ColorExportShader.cpp +++ b/lgc/elfLinker/ColorExportShader.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ */ #include "ColorExportShader.h" -#include "lgc/patch/FragmentColorExport.h" +#include "lgc/lowering/FragmentColorExport.h" #include "lgc/state/TargetInfo.h" #include "llvm/IR/IntrinsicsAMDGPU.h" #include "llvm/Target/TargetMachine.h" diff --git a/lgc/elfLinker/ColorExportShader.h b/lgc/elfLinker/ColorExportShader.h index b93021f4fd..496068367b 100644 --- a/lgc/elfLinker/ColorExportShader.h +++ b/lgc/elfLinker/ColorExportShader.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -32,7 +32,7 @@ #pragma once #include "GlueShader.h" -#include "lgc/patch/FragmentColorExport.h" +#include "lgc/lowering/FragmentColorExport.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineState.h" diff --git a/lgc/elfLinker/NullFragmentShader.cpp b/lgc/elfLinker/NullFragmentShader.cpp index b675dc9153..9b27eb6921 100644 --- a/lgc/elfLinker/NullFragmentShader.cpp +++ b/lgc/elfLinker/NullFragmentShader.cpp @@ -30,8 +30,8 @@ */ #include "NullFragmentShader.h" -#include "lgc/patch/FragmentColorExport.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/FragmentColorExport.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/TargetInfo.h" #include "llvm/Target/TargetMachine.h" diff --git a/lgc/include/lgc/builder/BuilderImpl.h b/lgc/include/lgc/builder/BuilderImpl.h index db5fbb5e8d..abce37e4a4 100644 --- a/lgc/include/lgc/builder/BuilderImpl.h +++ b/lgc/include/lgc/builder/BuilderImpl.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -459,6 +459,8 @@ class BuilderImpl : public BuilderDefs { // Check if the descriptor is uniform bool isUniformDescriptor(llvm::Value *descPtr, unsigned flags, bool isImage); + CoherentFlag getImageCoherentFlag(unsigned flags, bool isRead); + enum ImgDataFormat { IMG_DATA_FORMAT_32 = 4, IMG_DATA_FORMAT_8_8_8_8 = 10, diff --git a/lgc/include/lgc/lowering/AddBufferOperationMetadata.h b/lgc/include/lgc/lowering/AddBufferOperationMetadata.h new file mode 100644 index 0000000000..ee6747c6c2 --- /dev/null +++ b/lgc/include/lgc/lowering/AddBufferOperationMetadata.h @@ -0,0 +1,61 @@ +/* + *********************************************************************************************************************** + * + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + **********************************************************************************************************************/ +/** + *********************************************************************************************************************** + * @file AddBufferOperationMetadata.h + * @brief LLPC header file: contains declaration of class lgc::AddBufferOperationMetadata. + *********************************************************************************************************************** + */ +#pragma once + +#include "lgc/state/PipelineState.h" +#include "llvm/IR/Instruction.h" +#include "llvm/IR/IntrinsicInst.h" +#include "llvm/IR/PassManager.h" +#include "llvm/Pass.h" + +namespace lgc { + +// ===================================================================================================================== +// Represents the pass of LGC lowering operations for buffer operations +class AddBufferOperationMetadata : public llvm::PassInfoMixin { +public: + llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManager); + + static llvm::StringRef name() { return "Add metadata for buffer operations"; } + +private: + void visitLoadInst(llvm::LoadInst &loadInst); + void visitStoreInst(llvm::StoreInst &storeInst); + void visitMemCpyInst(llvm::MemCpyInst &memCpyInst); + void visitMemMoveInst(llvm::MemMoveInst &memMoveInst); + void visitMemSetInst(llvm::MemSetInst &memSetInst); + bool isAnyBufferPointer(const llvm::Value *const value); + + llvm::LLVMContext *m_context = nullptr; // Associated LLVM context of the LLVM module that passes run on + llvm::MDNode *m_temporalHint = nullptr; +}; + +} // namespace lgc diff --git a/lgc/include/lgc/patch/AddLoopMetadata.h b/lgc/include/lgc/lowering/AddLoopMetadata.h similarity index 96% rename from lgc/include/lgc/patch/AddLoopMetadata.h rename to lgc/include/lgc/lowering/AddLoopMetadata.h index ef92c65527..552385a81b 100644 --- a/lgc/include/lgc/patch/AddLoopMetadata.h +++ b/lgc/include/lgc/lowering/AddLoopMetadata.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" #include "llvm/Transforms/Scalar/LoopPassManager.h" diff --git a/lgc/include/lgc/patch/ApplyWorkarounds.h b/lgc/include/lgc/lowering/ApplyWorkarounds.h similarity index 94% rename from lgc/include/lgc/patch/ApplyWorkarounds.h rename to lgc/include/lgc/lowering/ApplyWorkarounds.h index 37efa0077f..0f3cce0986 100644 --- a/lgc/include/lgc/patch/ApplyWorkarounds.h +++ b/lgc/include/lgc/lowering/ApplyWorkarounds.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/util/Internal.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/IR/IRBuilder.h" @@ -41,7 +41,7 @@ namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations for applying workarounds: +// Represents the pass of LGC lowering operations for applying workarounds: // // - fix up issues when buffer descriptor is incorrectly given when it should be an image descriptor. Some architectures // require a fix so the hardware will ignore this difference (actually an app error, but common enough to require diff --git a/lgc/include/lgc/patch/CheckShaderCache.h b/lgc/include/lgc/lowering/CheckShaderCache.h similarity index 94% rename from lgc/include/lgc/patch/CheckShaderCache.h rename to lgc/include/lgc/lowering/CheckShaderCache.h index 8fb33b9c02..fc29436c41 100644 --- a/lgc/include/lgc/patch/CheckShaderCache.h +++ b/lgc/include/lgc/lowering/CheckShaderCache.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,14 +30,14 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations for checking shader cache +// Represents the pass of LGC lowering operations for checking shader cache class CheckShaderCache : public Patch, public llvm::PassInfoMixin { public: CheckShaderCache() {} diff --git a/lgc/include/lgc/patch/CollectImageOperations.h b/lgc/include/lgc/lowering/CollectImageOperations.h similarity index 94% rename from lgc/include/lgc/patch/CollectImageOperations.h rename to lgc/include/lgc/lowering/CollectImageOperations.h index 2209478996..ee057bc0f3 100644 --- a/lgc/include/lgc/patch/CollectImageOperations.h +++ b/lgc/include/lgc/lowering/CollectImageOperations.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -37,7 +37,7 @@ namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations for image operations +// Represents the pass of LGC lowering operations for image operations class CollectImageOperations : public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); diff --git a/lgc/include/lgc/patch/CollectResourceUsage.h b/lgc/include/lgc/lowering/CollectResourceUsage.h similarity index 97% rename from lgc/include/lgc/patch/CollectResourceUsage.h rename to lgc/include/lgc/lowering/CollectResourceUsage.h index 633f815119..6758c52dcc 100644 --- a/lgc/include/lgc/patch/CollectResourceUsage.h +++ b/lgc/include/lgc/lowering/CollectResourceUsage.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/IR/InstVisitor.h" @@ -46,7 +46,7 @@ class InOutLocationInfoMapManager; typedef std::map InOutLocationInfoMap; // ===================================================================================================================== -// Represents the pass of LLVM patching operations for resource collecting +// Represents the pass of LGC lowering operations for resource collecting class CollectResourceUsage : public Patch, public llvm::InstVisitor, public llvm::PassInfoMixin { diff --git a/lgc/include/lgc/patch/CombineCooperativeMatrix.h b/lgc/include/lgc/lowering/CombineCooperativeMatrix.h similarity index 95% rename from lgc/include/lgc/patch/CombineCooperativeMatrix.h rename to lgc/include/lgc/lowering/CombineCooperativeMatrix.h index 6b01dbaa55..32d41e9686 100644 --- a/lgc/include/lgc/patch/CombineCooperativeMatrix.h +++ b/lgc/include/lgc/lowering/CombineCooperativeMatrix.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ *********************************************************************************************************************** */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "llvm/IR/PassManager.h" namespace lgc { diff --git a/lgc/include/lgc/patch/Continufy.h b/lgc/include/lgc/lowering/Continufy.h similarity index 97% rename from lgc/include/lgc/patch/Continufy.h rename to lgc/include/lgc/lowering/Continufy.h index 24d116aa87..13b29157d7 100644 --- a/lgc/include/lgc/patch/Continufy.h +++ b/lgc/include/lgc/lowering/Continufy.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/include/lgc/patch/FragmentColorExport.h b/lgc/include/lgc/lowering/FragmentColorExport.h similarity index 99% rename from lgc/include/lgc/patch/FragmentColorExport.h rename to lgc/include/lgc/lowering/FragmentColorExport.h index bff7054e34..8c42dd43a6 100644 --- a/lgc/include/lgc/patch/FragmentColorExport.h +++ b/lgc/include/lgc/lowering/FragmentColorExport.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/include/lgc/patch/GenerateCopyShader.h b/lgc/include/lgc/lowering/GenerateCopyShader.h similarity index 96% rename from lgc/include/lgc/patch/GenerateCopyShader.h rename to lgc/include/lgc/lowering/GenerateCopyShader.h index b32f8b4b6e..127b429006 100644 --- a/lgc/include/lgc/patch/GenerateCopyShader.h +++ b/lgc/include/lgc/lowering/GenerateCopyShader.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,8 +30,8 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" -#include "lgc/patch/SystemValues.h" +#include "lgc/lowering/LgcLowering.h" +#include "lgc/lowering/SystemValues.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/util/BuilderBase.h" diff --git a/lgc/include/lgc/patch/IncludeLlvmIr.h b/lgc/include/lgc/lowering/IncludeLlvmIr.h similarity index 95% rename from lgc/include/lgc/patch/IncludeLlvmIr.h rename to lgc/include/lgc/lowering/IncludeLlvmIr.h index 0e20f5c49c..19255fa3aa 100644 --- a/lgc/include/lgc/patch/IncludeLlvmIr.h +++ b/lgc/include/lgc/lowering/IncludeLlvmIr.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "llvm/IR/PassManager.h" namespace lgc { diff --git a/lgc/include/lgc/patch/InitializeWorkgroupMemory.h b/lgc/include/lgc/lowering/InitializeWorkgroupMemory.h similarity index 91% rename from lgc/include/lgc/patch/InitializeWorkgroupMemory.h rename to lgc/include/lgc/lowering/InitializeWorkgroupMemory.h index 4de8a2c625..b185f51873 100644 --- a/lgc/include/lgc/patch/InitializeWorkgroupMemory.h +++ b/lgc/include/lgc/lowering/InitializeWorkgroupMemory.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/util/BuilderBase.h" @@ -43,11 +43,10 @@ class InitializeWorkgroupMemory final : public Patch, public llvm::PassInfoMixin public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Patch for initialize workgroup memory"; } + static llvm::StringRef name() { return "Initialize workgroup memory"; } private: void initializeWithZero(llvm::GlobalVariable *lds, BuilderBase &builder); - unsigned getTypeSizeInDwords(llvm::Type *inputTy); llvm::DenseMap m_globalLdsOffsetMap; PipelineState *m_pipelineState = nullptr; diff --git a/lgc/include/lgc/patch/LgcLowering.h b/lgc/include/lgc/lowering/LgcLowering.h similarity index 95% rename from lgc/include/lgc/patch/LgcLowering.h rename to lgc/include/lgc/lowering/LgcLowering.h index 36687ed86f..0fe9e8f016 100644 --- a/lgc/include/lgc/patch/LgcLowering.h +++ b/lgc/include/lgc/lowering/LgcLowering.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -46,7 +46,7 @@ class PipelineState; class PassManager; // ===================================================================================================================== -// Represents the pass of LLVM patching operations, as the base class. +// Represents the pass of LGC lowering operations, as the base class. class Patch { public: Patch() : m_module(nullptr), m_context(nullptr), m_entryPoint(nullptr) {} diff --git a/lgc/include/lgc/patch/LowerBufferOperations.h b/lgc/include/lgc/lowering/LowerBufferOperations.h similarity index 97% rename from lgc/include/lgc/patch/LowerBufferOperations.h rename to lgc/include/lgc/lowering/LowerBufferOperations.h index c6b809501b..73c531346c 100644 --- a/lgc/include/lgc/patch/LowerBufferOperations.h +++ b/lgc/include/lgc/lowering/LowerBufferOperations.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -32,7 +32,7 @@ #include "compilerutils/TypeLowering.h" #include "lgc/builder/BuilderImpl.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "llvm-dialects/Dialect/Visitor.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Analysis/UniformityAnalysis.h" @@ -154,7 +154,7 @@ class BufferOpLowering { }; // ===================================================================================================================== -// Represents the pass of LLVM patching operations for buffer operations +// Represents the pass of LGC lowering operations for buffer operations class LowerBufferOperations : public llvm::InstVisitor, public llvm::PassInfoMixin { public: diff --git a/lgc/include/lgc/patch/LowerCooperativeMatrix.h b/lgc/include/lgc/lowering/LowerCooperativeMatrix.h similarity index 99% rename from lgc/include/lgc/patch/LowerCooperativeMatrix.h rename to lgc/include/lgc/lowering/LowerCooperativeMatrix.h index 3a18571d69..df9b15670f 100644 --- a/lgc/include/lgc/patch/LowerCooperativeMatrix.h +++ b/lgc/include/lgc/lowering/LowerCooperativeMatrix.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #pragma once #include "SystemValues.h" #include "lgc/Builder.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" diff --git a/lgc/include/lgc/patch/LowerDebugPrintf.h b/lgc/include/lgc/lowering/LowerDebugPrintf.h similarity index 96% rename from lgc/include/lgc/patch/LowerDebugPrintf.h rename to lgc/include/lgc/lowering/LowerDebugPrintf.h index 8203a4c48c..26beb4b29c 100644 --- a/lgc/include/lgc/patch/LowerDebugPrintf.h +++ b/lgc/include/lgc/lowering/LowerDebugPrintf.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #pragma once #include "SystemValues.h" #include "lgc/Builder.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" diff --git a/lgc/include/lgc/patch/LowerDesc.h b/lgc/include/lgc/lowering/LowerDesc.h similarity index 96% rename from lgc/include/lgc/patch/LowerDesc.h rename to lgc/include/lgc/lowering/LowerDesc.h index 3783453486..dcd65608dc 100644 --- a/lgc/include/lgc/patch/LowerDesc.h +++ b/lgc/include/lgc/lowering/LowerDesc.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #pragma once #include "SystemValues.h" #include "lgc/Builder.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" diff --git a/lgc/include/lgc/patch/LowerGpuRt.h b/lgc/include/lgc/lowering/LowerGpuRt.h similarity index 98% rename from lgc/include/lgc/patch/LowerGpuRt.h rename to lgc/include/lgc/lowering/LowerGpuRt.h index c11e6a5cb8..bd5762d57c 100644 --- a/lgc/include/lgc/patch/LowerGpuRt.h +++ b/lgc/include/lgc/lowering/LowerGpuRt.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/include/lgc/patch/LowerImageDerivatives.h b/lgc/include/lgc/lowering/LowerImageDerivatives.h similarity index 94% rename from lgc/include/lgc/patch/LowerImageDerivatives.h rename to lgc/include/lgc/lowering/LowerImageDerivatives.h index bff2cf408b..c615eb01b8 100644 --- a/lgc/include/lgc/patch/LowerImageDerivatives.h +++ b/lgc/include/lgc/lowering/LowerImageDerivatives.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -37,7 +37,7 @@ namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations for image operations +// Represents the pass of LGC lowering operations for image operations class LowerImageDerivatives : public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); diff --git a/lgc/include/lgc/patch/LowerInOut.h b/lgc/include/lgc/lowering/LowerInOut.h similarity index 98% rename from lgc/include/lgc/patch/LowerInOut.h rename to lgc/include/lgc/lowering/LowerInOut.h index 91c65c273d..b61f0381a4 100644 --- a/lgc/include/lgc/patch/LowerInOut.h +++ b/lgc/include/lgc/lowering/LowerInOut.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #pragma once #include "SystemValues.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" @@ -45,7 +45,7 @@ class EvalIjOffsetSmoothOp; class AdjustIjOp; // ===================================================================================================================== -// Represents the pass of LLVM patching operations for input import and output export. +// Represents the pass of LGC lowering operations for input import and output export. class LowerInOut : public Patch, public llvm::PassInfoMixin { public: LowerInOut(); diff --git a/lgc/include/lgc/patch/LowerInvariantLoads.h b/lgc/include/lgc/lowering/LowerInvariantLoads.h similarity index 97% rename from lgc/include/lgc/patch/LowerInvariantLoads.h rename to lgc/include/lgc/lowering/LowerInvariantLoads.h index 34f17fe77c..b0979e36cd 100644 --- a/lgc/include/lgc/patch/LowerInvariantLoads.h +++ b/lgc/include/lgc/lowering/LowerInvariantLoads.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/include/lgc/patch/LowerMulDx9Zero.h b/lgc/include/lgc/lowering/LowerMulDx9Zero.h similarity index 93% rename from lgc/include/lgc/patch/LowerMulDx9Zero.h rename to lgc/include/lgc/lowering/LowerMulDx9Zero.h index 4be021e34a..4b8b99914e 100644 --- a/lgc/include/lgc/patch/LowerMulDx9Zero.h +++ b/lgc/include/lgc/lowering/LowerMulDx9Zero.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #pragma once #include "lgc/Builder.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/IR/InstVisitor.h" @@ -39,7 +39,7 @@ namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations when detect muldx9zero pattern like: +// Represents the pass of LGC lowering operations when detect muldx9zero pattern like: // ((b==0.0 ? 0.0 : a) * (a==0.0 ? 0.0 : b)) or // ((b==0.0 ? 0.0 : a) * (a==0.0 ? 0.0 : b)) or // fma((b==0.0 ? 0.0 : a), (a==0.0 ? 0.0 : b), c) diff --git a/lgc/include/lgc/patch/LowerReadFirstLane.h b/lgc/include/lgc/lowering/LowerReadFirstLane.h similarity index 97% rename from lgc/include/lgc/patch/LowerReadFirstLane.h rename to lgc/include/lgc/lowering/LowerReadFirstLane.h index 9f8b5768b0..a8753d6083 100644 --- a/lgc/include/lgc/patch/LowerReadFirstLane.h +++ b/lgc/include/lgc/lowering/LowerReadFirstLane.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/include/lgc/patch/LowerSubgroupOps.h b/lgc/include/lgc/lowering/LowerSubgroupOps.h similarity index 95% rename from lgc/include/lgc/patch/LowerSubgroupOps.h rename to lgc/include/lgc/lowering/LowerSubgroupOps.h index 98acae42a6..2ab288389e 100644 --- a/lgc/include/lgc/patch/LowerSubgroupOps.h +++ b/lgc/include/lgc/lowering/LowerSubgroupOps.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -34,8 +34,8 @@ #include "llvmraytracing/CpsStackLowering.h" #include "lgc/LgcCpsDialect.h" #include "lgc/LgcDialect.h" -#include "lgc/patch/LgcLowering.h" -#include "lgc/patch/ShaderInputs.h" +#include "lgc/lowering/LgcLowering.h" +#include "lgc/lowering/ShaderInputs.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/ADT/SmallVector.h" diff --git a/lgc/include/lgc/patch/MutateEntryPoint.h b/lgc/include/lgc/lowering/MutateEntryPoint.h similarity index 98% rename from lgc/include/lgc/patch/MutateEntryPoint.h rename to lgc/include/lgc/lowering/MutateEntryPoint.h index 8fdc38678b..cfd13a0363 100644 --- a/lgc/include/lgc/patch/MutateEntryPoint.h +++ b/lgc/include/lgc/lowering/MutateEntryPoint.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -34,8 +34,8 @@ #include "llvmraytracing/CpsStackLowering.h" #include "lgc/LgcCpsDialect.h" #include "lgc/LgcDialect.h" -#include "lgc/patch/LgcLowering.h" -#include "lgc/patch/ShaderInputs.h" +#include "lgc/lowering/LgcLowering.h" +#include "lgc/lowering/ShaderInputs.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/ADT/SmallVector.h" diff --git a/lgc/include/lgc/patch/PassthroughHullShader.h b/lgc/include/lgc/lowering/PassthroughHullShader.h similarity index 93% rename from lgc/include/lgc/patch/PassthroughHullShader.h rename to lgc/include/lgc/lowering/PassthroughHullShader.h index de81743eff..14a0f1f9c6 100644 --- a/lgc/include/lgc/patch/PassthroughHullShader.h +++ b/lgc/include/lgc/lowering/PassthroughHullShader.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "llvm/IR/PassManager.h" @@ -42,7 +42,7 @@ class PassthroughHullShader : public llvm::PassInfoMixin public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Pass-through hull shader generation"; } + static llvm::StringRef name() { return "Passthrough hull shader generation"; } void updatePipelineState(llvm::Module &module, PipelineState *pipelineState) const; llvm::Function *generatePassthroughHullShader(llvm::Module &module, PipelineShadersResult &pipelineShaders, PipelineState *pipelineState); diff --git a/lgc/include/lgc/patch/PeepholeOptimization.h b/lgc/include/lgc/lowering/PeepholeOptimization.h similarity index 93% rename from lgc/include/lgc/patch/PeepholeOptimization.h rename to lgc/include/lgc/lowering/PeepholeOptimization.h index 32daae8943..1a62631749 100644 --- a/lgc/include/lgc/patch/PeepholeOptimization.h +++ b/lgc/include/lgc/lowering/PeepholeOptimization.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -36,7 +36,7 @@ namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations for peephole optimizations, with the following patterns covered: +// Represents the pass of LGC lowering operations for peephole optimizations, with the following patterns covered: // // - Change inttoptr ( add x, const ) -> gep ( inttoptr x, const ) to improve value tracking and load/store // vectorization. diff --git a/lgc/include/lgc/patch/PreparePipelineAbi.h b/lgc/include/lgc/lowering/PreparePipelineAbi.h similarity index 97% rename from lgc/include/lgc/patch/PreparePipelineAbi.h rename to lgc/include/lgc/lowering/PreparePipelineAbi.h index 03f8761a8a..b0ae3b7050 100644 --- a/lgc/include/lgc/patch/PreparePipelineAbi.h +++ b/lgc/include/lgc/lowering/PreparePipelineAbi.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" diff --git a/lgc/include/lgc/patch/ScalarizeLoads.h b/lgc/include/lgc/lowering/ScalarizeLoads.h similarity index 93% rename from lgc/include/lgc/patch/ScalarizeLoads.h rename to lgc/include/lgc/lowering/ScalarizeLoads.h index aa77377754..079cab8759 100644 --- a/lgc/include/lgc/patch/ScalarizeLoads.h +++ b/lgc/include/lgc/lowering/ScalarizeLoads.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #pragma once #include "lgc/Builder.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/IR/InstVisitor.h" @@ -39,7 +39,7 @@ namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations for scalarize load. +// Represents the pass of LGC lowering operations for scalarize load. class ScalarizeLoads final : public llvm::InstVisitor, public llvm::PassInfoMixin { public: explicit ScalarizeLoads(); diff --git a/lgc/include/lgc/patch/SetupTargetFeatures.h b/lgc/include/lgc/lowering/SetupTargetFeatures.h similarity index 95% rename from lgc/include/lgc/patch/SetupTargetFeatures.h rename to lgc/include/lgc/lowering/SetupTargetFeatures.h index 03b81c50d1..c4477f6375 100644 --- a/lgc/include/lgc/patch/SetupTargetFeatures.h +++ b/lgc/include/lgc/lowering/SetupTargetFeatures.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/util/BuilderBase.h" diff --git a/lgc/include/lgc/patch/ShaderInputs.h b/lgc/include/lgc/lowering/ShaderInputs.h similarity index 99% rename from lgc/include/lgc/patch/ShaderInputs.h rename to lgc/include/lgc/lowering/ShaderInputs.h index 1b1161770c..4cfae17021 100644 --- a/lgc/include/lgc/patch/ShaderInputs.h +++ b/lgc/include/lgc/lowering/ShaderInputs.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/include/lgc/patch/StructurizeBuffers.h b/lgc/include/lgc/lowering/StructurizeBuffers.h similarity index 91% rename from lgc/include/lgc/patch/StructurizeBuffers.h rename to lgc/include/lgc/lowering/StructurizeBuffers.h index ee72201654..213488bc20 100644 --- a/lgc/include/lgc/patch/StructurizeBuffers.h +++ b/lgc/include/lgc/lowering/StructurizeBuffers.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,12 +31,12 @@ #pragma once -#include "lgc/patch/LowerBufferOperations.h" +#include "lgc/lowering/LowerBufferOperations.h" #include "llvm/IR/PassManager.h" namespace lgc { // ===================================================================================================================== -// Represents the pass of LLVM patching operations for structured buffer operations +// Represents the pass of LGC lowering operations for structured buffer operations class StructurizeBuffers : public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManager); diff --git a/lgc/include/lgc/patch/SystemValues.h b/lgc/include/lgc/lowering/SystemValues.h similarity index 99% rename from lgc/include/lgc/patch/SystemValues.h rename to lgc/include/lgc/lowering/SystemValues.h index 3153bc3882..752e80cd50 100644 --- a/lgc/include/lgc/patch/SystemValues.h +++ b/lgc/include/lgc/lowering/SystemValues.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/include/lgc/patch/VertexFetch.h b/lgc/include/lgc/lowering/VertexFetch.h similarity index 88% rename from lgc/include/lgc/patch/VertexFetch.h rename to lgc/include/lgc/lowering/VertexFetch.h index d2ba9e3489..3789d3d660 100644 --- a/lgc/include/lgc/patch/VertexFetch.h +++ b/lgc/include/lgc/lowering/VertexFetch.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -57,6 +57,11 @@ class VertexFetch { // Generate code to fetch a vertex value for uber shader virtual llvm::Value *fetchVertex(LoadVertexInputOp *vertexFetch, llvm::Value *inputDesc, llvm::Value *locMasks, BuilderBase &builder, bool disablePerCompFetch) = 0; + + // Generate code to fetch baseInstanceOffset, baseInstance or vertexId + virtual void mutateVertexBuiltinValue(const PipelineState *pipelineState, llvm::Value *vertexId, + llvm::Value *instanceId, llvm::Value *drawId, llvm::Value *baseVertex, + llvm::Value *baseInstance, BuilderImpl &builder) = 0; }; // ===================================================================================================================== diff --git a/lgc/include/lgc/patch/WorkaroundDsSubdwordWrite.h b/lgc/include/lgc/lowering/WorkaroundDsSubdwordWrite.h similarity index 94% rename from lgc/include/lgc/patch/WorkaroundDsSubdwordWrite.h rename to lgc/include/lgc/lowering/WorkaroundDsSubdwordWrite.h index 7f75ecb6a5..6d0a94ae5c 100644 --- a/lgc/include/lgc/patch/WorkaroundDsSubdwordWrite.h +++ b/lgc/include/lgc/lowering/WorkaroundDsSubdwordWrite.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -53,7 +53,7 @@ class WorkaroundDsSubdwordWrite final : public llvm::PassInfoMixin= 911. +static constexpr char EntryPointSymbol[] = ".entry_point_symbol"; +// For PAL major version < 911. static constexpr char EntryPoint[] = ".entry_point"; static constexpr char ScratchMemorySize[] = ".scratch_memory_size"; static constexpr char LdsSize[] = ".lds_size"; diff --git a/lgc/include/lgc/state/IntrinsDefs.h b/lgc/include/lgc/state/IntrinsDefs.h index 5442b82df1..6fc11b5c81 100644 --- a/lgc/include/lgc/state/IntrinsDefs.h +++ b/lgc/include/lgc/state/IntrinsDefs.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -641,7 +641,7 @@ enum PolyModeType { // Represents the coherent flag used in buffer intrinsics union CoherentFlag { struct { - unsigned glc : 1; // Global level coherence + unsigned glc : 1; // Group level coherence unsigned slc : 1; // System level coherence unsigned dlc : 1; // Device level coherence unsigned swz : 1; // Swizzled buffer diff --git a/lgc/interface/lgc/Builder.h b/lgc/interface/lgc/Builder.h index 54977746be..fb7d6b34db 100644 --- a/lgc/interface/lgc/Builder.h +++ b/lgc/interface/lgc/Builder.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -324,7 +324,7 @@ class BuilderDefs : public BuilderCommon { ImageFlagNotAliased = 0x200, // Whether the image is known not to alias any other memory object ImageFlagInvariant = 0x400, // Invariant load ImageFlagSamplePatternOffset = 0x800, // Retrieving sample pattern offset in dwords for specified image - ImageFlagNoAlloc = 0x1000, // + ImageFlagLlcNoAlloc = 0x1000, // LLC uses NoAlloc behavior. }; // Address array indices for image sample and gather methods. Where an optional entry is missing (either diff --git a/lgc/interface/lgc/LgcDialect.td b/lgc/interface/lgc/LgcDialect.td index 97ca648e50..0ea4ceafc5 100644 --- a/lgc/interface/lgc/LgcDialect.td +++ b/lgc/interface/lgc/LgcDialect.td @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -139,8 +139,8 @@ def BufferIndexOp : LgcOp<"buffer.index", [Memory<[]>, WillReturn]> { } def BufferLengthOp : LgcOp<"buffer.length", [Memory<[]>, WillReturn]> { - let arguments = (ins BufferPointer:$pointer, I32:$offset); - let results = (outs I32:$result); + let arguments = (ins BufferPointer:$pointer, I64:$offset); + let results = (outs I64:$result); let summary = "return the size of a buffer"; let description = [{ @@ -480,7 +480,7 @@ def InputImportGenericOp : DivergentLgcOp<"input.import.generic", [Memory<[]>, W def LoadVertexInputOp : DivergentLgcOp<"load.vertex.input", [Memory<[]>, WillReturn]> { let superclass = GenericLocationOp; - let arguments = (ins GenericLocationOp, I32:$vertex_index, I32:$instance_index); + let arguments = (ins GenericLocationOp, I32:$vertex_id, I32:$instance_id, I32:$draw_id, I32:$base_vertex, I32:$base_instance); let results = (outs value:$result); let defaultBuilderHasExplicitResultType = true; diff --git a/lgc/interface/lgc/Pipeline.h b/lgc/interface/lgc/Pipeline.h index fdde94fa1d..183414ecb1 100644 --- a/lgc/interface/lgc/Pipeline.h +++ b/lgc/interface/lgc/Pipeline.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -129,7 +129,7 @@ static const char SampleShadingMetaName[] = "lgc.sample.shading"; // The front-end should zero-initialize a struct with "= {}" in case future changes add new fields. // Note: new fields must be added to the end of this structure to maintain test compatibility. union Options { - unsigned u32All[48]; + unsigned u32All[50]; struct { uint64_t hash[2]; // Pipeline hash to set in ELF PAL metadata unsigned includeDisassembly; // If set, the disassembly for all compiled shaders will be included @@ -208,6 +208,8 @@ union Options { unsigned reserved24; bool checkRawBufferAccessDescStride; // Check descriptor stride to workaround an issue that a strided buffer desc is // used for a raw buffer access instruction. + + unsigned reserved26[2]; }; }; static_assert(sizeof(Options) == sizeof(Options::u32All)); @@ -453,8 +455,11 @@ enum BufNumFormat : unsigned { // Rate of vertex input enum VertexInputRate { - VertexInputRateVertex = 0, // Vertex buffer has one element per vertex - VertexInputRateInstance = 1, // Vertex buffer has one element per instance + VertexInputRateVertex = 0, // Vertex buffer has one element per vertex + VertexInputRateInstance = 1, // Vertex buffer has one element per instance + VertexInputRatePerDrawPerVertex = 2, // Vertex buffer has one element per draw per vertex + VertexInputRatePerDrawPerInstance = 3, // Vertex buffer has one element per draw per instance + VertexInputRatePerDraw = 4, // Vertex buffer has one element per draw }; // Structure for a vertex input diff --git a/lgc/patch/AddLoopMetadata.cpp b/lgc/lowering/AddLoopMetadata.cpp similarity index 98% rename from lgc/patch/AddLoopMetadata.cpp rename to lgc/lowering/AddLoopMetadata.cpp index 6666075f45..c102994043 100644 --- a/lgc/patch/AddLoopMetadata.cpp +++ b/lgc/lowering/AddLoopMetadata.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::AddLoopMetadata. *********************************************************************************************************************** */ -#include "lgc/patch/AddLoopMetadata.h" +#include "lgc/lowering/AddLoopMetadata.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/BasicBlock.h" #include "llvm/Support/CommandLine.h" @@ -90,7 +90,7 @@ AddLoopMetadata::AddLoopMetadata() } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] loop : LLVM loop to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/lgc/patch/ApplyWorkarounds.cpp b/lgc/lowering/ApplyWorkarounds.cpp similarity index 98% rename from lgc/patch/ApplyWorkarounds.cpp rename to lgc/lowering/ApplyWorkarounds.cpp index f1c0c9fa3e..711e200a72 100644 --- a/lgc/patch/ApplyWorkarounds.cpp +++ b/lgc/lowering/ApplyWorkarounds.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ *********************************************************************************************************************** */ -#include "lgc/patch/ApplyWorkarounds.h" +#include "lgc/lowering/ApplyWorkarounds.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" @@ -55,7 +55,7 @@ namespace lgc { PreservedAnalyses ApplyWorkarounds::run(Module &module, ModuleAnalysisManager &analysisManager) { PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); - LLVM_DEBUG(dbgs() << "Run the pass Patch-Workarounds\n"); + LLVM_DEBUG(dbgs() << "Run the pass Apply-Workarounds\n"); Patch::init(&module); diff --git a/lgc/patch/CheckShaderCache.cpp b/lgc/lowering/CheckShaderCache.cpp similarity index 97% rename from lgc/patch/CheckShaderCache.cpp rename to lgc/lowering/CheckShaderCache.cpp index b8cc064322..bb011492d0 100644 --- a/lgc/patch/CheckShaderCache.cpp +++ b/lgc/lowering/CheckShaderCache.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::CheckShaderCache. *********************************************************************************************************************** */ -#include "lgc/patch/CheckShaderCache.h" +#include "lgc/lowering/CheckShaderCache.h" #include "lgc/CommonDefs.h" #include "lgc/state/PipelineShaders.h" #include "llvm/Support/Debug.h" @@ -62,7 +62,7 @@ CheckShaderCache::CheckShaderCache(Pipeline::CheckShaderCacheFunc callbackFunc) } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/lgc/patch/CollectImageOperations.cpp b/lgc/lowering/CollectImageOperations.cpp similarity index 93% rename from lgc/patch/CollectImageOperations.cpp rename to lgc/lowering/CollectImageOperations.cpp index 06fda22e8c..0ef9f3798a 100644 --- a/lgc/patch/CollectImageOperations.cpp +++ b/lgc/lowering/CollectImageOperations.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,8 +28,8 @@ * @brief LLPC source file: contains implementation of class lgc::CollectImageOperations. *********************************************************************************************************************** */ -#include "lgc/patch/CollectImageOperations.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/CollectImageOperations.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineState.h" #include "llvm/InitializePasses.h" #include "llvm/Support/Debug.h" @@ -42,7 +42,7 @@ using namespace lgc; namespace lgc { // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/lgc/patch/CollectResourceUsage.cpp b/lgc/lowering/CollectResourceUsage.cpp similarity index 99% rename from lgc/patch/CollectResourceUsage.cpp rename to lgc/lowering/CollectResourceUsage.cpp index 2806ae7e11..d8842ce63c 100644 --- a/lgc/patch/CollectResourceUsage.cpp +++ b/lgc/lowering/CollectResourceUsage.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::CollectResourceUsage. *********************************************************************************************************************** */ -#include "lgc/patch/CollectResourceUsage.h" +#include "lgc/lowering/CollectResourceUsage.h" #include "MeshTaskShader.h" #include "NggPrimShader.h" #include "lgc/Builder.h" @@ -73,7 +73,7 @@ CollectResourceUsage::CollectResourceUsage() : m_resUsage(nullptr) { } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation @@ -82,7 +82,7 @@ PreservedAnalyses CollectResourceUsage::run(Module &module, ModuleAnalysisManage PipelineShadersResult &pipelineShaders = analysisManager.getResult(module); PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); - LLVM_DEBUG(dbgs() << "Run the pass Patch-Resource-Collect\n"); + LLVM_DEBUG(dbgs() << "Run the pass Collect-Resource-Usage\n"); Patch::init(&module); m_pipelineShaders = &pipelineShaders; diff --git a/lgc/patch/CombineCooperativeMatrix.cpp b/lgc/lowering/CombineCooperativeMatrix.cpp similarity index 99% rename from lgc/patch/CombineCooperativeMatrix.cpp rename to lgc/lowering/CombineCooperativeMatrix.cpp index de592a61d3..7bf25fa024 100644 --- a/lgc/patch/CombineCooperativeMatrix.cpp +++ b/lgc/lowering/CombineCooperativeMatrix.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -32,7 +32,7 @@ * In particular, this pass reduces the number of transpose and convert operations. *********************************************************************************************************************** */ -#include "lgc/patch/CombineCooperativeMatrix.h" +#include "lgc/lowering/CombineCooperativeMatrix.h" #include "lgc/Builder.h" #include "lgc/LgcDialect.h" #include "lgc/state/Defs.h" diff --git a/lgc/patch/ConfigBuilderBase.cpp b/lgc/lowering/ConfigBuilderBase.cpp similarity index 99% rename from lgc/patch/ConfigBuilderBase.cpp rename to lgc/lowering/ConfigBuilderBase.cpp index 08c6b838e2..dfa130ed58 100644 --- a/lgc/patch/ConfigBuilderBase.cpp +++ b/lgc/lowering/ConfigBuilderBase.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/ConfigBuilderBase.h b/lgc/lowering/ConfigBuilderBase.h similarity index 99% rename from lgc/patch/ConfigBuilderBase.h rename to lgc/lowering/ConfigBuilderBase.h index d34e7ff674..ff17cde4ce 100644 --- a/lgc/patch/ConfigBuilderBase.h +++ b/lgc/lowering/ConfigBuilderBase.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/Continufy.cpp b/lgc/lowering/Continufy.cpp similarity index 97% rename from lgc/patch/Continufy.cpp rename to lgc/lowering/Continufy.cpp index c72c298af9..3de4cb76cb 100644 --- a/lgc/patch/Continufy.cpp +++ b/lgc/lowering/Continufy.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ *********************************************************************************************************************** */ -#include "lgc/patch/Continufy.h" +#include "lgc/lowering/Continufy.h" #include "compilerutils/CompilerUtils.h" #include "llvmraytracing/ContinuationsUtil.h" #include "lgc/Builder.h" @@ -38,7 +38,7 @@ #include "lgc/LgcDialect.h" #include "lgc/LgcIlCpsDialect.h" #include "lgc/LgcRtDialect.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PalMetadata.h" #include "llvm/Support/Debug.h" @@ -129,7 +129,7 @@ static CpsLevel getCpsLevelFromRtStage(int stage) { } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/lgc/patch/FragmentColorExport.cpp b/lgc/lowering/FragmentColorExport.cpp similarity index 99% rename from lgc/patch/FragmentColorExport.cpp rename to lgc/lowering/FragmentColorExport.cpp index af84f3373c..d5df152db1 100644 --- a/lgc/patch/FragmentColorExport.cpp +++ b/lgc/lowering/FragmentColorExport.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,10 +28,10 @@ * @brief LLPC source file: contains implementation of class lgc::FragmentColorExport. *********************************************************************************************************************** */ -#include "lgc/patch/FragmentColorExport.h" +#include "lgc/lowering/FragmentColorExport.h" #include "lgc/LgcContext.h" -#include "lgc/patch/LgcLowering.h" -#include "lgc/patch/ShaderInputs.h" +#include "lgc/lowering/LgcLowering.h" +#include "lgc/lowering/ShaderInputs.h" #include "lgc/state/IntrinsDefs.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineShaders.h" diff --git a/lgc/patch/GenerateCopyShader.cpp b/lgc/lowering/GenerateCopyShader.cpp similarity index 99% rename from lgc/patch/GenerateCopyShader.cpp rename to lgc/lowering/GenerateCopyShader.cpp index 62ff383581..0c55587458 100644 --- a/lgc/patch/GenerateCopyShader.cpp +++ b/lgc/lowering/GenerateCopyShader.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains declaration and implementation of class lgc::GenerateCopyShader. *********************************************************************************************************************** */ -#include "lgc/patch/GenerateCopyShader.h" +#include "lgc/lowering/GenerateCopyShader.h" #include "lgc/LgcDialect.h" #include "lgc/state/IntrinsDefs.h" #include "lgc/state/PalMetadata.h" diff --git a/lgc/patch/GenerateNullFragmentShader.cpp b/lgc/lowering/GenerateNullFragmentShader.cpp similarity index 95% rename from lgc/patch/GenerateNullFragmentShader.cpp rename to lgc/lowering/GenerateNullFragmentShader.cpp index a8157ba9b5..ef78eef1dc 100644 --- a/lgc/patch/GenerateNullFragmentShader.cpp +++ b/lgc/lowering/GenerateNullFragmentShader.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,8 +30,8 @@ */ #include "GenerateNullFragmentShader.h" #include "lgc/LgcContext.h" -#include "lgc/patch/FragmentColorExport.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/FragmentColorExport.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/IntrinsDefs.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineState.h" @@ -55,7 +55,7 @@ using namespace llvm; PreservedAnalyses GenerateNullFragmentShader::run(Module &module, ModuleAnalysisManager &analysisManager) { PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); - LLVM_DEBUG(dbgs() << "Run the pass Patch-Null-Frag-Shader\n"); + LLVM_DEBUG(dbgs() << "Run the pass Generate-Null-Fragment-Shader\n"); Patch::init(&module); diff --git a/lgc/patch/GenerateNullFragmentShader.h b/lgc/lowering/GenerateNullFragmentShader.h similarity index 95% rename from lgc/patch/GenerateNullFragmentShader.h rename to lgc/lowering/GenerateNullFragmentShader.h index e8ed486d64..ab538fbe51 100644 --- a/lgc/patch/GenerateNullFragmentShader.h +++ b/lgc/lowering/GenerateNullFragmentShader.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,7 +30,7 @@ */ #pragma once -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "llvm/IR/PassManager.h" namespace lgc { diff --git a/lgc/patch/IncludeLlvmIr.cpp b/lgc/lowering/IncludeLlvmIr.cpp similarity index 96% rename from lgc/patch/IncludeLlvmIr.cpp rename to lgc/lowering/IncludeLlvmIr.cpp index 56196f8bd0..9532d53f58 100644 --- a/lgc/patch/IncludeLlvmIr.cpp +++ b/lgc/lowering/IncludeLlvmIr.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::IncludeLlvmIr. *********************************************************************************************************************** */ -#include "lgc/patch/IncludeLlvmIr.h" +#include "lgc/lowering/IncludeLlvmIr.h" #include "lgc/state/Abi.h" #include "lgc/state/PipelineState.h" #include "llvm/IR/Constants.h" diff --git a/lgc/patch/InitializeWorkgroupMemory.cpp b/lgc/lowering/InitializeWorkgroupMemory.cpp similarity index 87% rename from lgc/patch/InitializeWorkgroupMemory.cpp rename to lgc/lowering/InitializeWorkgroupMemory.cpp index 76fe3fc4a9..a50924acfd 100644 --- a/lgc/patch/InitializeWorkgroupMemory.cpp +++ b/lgc/lowering/InitializeWorkgroupMemory.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2021-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,8 +29,8 @@ *********************************************************************************************************************** */ -#include "lgc/patch/InitializeWorkgroupMemory.h" -#include "lgc/patch/ShaderInputs.h" +#include "lgc/lowering/InitializeWorkgroupMemory.h" +#include "lgc/lowering/ShaderInputs.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "lgc/util/BuilderBase.h" @@ -49,7 +49,7 @@ static cl::opt namespace lgc { // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation @@ -58,7 +58,7 @@ PreservedAnalyses InitializeWorkgroupMemory::run(Module &module, ModuleAnalysisM PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); PipelineShadersResult &pipelineShaders = analysisManager.getResult(module); - LLVM_DEBUG(dbgs() << "Run the pass Patch-Initialize-Workgroup-Memory\n"); + LLVM_DEBUG(dbgs() << "Run the pass Initialize-Workgroup-Memory\n"); m_pipelineState = pipelineState; // This pass works on compute shader. @@ -86,7 +86,11 @@ PreservedAnalyses InitializeWorkgroupMemory::run(Module &module, ModuleAnalysisM // Fill the map of each variable with zeroinitializer and calculate its corresponding offset on LDS unsigned offset = 0; for (auto global : workgroupGlobals) { - unsigned varSize = getTypeSizeInDwords(global->getValueType()); + auto getTypeSizeInDwords = [this](Type *inputTy, Align align) { + return divideCeil(alignTo(m_module->getDataLayout().getTypeAllocSize(inputTy), align), sizeof(unsigned)); + }; + unsigned varSize = + getTypeSizeInDwords(global->getValueType(), global->getPointerAlignment(m_module->getDataLayout())); m_globalLdsOffsetMap.insert({global, builder.getInt32(offset)}); offset += varSize; } @@ -96,7 +100,7 @@ PreservedAnalyses InitializeWorkgroupMemory::run(Module &module, ModuleAnalysisM auto ldsTy = ArrayType::get(builder.getInt32Ty(), ldsSize); auto lds = new GlobalVariable(module, ldsTy, false, GlobalValue::ExternalLinkage, nullptr, "lds", nullptr, GlobalValue::NotThreadLocal, ADDR_SPACE_LOCAL); - lds->setAlignment(MaybeAlign(16)); + lds->setAlignment(MaybeAlign(4)); // Replace the original LDS variables with the new LDS variable for (auto globalOffsetPair : m_globalLdsOffsetMap) { @@ -237,29 +241,4 @@ void InitializeWorkgroupMemory::initializeWithZero(GlobalVariable *lds, BuilderB } } -// ===================================================================================================================== -// Return the size in dwords of a variable type -// -// @param inputTy : The type to be calculated -unsigned InitializeWorkgroupMemory::getTypeSizeInDwords(Type *inputTy) { - if (inputTy->isSingleValueType()) { - // Variable in LDS is stored in dwords and padded as 4 dwords - unsigned dwordCount = 4; - unsigned elemCount = inputTy->isVectorTy() ? cast(inputTy)->getNumElements() : 1; - if (inputTy->getScalarSizeInBits() == 64 && elemCount > 1) - dwordCount = 8; - return dwordCount; - } - if (inputTy->isArrayTy()) { - const unsigned elemSize = getTypeSizeInDwords(inputTy->getArrayElementType()); - return inputTy->getArrayNumElements() * elemSize; - } - assert(inputTy->isStructTy()); - const unsigned memberCount = inputTy->getStructNumElements(); - unsigned memberSize = 0; - for (unsigned idx = 0; idx < memberCount; ++idx) - memberSize += getTypeSizeInDwords(inputTy->getStructElementType(idx)); - return memberSize; -} - } // namespace lgc diff --git a/lgc/patch/LgcLowering.cpp b/lgc/lowering/LgcLowering.cpp similarity index 92% rename from lgc/patch/LgcLowering.cpp rename to lgc/lowering/LgcLowering.cpp index ef0b4d882f..4a15c568b9 100644 --- a/lgc/patch/LgcLowering.cpp +++ b/lgc/lowering/LgcLowering.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::Patch. *********************************************************************************************************************** */ -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "GenerateNullFragmentShader.h" #include "LowerPopsInterlock.h" #include "LowerRayQueryWrapper.h" @@ -37,41 +37,41 @@ #include "lgc/PassManager.h" #include "lgc/Pipeline.h" #include "lgc/builder/BuilderReplayer.h" -#include "lgc/patch/AddLoopMetadata.h" -#include "lgc/patch/ApplyWorkarounds.h" -#include "lgc/patch/CheckShaderCache.h" -#include "lgc/patch/CollectImageOperations.h" -#include "lgc/patch/CollectResourceUsage.h" -#include "lgc/patch/Continufy.h" -#include "lgc/patch/FragmentColorExport.h" -#include "lgc/patch/GenerateCopyShader.h" -#include "lgc/patch/IncludeLlvmIr.h" -#include "lgc/patch/InitializeWorkgroupMemory.h" -#include "lgc/patch/LowerBufferOperations.h" -#include "lgc/patch/LowerDebugPrintf.h" -#include "lgc/patch/LowerDesc.h" -#include "lgc/patch/LowerGpuRt.h" -#include "lgc/patch/LowerImageDerivatives.h" -#include "lgc/patch/LowerInOut.h" -#include "lgc/patch/LowerInvariantLoads.h" -#include "lgc/patch/LowerMulDx9Zero.h" -#include "lgc/patch/LowerReadFirstLane.h" -#include "lgc/patch/LowerSubgroupOps.h" -#include "lgc/patch/MutateEntryPoint.h" -#include "lgc/patch/PassthroughHullShader.h" -#include "lgc/patch/PeepholeOptimization.h" -#include "lgc/patch/PreparePipelineAbi.h" -#include "lgc/patch/ScalarizeLoads.h" -#include "lgc/patch/SetupTargetFeatures.h" -#include "lgc/patch/StructurizeBuffers.h" -#include "lgc/patch/VertexFetch.h" +#include "lgc/lowering/AddLoopMetadata.h" +#include "lgc/lowering/ApplyWorkarounds.h" +#include "lgc/lowering/CheckShaderCache.h" +#include "lgc/lowering/CollectImageOperations.h" +#include "lgc/lowering/CollectResourceUsage.h" +#include "lgc/lowering/Continufy.h" +#include "lgc/lowering/FragmentColorExport.h" +#include "lgc/lowering/GenerateCopyShader.h" +#include "lgc/lowering/IncludeLlvmIr.h" +#include "lgc/lowering/InitializeWorkgroupMemory.h" +#include "lgc/lowering/LowerBufferOperations.h" +#include "lgc/lowering/LowerDebugPrintf.h" +#include "lgc/lowering/LowerDesc.h" +#include "lgc/lowering/LowerGpuRt.h" +#include "lgc/lowering/LowerImageDerivatives.h" +#include "lgc/lowering/LowerInOut.h" +#include "lgc/lowering/LowerInvariantLoads.h" +#include "lgc/lowering/LowerMulDx9Zero.h" +#include "lgc/lowering/LowerReadFirstLane.h" +#include "lgc/lowering/LowerSubgroupOps.h" +#include "lgc/lowering/MutateEntryPoint.h" +#include "lgc/lowering/PassthroughHullShader.h" +#include "lgc/lowering/PeepholeOptimization.h" +#include "lgc/lowering/PreparePipelineAbi.h" +#include "lgc/lowering/ScalarizeLoads.h" +#include "lgc/lowering/SetupTargetFeatures.h" +#include "lgc/lowering/StructurizeBuffers.h" +#include "lgc/lowering/VertexFetch.h" #if LLPC_BUILD_STRIX1 -#include "lgc/patch/WorkaroundDsSubdwordWrite.h" +#include "lgc/lowering/WorkaroundDsSubdwordWrite.h" #endif #include "lgc/Debug.h" -#include "lgc/patch/CombineCooperativeMatrix.h" -#include "lgc/patch/LowerCooperativeMatrix.h" +#include "lgc/lowering/CombineCooperativeMatrix.h" +#include "lgc/lowering/LowerCooperativeMatrix.h" #include "lgc/state/AbiMetadata.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" @@ -112,7 +112,7 @@ #include "llvm/Transforms/Utils.h" #include "llvm/Transforms/Utils/Mem2Reg.h" -#define DEBUG_TYPE "lgc-patch" +#define DEBUG_TYPE "lgc-lowering" using namespace llvm; @@ -177,7 +177,7 @@ void Patch::addPasses(PipelineState *pipelineState, lgc::PassManager &passMgr, T if (raw_ostream *outs = getLgcOuts()) { passMgr.addPass(PrintModulePass(*outs, "===============================================================================\n" - "// LLPC pipeline before-patching results\n")); + "// LLPC LGC before-lowering results\n")); } passMgr.addPass(IPSCCPPass()); @@ -290,7 +290,7 @@ void Patch::addPasses(PipelineState *pipelineState, lgc::PassManager &passMgr, T if (raw_ostream *outs = getLgcOuts()) { passMgr.addPass(PrintModulePass(*outs, "===============================================================================\n" - "// LLPC pipeline patching results\n")); + "// LLPC LGC lowering results\n")); } } diff --git a/lgc/patch/LowerBufferOperations.cpp b/lgc/lowering/LowerBufferOperations.cpp similarity index 99% rename from lgc/patch/LowerBufferOperations.cpp rename to lgc/lowering/LowerBufferOperations.cpp index 40c39eb9bb..768dc452b7 100644 --- a/lgc/patch/LowerBufferOperations.cpp +++ b/lgc/lowering/LowerBufferOperations.cpp @@ -1,7 +1,7 @@ -/* +/* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::LowerBufferOperations. *********************************************************************************************************************** */ -#include "lgc/patch/LowerBufferOperations.h" +#include "lgc/lowering/LowerBufferOperations.h" #include "lgc/CommonDefs.h" #include "lgc/LgcContext.h" #include "lgc/LgcDialect.h" @@ -67,7 +67,7 @@ LLVM_DIALECTS_VISITOR_PAYLOAD_PROJECT_FIELD(LowerBufferOperationsImpl, m_typeLow LLVM_DIALECTS_VISITOR_PAYLOAD_PROJECT_FIELD(LowerBufferOperationsImpl, m_bufferOpLowering) // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM function. +// Executes this LGC lowering pass on the specified LLVM function. // // @param [in/out] function : LLVM function to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation @@ -92,12 +92,12 @@ LowerBufferOperationsImpl::LowerBufferOperationsImpl(LLVMContext &context, Pipel } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM function. +// Executes this LGC lowering pass on the specified LLVM function. // // @param [in,out] function : LLVM function to be run on // @returns : True if the module was modified by the transformation and false otherwise bool LowerBufferOperationsImpl::run(Function &function) { - LLVM_DEBUG(dbgs() << "Run the pass Patch-Buffer-Op on: " << function.getName() << '\n'); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Buffer-Operations on: " << function.getName() << '\n'); static const auto visitor = llvm_dialects::VisitorBuilder() .nest(&BufferOpLowering::registerVisitors) @@ -895,9 +895,12 @@ void BufferOpLowering::visitBufferLength(BufferLengthOp &length) { auto values = m_typeLowering.getValue(length.getPointer()); - // Extract element 2 which is the NUM_RECORDS field from the buffer descriptor. Value *const bufferDesc = values[0]; - Value *numRecords = m_builder.CreateExtractElement(bufferDesc, 2); + Value *numRecords = nullptr; + { + // Extract element 2 which is the NUM_RECORDS field from the buffer descriptor. + numRecords = m_builder.CreateZExt(m_builder.CreateExtractElement(bufferDesc, 2), m_builder.getInt64Ty()); + } Value *offset = length.getOffset(); // If null descriptors are allowed, we must guarantee a 0 result for a null buffer descriptor. @@ -1706,7 +1709,9 @@ Value *BufferOpLowering::replaceLoadStore(Instruction &inst) { const bool isDivergentPtr = m_uniformityInfo.isDivergent(pointerOperand); #endif const bool haveNonStridedDescriptor = !isStridedPointer || m_stridedDescriptors.contains(bufferDesc); - if (isInvariant && !isDivergentDesc && accessSizeAllowed && haveNonStridedDescriptor && + const bool is32BitStridedBufferLoad = isStridedPointer && intAccessType->getScalarSizeInBits() == 32; + if (isInvariant && !isDivergentDesc && accessSizeAllowed && + (haveNonStridedDescriptor || is32BitStridedBufferLoad) && (!indexValue || isa(indexValue) || !isDivergentPtr)) { // create s.buffer.load Value *desc = bufferDesc; diff --git a/lgc/patch/LowerCooperativeMatrix.cpp b/lgc/lowering/LowerCooperativeMatrix.cpp similarity index 97% rename from lgc/patch/LowerCooperativeMatrix.cpp rename to lgc/lowering/LowerCooperativeMatrix.cpp index 63bb650ae5..4bf88b1c36 100644 --- a/lgc/patch/LowerCooperativeMatrix.cpp +++ b/lgc/lowering/LowerCooperativeMatrix.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LGC source file : Lower CooperativeMatrix manager, and pass that uses it *********************************************************************************************************************** */ -#include "lgc/patch/LowerCooperativeMatrix.h" +#include "lgc/lowering/LowerCooperativeMatrix.h" #include "lgc/Builder.h" #include "lgc/LgcContext.h" #include "lgc/LgcDialect.h" @@ -48,48 +48,67 @@ using namespace lgc; namespace lgc { -static const Intrinsic::AMDGCNIntrinsics InvalidInstricID = Intrinsic::AMDGCNIntrinsics(0xFFFFFFFF); -static const Intrinsic::AMDGCNIntrinsics GetWmmaIntrinsic(GfxIpVersion gfxIp, CooperativeMatrixElementType typeA, - CooperativeMatrixElementType typeB, - CooperativeMatrixElementType typeC, unsigned kMultiplier, - bool isTiled = false) { - assert(gfxIp.major >= 11); - switch (typeA) { - case CooperativeMatrixElementType::Float16: { - assert(typeA == typeB); - if (typeC == CooperativeMatrixElementType::Float16) - return isTiled ? Intrinsic::amdgcn_wmma_f16_16x16x16_f16_tied : Intrinsic::amdgcn_wmma_f16_16x16x16_f16; - if (typeC == CooperativeMatrixElementType::Float32) - return Intrinsic::amdgcn_wmma_f32_16x16x16_f16; - break; - } - case CooperativeMatrixElementType::BFloat16: { - assert(typeA == typeB); - if (typeC == CooperativeMatrixElementType::BFloat16) - return isTiled ? Intrinsic::amdgcn_wmma_bf16_16x16x16_bf16_tied : Intrinsic::amdgcn_wmma_bf16_16x16x16_bf16; - if (typeC == CooperativeMatrixElementType::Float32) - return Intrinsic::amdgcn_wmma_f32_16x16x16_bf16; - break; - } - case CooperativeMatrixElementType::Int8: { - if (typeC == CooperativeMatrixElementType::Int32) - return Intrinsic::amdgcn_wmma_i32_16x16x16_iu8; - break; - } - case CooperativeMatrixElementType::Int4: { - assert(typeA == typeB); - if (typeC == CooperativeMatrixElementType::Int32) { - if (kMultiplier == 1) - return Intrinsic::amdgcn_wmma_i32_16x16x16_iu4; - } - - break; - } - default: - break; +static const Intrinsic::AMDGCNIntrinsics InvalidIntrinsicID = Intrinsic::AMDGCNIntrinsics(0xFFFFFFFF); + +struct Properties { +public: + Properties(CooperativeMatrixElementType typeA, CooperativeMatrixElementType typeB, CooperativeMatrixElementType typeC, + CooperativeMatrixElementType typeD, unsigned kMultiplier, unsigned isTied = 0) { + m_data.u32All = 0; + m_data.typeA = typeA; + m_data.typeB = typeB; + m_data.typeC = typeC; + m_data.typeD = typeD; + m_data.kMultiplier = kMultiplier; + m_data.isTied = isTied; } - - return InvalidInstricID; + bool operator<(const Properties &rhs) const { return m_data.u32All < rhs.m_data.u32All; } + bool operator!=(const Properties &rhs) const { return m_data.u32All != rhs.m_data.u32All; } + union { + struct { + CooperativeMatrixElementType typeA : 5; + CooperativeMatrixElementType typeB : 5; + CooperativeMatrixElementType typeC : 5; + CooperativeMatrixElementType typeD : 5; + unsigned kMultiplier : 4; + unsigned isTied : 1; + unsigned reserved : 7; + }; + unsigned u32All; + } m_data; +}; + +const auto FLOAT16 = CooperativeMatrixElementType::Float16; +const auto FLOAT32 = CooperativeMatrixElementType::Float32; +const auto INT8 = CooperativeMatrixElementType::Int8; +const auto INT32 = CooperativeMatrixElementType::Int32; +const auto BFLOAT16 = CooperativeMatrixElementType::BFloat16; +const auto INT4 = CooperativeMatrixElementType::Int4; + +static const std::map WmmaIntrinsicTable = { + {Properties(FLOAT16, FLOAT16, FLOAT16, FLOAT16, 1, 0), Intrinsic::amdgcn_wmma_f16_16x16x16_f16}, + {Properties(FLOAT16, FLOAT16, FLOAT16, FLOAT16, 1, 1), Intrinsic::amdgcn_wmma_f16_16x16x16_f16_tied}, + {Properties(FLOAT16, FLOAT16, FLOAT32, FLOAT32, 1, 0), Intrinsic::amdgcn_wmma_f32_16x16x16_f16}, + + {Properties(BFLOAT16, BFLOAT16, BFLOAT16, BFLOAT16, 1, 0), Intrinsic::amdgcn_wmma_bf16_16x16x16_bf16}, + {Properties(BFLOAT16, BFLOAT16, BFLOAT16, BFLOAT16, 1, 1), Intrinsic::amdgcn_wmma_bf16_16x16x16_bf16_tied}, + {Properties(BFLOAT16, BFLOAT16, FLOAT32, FLOAT32, 1, 0), Intrinsic::amdgcn_wmma_f32_16x16x16_bf16}, + + {Properties(INT8, INT8, INT32, INT32, 1, 0), Intrinsic::amdgcn_wmma_i32_16x16x16_iu8}, + + {Properties(INT4, INT4, INT32, INT32, 1, 0), Intrinsic::amdgcn_wmma_i32_16x16x16_iu4}, +}; + +static Intrinsic::AMDGCNIntrinsics +GetWmmaIntrinsicID(const std::map &intrinsicTable, + CooperativeMatrixElementType typeA, CooperativeMatrixElementType typeB, + CooperativeMatrixElementType typeC, CooperativeMatrixElementType typeD, unsigned kMultiplier = 1, + unsigned isTied = false) { + Properties properties(typeA, typeB, typeC, typeD, kMultiplier, isTied); + auto it = intrinsicTable.find(properties); + if (it != intrinsicTable.end()) + return it->second; + return InvalidIntrinsicID; } // ===================================================================================================================== @@ -102,7 +121,7 @@ PreservedAnalyses LowerCooperativeMatrix::run(Module &module, ModuleAnalysisMana PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); PipelineShadersResult &pipelineShaders = analysisManager.getResult(module); - LLVM_DEBUG(dbgs() << "Run the pass Patch-Cooperative-Matrix\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Cooperative-Matrix\n"); Patch::init(&module); m_pipelineState = pipelineState; m_pipelineShaders = &pipelineShaders; @@ -1677,10 +1696,13 @@ void LowerCooperativeMatrix::visitCooperativeMatrixMulAddOp(CooperativeMatrixMul llvm_unreachable("Accumulator element type is not supported!"); } - Intrinsic::AMDGCNIntrinsics intrinsic = InvalidInstricID; - intrinsic = GetWmmaIntrinsic(m_gfxIp, matrixAType, matrixBType, matrixCType, kMultiplier, muladd.getIsTied()); + Intrinsic::AMDGCNIntrinsics intrinsic = InvalidIntrinsicID; + { + intrinsic = GetWmmaIntrinsicID(WmmaIntrinsicTable, matrixAType, matrixBType, matrixCType, matrixDType, + kMultiplier, muladd.getIsTied()); + } - if (intrinsic == InvalidInstricID) + if (intrinsic == InvalidIntrinsicID) llvm_unreachable("HW intrinsics not supported!"); SmallVector args; diff --git a/lgc/patch/LowerDebugPrintf.cpp b/lgc/lowering/LowerDebugPrintf.cpp similarity index 97% rename from lgc/patch/LowerDebugPrintf.cpp rename to lgc/lowering/LowerDebugPrintf.cpp index 27ea37ccf4..89fdc97a3d 100644 --- a/lgc/patch/LowerDebugPrintf.cpp +++ b/lgc/lowering/LowerDebugPrintf.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,10 +28,10 @@ * @brief LLPC source file: contains implementation of class lgc::LowerDebugPrintf. *********************************************************************************************************************** */ -#include "lgc/patch/LowerDebugPrintf.h" +#include "lgc/lowering/LowerDebugPrintf.h" #include "lgc/LgcDialect.h" #include "lgc/builder/BuilderImpl.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineState.h" #include "llvm-dialects/Dialect/Visitor.h" @@ -42,7 +42,7 @@ #include "llvm/Support/Debug.h" #include -#define DEBUG_TYPE "lower-debug-printf" +#define DEBUG_TYPE "lgc-lower-debug-printf" using namespace llvm; using namespace lgc; @@ -51,13 +51,13 @@ constexpr unsigned PrintfBufferBindingId = 6; namespace lgc { // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation // @returns : The preserved analyses (The analyses that are still valid after this pass) PreservedAnalyses LowerDebugPrintf::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Lower-debug-printf\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Debug-Printf\n"); PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); m_pipelineState = pipelineState; diff --git a/lgc/patch/LowerDesc.cpp b/lgc/lowering/LowerDesc.cpp similarity index 95% rename from lgc/patch/LowerDesc.cpp rename to lgc/lowering/LowerDesc.cpp index dbb7a17269..117ddb2bd0 100644 --- a/lgc/patch/LowerDesc.cpp +++ b/lgc/lowering/LowerDesc.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,14 +28,14 @@ * @brief LLPC source file: contains implementation of class lgc::LowerDesc. *********************************************************************************************************************** */ -#include "lgc/patch/LowerDesc.h" +#include "lgc/lowering/LowerDesc.h" #include "lgc/LgcDialect.h" #include "lgc/builder/BuilderImpl.h" #include "lgc/util/AddressExtender.h" #include "llvm-dialects/Dialect/Visitor.h" #include "llvm/Support/Debug.h" -#define DEBUG_TYPE "lower-desc" +#define DEBUG_TYPE "lgc-lower-desc" using namespace llvm; using namespace lgc; @@ -43,13 +43,13 @@ using namespace lgc; namespace lgc { // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation // @returns : The preserved analyses (The analyses that are still valid after this pass) PreservedAnalyses LowerDesc::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass " DEBUG_TYPE "\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Descriptor\n"); PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); m_pipelineState = pipelineState; diff --git a/lgc/patch/LowerGpuRt.cpp b/lgc/lowering/LowerGpuRt.cpp similarity index 99% rename from lgc/patch/LowerGpuRt.cpp rename to lgc/lowering/LowerGpuRt.cpp index b0a47ba2cb..f18e602721 100644 --- a/lgc/patch/LowerGpuRt.cpp +++ b/lgc/lowering/LowerGpuRt.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LGC source file: contains implementation of class lgc::LowerGpuRt. *********************************************************************************************************************** */ -#include "lgc/patch/LowerGpuRt.h" +#include "lgc/lowering/LowerGpuRt.h" #include "lgc/Builder.h" #include "lgc/GpurtDialect.h" #include "lgc/LgcContext.h" @@ -47,12 +47,12 @@ static const char *LdsStack = "LdsStack"; namespace lgc { // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation PreservedAnalyses LowerGpuRt::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Lower-gpurt\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Gpurt\n"); PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); m_pipelineState = pipelineState; diff --git a/lgc/patch/LowerImageDerivatives.cpp b/lgc/lowering/LowerImageDerivatives.cpp similarity index 96% rename from lgc/patch/LowerImageDerivatives.cpp rename to lgc/lowering/LowerImageDerivatives.cpp index 2b27c51801..3985c30e69 100644 --- a/lgc/patch/LowerImageDerivatives.cpp +++ b/lgc/lowering/LowerImageDerivatives.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,8 +28,8 @@ * @brief LLPC source file: contains implementation of class lgc::LowerImageDerivatives. *********************************************************************************************************************** */ -#include "lgc/patch/LowerImageDerivatives.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LowerImageDerivatives.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineState.h" #include "llvm/ADT/SmallSet.h" #include "llvm/IR/IntrinsicInst.h" @@ -53,7 +53,7 @@ static bool usesImplicitDerivatives(StringRef name) { } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/lgc/patch/LowerInOut.cpp b/lgc/lowering/LowerInOut.cpp similarity index 99% rename from lgc/patch/LowerInOut.cpp rename to lgc/lowering/LowerInOut.cpp index e887512f7e..2b3248d4c0 100644 --- a/lgc/patch/LowerInOut.cpp +++ b/lgc/lowering/LowerInOut.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ * *********************************************************************************************************************** */ -#include "lgc/patch/LowerInOut.h" +#include "lgc/lowering/LowerInOut.h" #include "lgc/Builder.h" #include "lgc/BuiltIns.h" #include "lgc/Debug.h" @@ -81,7 +81,7 @@ void LowerInOut::initPerShader() { } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/lgc/patch/LowerInvariantLoads.cpp b/lgc/lowering/LowerInvariantLoads.cpp similarity index 98% rename from lgc/patch/LowerInvariantLoads.cpp rename to lgc/lowering/LowerInvariantLoads.cpp index ddba756395..1a8818d3a3 100644 --- a/lgc/patch/LowerInvariantLoads.cpp +++ b/lgc/lowering/LowerInvariantLoads.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,9 +28,9 @@ * @brief LLPC source file: contains implementation of class lgc::LowerInvariantLoads. *********************************************************************************************************************** */ -#include "lgc/patch/LowerInvariantLoads.h" +#include "lgc/lowering/LowerInvariantLoads.h" #include "lgc/LgcDialect.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" #include "llvm/IR/IntrinsicInst.h" diff --git a/lgc/patch/LowerMulDx9Zero.cpp b/lgc/lowering/LowerMulDx9Zero.cpp similarity index 95% rename from lgc/patch/LowerMulDx9Zero.cpp rename to lgc/lowering/LowerMulDx9Zero.cpp index af58aaef49..6d188798a7 100644 --- a/lgc/patch/LowerMulDx9Zero.cpp +++ b/lgc/lowering/LowerMulDx9Zero.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::LowerMulDx9Zero. *********************************************************************************************************************** */ -#include "lgc/patch/LowerMulDx9Zero.h" +#include "lgc/lowering/LowerMulDx9Zero.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/IR/Constants.h" @@ -137,7 +137,13 @@ std::optional> LowerMulDx9Zero::isMulDx9Zero(Value * Value *lhsFalseValue = nullptr; Value *rhsCmpValue = nullptr; Value *rhsFalseValue = nullptr; +#if LLVM_MAIN_REVISION && LLVM_MAIN_REVISION < 521350 + // Old version of the code FCmpInst::Predicate pred = FCmpInst::FCMP_OEQ; +#else + // New version of the code (also handles unknown version, which we treat as latest) + CmpPredicate pred = FCmpInst::FCMP_OEQ; +#endif // Only transform for float32. if (!(lhs->getType()->isFloatTy() && rhs->getType()->isFloatTy())) diff --git a/lgc/patch/LowerPopsInterlock.cpp b/lgc/lowering/LowerPopsInterlock.cpp similarity index 98% rename from lgc/patch/LowerPopsInterlock.cpp rename to lgc/lowering/LowerPopsInterlock.cpp index 17937da018..d5f6cfe999 100644 --- a/lgc/patch/LowerPopsInterlock.cpp +++ b/lgc/lowering/LowerPopsInterlock.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -45,13 +45,13 @@ using namespace llvm; namespace lgc { // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] func : LLVM function to be run on // @param [in/out] funcAnalysisManager : Analysis manager to use for this transformation // @returns : The preserved analyses (The analyses that are still valid after this pass) PreservedAnalyses LowerPopsInterlock::run(Function &func, FunctionAnalysisManager &funcAnalysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Lower-POPS-Interlock\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Pops-Interlock\n"); // Not fragment shader, skip if (getShaderStage(&func) != ShaderStageEnum::Fragment) diff --git a/lgc/patch/LowerPopsInterlock.h b/lgc/lowering/LowerPopsInterlock.h similarity index 97% rename from lgc/patch/LowerPopsInterlock.h rename to lgc/lowering/LowerPopsInterlock.h index 8fde811aa9..3e60d933a0 100644 --- a/lgc/patch/LowerPopsInterlock.h +++ b/lgc/lowering/LowerPopsInterlock.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/LowerRayQueryWrapper.cpp b/lgc/lowering/LowerRayQueryWrapper.cpp similarity index 96% rename from lgc/patch/LowerRayQueryWrapper.cpp rename to lgc/lowering/LowerRayQueryWrapper.cpp index 5f3f20bc00..cbf799e0d8 100644 --- a/lgc/patch/LowerRayQueryWrapper.cpp +++ b/lgc/lowering/LowerRayQueryWrapper.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/LowerRayQueryWrapper.h b/lgc/lowering/LowerRayQueryWrapper.h similarity index 95% rename from lgc/patch/LowerRayQueryWrapper.h rename to lgc/lowering/LowerRayQueryWrapper.h index b3e9e639f1..ecdeae71db 100644 --- a/lgc/patch/LowerRayQueryWrapper.h +++ b/lgc/lowering/LowerRayQueryWrapper.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/LowerReadFirstLane.cpp b/lgc/lowering/LowerReadFirstLane.cpp similarity index 99% rename from lgc/patch/LowerReadFirstLane.cpp rename to lgc/lowering/LowerReadFirstLane.cpp index 7689818d7e..7a553d804c 100644 --- a/lgc/patch/LowerReadFirstLane.cpp +++ b/lgc/lowering/LowerReadFirstLane.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,8 +28,8 @@ * @brief LLPC source file: contains declaration and implementation of class lgc::LowerReadFirstLane. *********************************************************************************************************************** */ -#include "lgc/patch/LowerReadFirstLane.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LowerReadFirstLane.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineState.h" #include "lgc/util/BuilderBase.h" #include "llvm/Analysis/TargetTransformInfo.h" diff --git a/lgc/patch/LowerSubgroupOps.cpp b/lgc/lowering/LowerSubgroupOps.cpp similarity index 95% rename from lgc/patch/LowerSubgroupOps.cpp rename to lgc/lowering/LowerSubgroupOps.cpp index 621a7f968d..dda6d0ed39 100644 --- a/lgc/patch/LowerSubgroupOps.cpp +++ b/lgc/lowering/LowerSubgroupOps.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ *********************************************************************************************************************** */ -#include "lgc/patch/LowerSubgroupOps.h" +#include "lgc/lowering/LowerSubgroupOps.h" #include "lgc/LgcContext.h" #include "lgc/LgcDialect.h" #include "lgc/builder/SubgroupBuilder.h" @@ -46,14 +46,14 @@ using namespace lgc; namespace lgc { // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation // @returns : The preserved analyses (The analyses that are still valid after this pass) PreservedAnalyses LowerSubgroupOps::run(Module &module, ModuleAnalysisManager &analysisManager) { PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); - LLVM_DEBUG(dbgs() << "Run the pass lower subgroup ops\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Subgroup-Ops\n"); m_pipelineState = pipelineState; diff --git a/lgc/patch/MeshTaskShader.cpp b/lgc/lowering/MeshTaskShader.cpp similarity index 99% rename from lgc/patch/MeshTaskShader.cpp rename to lgc/lowering/MeshTaskShader.cpp index 6d1a284f3c..ad01a337a7 100644 --- a/lgc/patch/MeshTaskShader.cpp +++ b/lgc/lowering/MeshTaskShader.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,8 +31,8 @@ #include "MeshTaskShader.h" #include "ShaderMerger.h" #include "lgc/Debug.h" -#include "lgc/patch/LgcLowering.h" -#include "lgc/patch/MutateEntryPoint.h" +#include "lgc/lowering/LgcLowering.h" +#include "lgc/lowering/MutateEntryPoint.h" #include "lgc/util/WorkgroupLayout.h" #include "llvm-dialects/Dialect/Visitor.h" #include "llvm/IR/IRBuilder.h" @@ -1571,12 +1571,10 @@ void MeshTaskShader::lowerGetMeshBuiltinInput(GetMeshBuiltinInputOp &getMeshBuil unsigned workgroupSizeY = mode.workgroupSizeY; unsigned workgroupSizeZ = mode.workgroupSizeZ; SwizzleWorkgroupLayout layout = calculateWorkgroupLayout(m_pipelineState, ShaderStage::Mesh); + input = getMeshLocalInvocationId(); if ((layout.microLayout == WorkgroupLayout::Quads) || (layout.macroLayout == WorkgroupLayout::SexagintiQuads)) { - input = getMeshLocalInvocationId(true /* foldXY = true */); input = reconfigWorkgroupLayout(input, m_pipelineState, ShaderStage::Mesh, layout.macroLayout, layout.microLayout, workgroupSizeX, workgroupSizeY, workgroupSizeZ, false, m_builder); - } else { - input = getMeshLocalInvocationId(); } break; } @@ -2742,9 +2740,8 @@ Value *MeshTaskShader::getMeshWorkgroupId() { // ===================================================================================================================== // Get the built-in LocalInvocationId of mesh shader. // -// @param foldXY : Specify whether the locationId.x and locationId.y should be folded. // @returns : Value of the built-in LocalInvocationId -Value *MeshTaskShader::getMeshLocalInvocationId(bool foldXY) { +Value *MeshTaskShader::getMeshLocalInvocationId() { auto entryPoint = m_builder.GetInsertBlock()->getParent(); assert(getShaderStage(entryPoint) == ShaderStage::Mesh); // Must be mesh shader @@ -2789,18 +2786,8 @@ Value *MeshTaskShader::getMeshLocalInvocationId(bool foldXY) { diff = m_builder.CreateSub(localInvocationIndex, diff); localInvocationIdY = m_builder.CreateUDiv(diff, workgroupSizeX, "localInvocationIdY"); - if (foldXY) { - localInvocationIdX = diff; - // Unused dimensions need zero-initializing. - if (meshMode.workgroupSizeZ <= 1) { - if (meshMode.workgroupSizeY <= 1) - localInvocationIdY = m_builder.getInt32(0); - localInvocationIdZ = m_builder.getInt32(0); - } - } else { - localInvocationIdX = m_builder.CreateMul(workgroupSizeX, localInvocationIdY); - localInvocationIdX = m_builder.CreateSub(diff, localInvocationIdX, "localInvocationIdX"); - } + localInvocationIdX = m_builder.CreateMul(workgroupSizeX, localInvocationIdY); + localInvocationIdX = m_builder.CreateSub(diff, localInvocationIdX, "localInvocationIdX"); } Value *localInvocationId = PoisonValue::get(FixedVectorType::get(m_builder.getInt32Ty(), 3)); diff --git a/lgc/patch/MeshTaskShader.h b/lgc/lowering/MeshTaskShader.h similarity index 98% rename from lgc/patch/MeshTaskShader.h rename to lgc/lowering/MeshTaskShader.h index 9505aefb59..c13cb84fe3 100644 --- a/lgc/patch/MeshTaskShader.h +++ b/lgc/lowering/MeshTaskShader.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,8 +31,8 @@ #pragma once #include "lgc/LgcDialect.h" -#include "lgc/patch/PreparePipelineAbi.h" -#include "lgc/patch/SystemValues.h" +#include "lgc/lowering/PreparePipelineAbi.h" +#include "lgc/lowering/SystemValues.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" @@ -142,7 +142,7 @@ class MeshTaskShader { llvm::Value *getMeshFlatWorkgroupId(); llvm::Value *getMeshNumWorkgroups(); llvm::Value *getMeshWorkgroupId(); - llvm::Value *getMeshLocalInvocationId(bool foldXY = false); + llvm::Value *getMeshLocalInvocationId(); llvm::Value *getMeshLocalInvocationIndex(); llvm::Value *getMeshGlobalInvocationId(); diff --git a/lgc/patch/MutateEntryPoint.cpp b/lgc/lowering/MutateEntryPoint.cpp similarity index 99% rename from lgc/patch/MutateEntryPoint.cpp rename to lgc/lowering/MutateEntryPoint.cpp index 5968bda20f..005b7182ce 100644 --- a/lgc/patch/MutateEntryPoint.cpp +++ b/lgc/lowering/MutateEntryPoint.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -53,7 +53,7 @@ *********************************************************************************************************************** */ -#include "lgc/patch/MutateEntryPoint.h" +#include "lgc/lowering/MutateEntryPoint.h" #include "ShaderMerger.h" #include "compilerutils/CompilerUtils.h" #include "llvmraytracing/ContinuationsUtil.h" @@ -61,8 +61,8 @@ #include "lgc/LgcCpsDialect.h" #include "lgc/LgcDialect.h" #include "lgc/LgcRtDialect.h" -#include "lgc/patch/ShaderInputs.h" -#include "lgc/patch/SystemValues.h" +#include "lgc/lowering/ShaderInputs.h" +#include "lgc/lowering/SystemValues.h" #include "lgc/state/AbiMetadata.h" #include "lgc/state/AbiUnlinked.h" #include "lgc/state/IntrinsDefs.h" @@ -113,7 +113,7 @@ MutateEntryPoint::UserDataArg::UserDataArg(llvm::Type *argTy, const llvm::Twine } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM module. +// Executes this LGC lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/lgc/patch/NggPrimShader.cpp b/lgc/lowering/NggPrimShader.cpp similarity index 99% rename from lgc/patch/NggPrimShader.cpp rename to lgc/lowering/NggPrimShader.cpp index 4070e47d31..c56f76c6cf 100644 --- a/lgc/patch/NggPrimShader.cpp +++ b/lgc/lowering/NggPrimShader.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -32,7 +32,7 @@ #include "ShaderMerger.h" #include "lgc/Debug.h" #include "lgc/LgcDialect.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PalMetadata.h" #include "llvm-dialects/Dialect/Visitor.h" #include "llvm/IR/Constants.h" diff --git a/lgc/patch/NggPrimShader.h b/lgc/lowering/NggPrimShader.h similarity index 99% rename from lgc/patch/NggPrimShader.h rename to lgc/lowering/NggPrimShader.h index 4150e51fc0..5d1cb13ab6 100644 --- a/lgc/patch/NggPrimShader.h +++ b/lgc/lowering/NggPrimShader.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/PassRegistry.inc b/lgc/lowering/PassRegistry.inc similarity index 94% rename from lgc/patch/PassRegistry.inc rename to lgc/lowering/PassRegistry.inc index 8298a4ee03..71aecd4119 100644 --- a/lgc/patch/PassRegistry.inc +++ b/lgc/lowering/PassRegistry.inc @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -25,7 +25,7 @@ /** *********************************************************************************************************************** * @file PassRegistry.inc - * @brief LLPC header file: used as the registry of LLPC patching passes + * @brief LLPC header file: used as the registry of LGC lowering passes *********************************************************************************************************************** */ @@ -62,13 +62,13 @@ LLPC_MODULE_PASS("lgc-lower-in-out", LowerInOut) LLPC_FUNCTION_PASS("lgc-lower-invariant-loads", LowerInvariantLoads) LLPC_MODULE_PASS("lgc-set-up-target-features", SetUpTargetFeatures) LLPC_MODULE_PASS("lgc-generate-copy-shader", GenerateCopyShader) -LLPC_MODULE_PASS("lgc-patch-prepare-pipeline-abi", PreparePipelineAbi) +LLPC_MODULE_PASS("lgc-prepare-pipeline-abi", PreparePipelineAbi) LLPC_FUNCTION_PASS("lgc-lower-read-first-lane", LowerReadFirstLane) LLPC_MODULE_PASS("lgc-include-llvm-ir", IncludeLlvmIr) LLPC_FUNCTION_PASS("lgc-peephole-optimization", PeepholeOptimization) LLPC_MODULE_PASS("lgc-lower-subgroup-ops", LowerSubgroupOps) LLPC_MODULE_PASS("lgc-mutate-entry-point", MutateEntryPoint) -LLPC_MODULE_PASS("lgc-patch-check-shader-cache", CheckShaderCache) +LLPC_MODULE_PASS("lgc-check-shader-cache", CheckShaderCache) LLPC_LOOP_PASS("lgc-add-loop-metadata", AddLoopMetadata) LLPC_FUNCTION_PASS("lgc-structurize-buffers", StructurizeBuffers) LLPC_FUNCTION_PASS("lgc-lower-buffer-operations", LowerBufferOperations) diff --git a/lgc/patch/PassthroughHullShader.cpp b/lgc/lowering/PassthroughHullShader.cpp similarity index 98% rename from lgc/patch/PassthroughHullShader.cpp rename to lgc/lowering/PassthroughHullShader.cpp index 9529503d54..25ddcc1b16 100644 --- a/lgc/patch/PassthroughHullShader.cpp +++ b/lgc/lowering/PassthroughHullShader.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,11 +28,11 @@ * @brief LLPC source file: contains declaration and implementation of class lgc::PassthroughHullShader. *********************************************************************************************************************** */ -#include "lgc/patch/PassthroughHullShader.h" +#include "lgc/lowering/PassthroughHullShader.h" #include "lgc/LgcContext.h" #include "lgc/LgcDialect.h" #include "lgc/builder/BuilderImpl.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/IntrinsDefs.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineShaders.h" @@ -57,7 +57,7 @@ using namespace llvm; // @param analysisManager : Analysis manager to use for this transformation // @returns : The preserved analyses (The analyses that are still valid after this pass) PreservedAnalyses PassthroughHullShader::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass pass-through hull shader\n"); + LLVM_DEBUG(dbgs() << "Run the pass Passthrough-Null-Shader\n"); PipelineShadersResult &pipelineShaders = analysisManager.getResult(module); PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); diff --git a/lgc/patch/PeepholeOptimization.cpp b/lgc/lowering/PeepholeOptimization.cpp similarity index 97% rename from lgc/patch/PeepholeOptimization.cpp rename to lgc/lowering/PeepholeOptimization.cpp index 7d0eca2bb0..73161afde0 100644 --- a/lgc/patch/PeepholeOptimization.cpp +++ b/lgc/lowering/PeepholeOptimization.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,9 +28,9 @@ * @brief LLPC source file: contains implementation of class lgc::PeepholeOptimization. *********************************************************************************************************************** */ -#include "lgc/patch/PeepholeOptimization.h" +#include "lgc/lowering/PeepholeOptimization.h" #include "lgc/Builder.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineState.h" #include "lgc/util/Internal.h" #include "llvm/IR/Constants.h" @@ -74,7 +74,7 @@ class PeepholeOptimizer : public llvm::InstVisitor { // @param [in/out] analysisManager : Analysis manager to use for this transformation // @returns : The preserved analyses (The analyses that are still valid after this pass) PreservedAnalyses PeepholeOptimization::run(Function &function, FunctionAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Peephole optimization\n"); + LLVM_DEBUG(dbgs() << "Run the pass Peephole-Optimization\n"); const auto &moduleAnalysisManager = analysisManager.getResult(function); PipelineState *pipelineState = diff --git a/lgc/patch/PreparePipelineAbi.cpp b/lgc/lowering/PreparePipelineAbi.cpp similarity index 99% rename from lgc/patch/PreparePipelineAbi.cpp rename to lgc/lowering/PreparePipelineAbi.cpp index 7b35da7269..fc3e633cd1 100644 --- a/lgc/patch/PreparePipelineAbi.cpp +++ b/lgc/lowering/PreparePipelineAbi.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::PreparePipelineAbi. *********************************************************************************************************************** */ -#include "lgc/patch/PreparePipelineAbi.h" +#include "lgc/lowering/PreparePipelineAbi.h" #include "MeshTaskShader.h" #include "RegisterMetadataBuilder.h" #include "ShaderMerger.h" @@ -38,7 +38,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" -#define DEBUG_TYPE "lgc-patch-prepare-pipeline-abi" +#define DEBUG_TYPE "lgc-prepare-pipeline-abi" using namespace llvm; using namespace lgc; @@ -70,7 +70,7 @@ PreservedAnalyses PreparePipelineAbi::run(Module &module, ModuleAnalysisManager analysisHandlers.getPostDomTree = getPostDomTree; analysisHandlers.getCycleInfo = getCycleInfo; - LLVM_DEBUG(dbgs() << "Run the pass Patch-Prepare-Pipeline-Abi\n"); + LLVM_DEBUG(dbgs() << "Run the pass Prepare-Pipeline-Abi\n"); Patch::init(&module); diff --git a/lgc/patch/RegisterMetadataBuilder.cpp b/lgc/lowering/RegisterMetadataBuilder.cpp similarity index 99% rename from lgc/patch/RegisterMetadataBuilder.cpp rename to lgc/lowering/RegisterMetadataBuilder.cpp index cc77461ed5..8a2df10879 100644 --- a/lgc/patch/RegisterMetadataBuilder.cpp +++ b/lgc/lowering/RegisterMetadataBuilder.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/RegisterMetadataBuilder.h b/lgc/lowering/RegisterMetadataBuilder.h similarity index 97% rename from lgc/patch/RegisterMetadataBuilder.h rename to lgc/lowering/RegisterMetadataBuilder.h index 3683aabd00..936b668b06 100644 --- a/lgc/patch/RegisterMetadataBuilder.h +++ b/lgc/lowering/RegisterMetadataBuilder.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/ScalarizeLoads.cpp b/lgc/lowering/ScalarizeLoads.cpp similarity index 97% rename from lgc/patch/ScalarizeLoads.cpp rename to lgc/lowering/ScalarizeLoads.cpp index 22ea17fd6d..136f0b5228 100644 --- a/lgc/patch/ScalarizeLoads.cpp +++ b/lgc/lowering/ScalarizeLoads.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: contains implementation of class lgc::ScalarizeLoads. *********************************************************************************************************************** */ -#include "lgc/patch/ScalarizeLoads.h" +#include "lgc/lowering/ScalarizeLoads.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/IR/Constants.h" @@ -59,7 +59,7 @@ PreservedAnalyses ScalarizeLoads::run(Function &function, FunctionAnalysisManage PipelineState *pipelineState = moduleAnalysisManager.getCachedResult(*function.getParent())->getPipelineState(); - LLVM_DEBUG(dbgs() << "Run the pass Patch-Load-Scalarizer-Opt\n"); + LLVM_DEBUG(dbgs() << "Run the pass Scalarize-Loads\n"); auto shaderStage = lgc::getShaderStage(&function); diff --git a/lgc/patch/SetupTargetFeatures.cpp b/lgc/lowering/SetupTargetFeatures.cpp similarity index 97% rename from lgc/patch/SetupTargetFeatures.cpp rename to lgc/lowering/SetupTargetFeatures.cpp index 734b79ffef..fdd7ce5e44 100644 --- a/lgc/patch/SetupTargetFeatures.cpp +++ b/lgc/lowering/SetupTargetFeatures.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,8 +28,8 @@ * @brief LLPC source file: contains declaration and implementation of class lgc::SetUpTargetFeatures. *********************************************************************************************************************** */ -#include "lgc/patch/SetupTargetFeatures.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/SetupTargetFeatures.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" #include "llvm/Pass.h" @@ -49,7 +49,7 @@ using namespace lgc; PreservedAnalyses SetUpTargetFeatures::run(Module &module, ModuleAnalysisManager &analysisManager) { PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); - LLVM_DEBUG(dbgs() << "Run the pass Patch-Setup-Target-Features\n"); + LLVM_DEBUG(dbgs() << "Run the pass Set-up-Target-Features\n"); Patch::init(&module); diff --git a/lgc/patch/ShaderInputs.cpp b/lgc/lowering/ShaderInputs.cpp similarity index 99% rename from lgc/patch/ShaderInputs.cpp rename to lgc/lowering/ShaderInputs.cpp index b447a41784..63de04d59d 100644 --- a/lgc/patch/ShaderInputs.cpp +++ b/lgc/lowering/ShaderInputs.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ * methods for special user data) *********************************************************************************************************************** */ -#include "lgc/patch/ShaderInputs.h" +#include "lgc/lowering/ShaderInputs.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineState.h" #include "lgc/state/ResourceUsage.h" diff --git a/lgc/patch/ShaderMerger.cpp b/lgc/lowering/ShaderMerger.cpp similarity index 99% rename from lgc/patch/ShaderMerger.cpp rename to lgc/lowering/ShaderMerger.cpp index 89f2c9a9be..d6179c690f 100644 --- a/lgc/patch/ShaderMerger.cpp +++ b/lgc/lowering/ShaderMerger.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,9 +30,9 @@ */ #include "ShaderMerger.h" #include "NggPrimShader.h" -#include "lgc/patch/LgcLowering.h" -#include "lgc/patch/PreparePipelineAbi.h" -#include "lgc/patch/SystemValues.h" +#include "lgc/lowering/LgcLowering.h" +#include "lgc/lowering/PreparePipelineAbi.h" +#include "lgc/lowering/SystemValues.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" diff --git a/lgc/patch/ShaderMerger.h b/lgc/lowering/ShaderMerger.h similarity index 98% rename from lgc/patch/ShaderMerger.h rename to lgc/lowering/ShaderMerger.h index 6cebf1aee2..91852bc775 100644 --- a/lgc/patch/ShaderMerger.h +++ b/lgc/lowering/ShaderMerger.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/lgc/patch/StructurizeBuffers.cpp b/lgc/lowering/StructurizeBuffers.cpp similarity index 96% rename from lgc/patch/StructurizeBuffers.cpp rename to lgc/lowering/StructurizeBuffers.cpp index 16e695bac1..4d96d3af55 100644 --- a/lgc/patch/StructurizeBuffers.cpp +++ b/lgc/lowering/StructurizeBuffers.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ *********************************************************************************************************************** */ -#include "lgc/patch/StructurizeBuffers.h" +#include "lgc/lowering/StructurizeBuffers.h" #include "compilerutils/CompilerUtils.h" #include "lgc/CommonDefs.h" #include "lgc/LgcDialect.h" @@ -62,7 +62,7 @@ struct StructurizeBuffersImpl { } // anonymous namespace // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM function. +// Executes this LGC lowering pass on the specified LLVM function. // // @param [in/out] function : LLVM function to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation @@ -89,7 +89,7 @@ void StructurizeBuffersImpl::visitBufferIndex(BufferIndexOp &bufferIndex) { } // ===================================================================================================================== -// Executes this LLVM patching pass on the specified LLVM function. +// Executes this LGC lowering pass on the specified LLVM function. // // @param [in/out] function : LLVM function to be run on // @returns : True if the function was modified by the transformation and false otherwise diff --git a/lgc/patch/SystemValues.cpp b/lgc/lowering/SystemValues.cpp similarity index 99% rename from lgc/patch/SystemValues.cpp rename to lgc/lowering/SystemValues.cpp index fe74678da8..39c73e10db 100644 --- a/lgc/patch/SystemValues.cpp +++ b/lgc/lowering/SystemValues.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,7 +28,7 @@ * @brief LLPC source file: per-shader per-pass generating and cache of shader system pointers *********************************************************************************************************************** */ -#include "lgc/patch/SystemValues.h" +#include "lgc/lowering/SystemValues.h" #include "ShaderMerger.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" diff --git a/lgc/patch/VertexFetch.cpp b/lgc/lowering/VertexFetch.cpp similarity index 90% rename from lgc/patch/VertexFetch.cpp rename to lgc/lowering/VertexFetch.cpp index 6485180b1c..367a3412cd 100644 --- a/lgc/patch/VertexFetch.cpp +++ b/lgc/lowering/VertexFetch.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -28,12 +28,12 @@ * @brief LGC source file: Vertex fetch manager, and pass that uses it *********************************************************************************************************************** */ -#include "lgc/patch/VertexFetch.h" +#include "lgc/lowering/VertexFetch.h" #include "lgc/LgcContext.h" #include "lgc/LgcDialect.h" #include "lgc/builder/BuilderImpl.h" -#include "lgc/patch/LgcLowering.h" -#include "lgc/patch/ShaderInputs.h" +#include "lgc/lowering/LgcLowering.h" +#include "lgc/lowering/ShaderInputs.h" #include "lgc/state/IntrinsDefs.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/PipelineState.h" @@ -63,6 +63,9 @@ static constexpr unsigned FetchShaderInternalBufferBinding = 5; // Descriptor bi static constexpr unsigned CurrentAttributeBufferBinding = 1; // Descriptor binding for current attribute static constexpr unsigned GenericVertexFetchShaderBinding = 0; // Descriptor binding for generic vertex fetch shader static constexpr unsigned VertexInputBindingCurrent = 64; // Vertex input binding for current attribute +static constexpr unsigned BaseInstanceOffsetBinding = 48; // Descriptor binding to load BaseInstanceOffset +static constexpr unsigned IndirectVertexIdBinding = 49; // Descriptor binding to load vertexId +static constexpr unsigned IndirectBaseInstanceBinding = 50; // Descriptor binding to load BaseInstance // Represents vertex component info corresponding to vertex data format (BufDataFormat). // @@ -96,12 +99,16 @@ class VertexFetchImpl : public VertexFetch { // Generate code to fetch a vertex value Value *fetchVertex(Type *inputTy, const VertexInputDescription *description, unsigned location, unsigned compIdx, - BuilderImpl &builderImpl, llvm::Value *vertexIndex, llvm::Value *instanceIndex) override; + BuilderImpl &builderImpl, Value *vertexIndex, Value *instanceIndex) override; // Generate code to fetch a vertex value for uber shader Value *fetchVertex(LoadVertexInputOp *inst, Value *descPtr, Value *locMasks, BuilderBase &builder, bool disablePerCompFetch) override; + // Generate code to fetch baseInstanceOffset, baseInstance or vertexId + void mutateVertexBuiltinValue(const PipelineState *pipelineState, Value *vertexId, Value *instanceId, Value *drawId, + Value *baseVertex, Value *baseInstance, BuilderImpl &builder) override; + private: // Gets variable corresponding to vertex index Value *getVertexIndex() { return m_vertexIndex; } @@ -143,6 +150,7 @@ class VertexFetchImpl : public VertexFetch { Value *m_curAttribBufferDescr = nullptr; // Current attribute buffer descriptor; Value *m_vertexIndex = nullptr; // Vertex index Value *m_instanceIndex = nullptr; // Instance index + Value *m_baseInstance = nullptr; // BaseInstance bool m_useSoftwareVertexBufferDescriptors = false; // Use software vertex buffer descriptors to structure SRD. bool m_vbAddressLowBitsKnown = false; // Use vertex buffer offset low bits from driver. @@ -661,6 +669,14 @@ PreservedAnalyses LowerVertexFetch::run(Module &module, ModuleAnalysisManager &a return PreservedAnalyses::none(); } + bool mutateVertexBuiltIns = false; + for (const auto &vertexInput : pipelineState->getVertexInputDescriptions()) { + if (vertexInput.binding == BaseInstanceOffsetBinding || vertexInput.binding == IndirectBaseInstanceBinding || + vertexInput.binding == IndirectVertexIdBinding) { + mutateVertexBuiltIns = true; + } + } + // Whole-pipeline compilation (or shader compilation where we were given the vertex input descriptions). // Lower each vertex fetch. for (LoadVertexInputOp *fetch : vertexFetches) { @@ -683,12 +699,29 @@ PreservedAnalyses LowerVertexFetch::run(Module &module, ModuleAnalysisManager &a builder.SetInsertPoint(fetch); builder.setShaderStage(ShaderStage::Vertex); - // Get vertexIndex and instanceIndex from function args for transform shader Value *vertexIndex = nullptr; Value *instanceIndex = nullptr; + // Get vertexIndex and instanceIndex from function args for transform pipeline if (lgc::getShaderStage(fetch->getFunction()) == ShaderStage::Compute) { - vertexIndex = fetch->getVertexIndex(); - instanceIndex = fetch->getInstanceIndex(); + Value *vertexId = fetch->getVertexId(); + Value *instanceId = fetch->getInstanceId(); + Value *baseVertex = fetch->getBaseVertex(); + Value *baseInstance = fetch->getBaseInstance(); + Value *drawId = fetch->getDrawId(); + + // Mutate vertex built-in inputs for transform pipeline + if (mutateVertexBuiltIns) { + vertexFetch->mutateVertexBuiltinValue(pipelineState, vertexId, instanceId, drawId, baseVertex, baseInstance, + builder); + } else { + vertexIndex = builder.CreateAdd(vertexId, baseVertex); + instanceIndex = builder.CreateAdd(instanceId, baseInstance); + } + } else { + // Mutate vertex built-in inputs for graphics pipeline + if (mutateVertexBuiltIns) { + vertexFetch->mutateVertexBuiltinValue(pipelineState, nullptr, nullptr, nullptr, nullptr, nullptr, builder); + } } vertex = vertexFetch->fetchVertex(fetch->getType(), description, location, component, builder, vertexIndex, @@ -1197,8 +1230,8 @@ Type *VertexFetchImpl::getVertexFetchType(bool isFloat, unsigned byteSize, Build // @param vertexIndex : Vertex index, unique for each vertex // @param instanceIndex : Instance index, unique for each instance Value *VertexFetchImpl::fetchVertex(Type *inputTy, const VertexInputDescription *description, unsigned location, - unsigned compIdx, BuilderImpl &builderImpl, llvm::Value *vertexIndex, - llvm::Value *instanceIndex) { + unsigned compIdx, BuilderImpl &builderImpl, Value *vertexIndex, + Value *instanceIndex) { Value *vertex = nullptr; BuilderBase &builder = BuilderBase::get(builderImpl); Instruction *insertPos = &*builder.GetInsertPoint(); @@ -1213,7 +1246,8 @@ Value *VertexFetchImpl::fetchVertex(Type *inputTy, const VertexInputDescription m_instanceIndex = instanceIndex; Value *vbIndex = nullptr; - if (description->inputRate == VertexInputRateVertex) { + if (description->inputRate == VertexInputRateVertex || description->inputRate == VertexInputRatePerDrawPerVertex || + description->inputRate == VertexInputRatePerDraw) { // Use vertex index if (!m_vertexIndex) { IRBuilder<>::InsertPointGuard guard(builder); @@ -1222,8 +1256,10 @@ Value *VertexFetchImpl::fetchVertex(Type *inputTy, const VertexInputDescription } vbIndex = m_vertexIndex; } else { + if (!m_baseInstance) + m_baseInstance = ShaderInputs::getSpecialUserData(UserDataMapping::BaseInstance, builder); if (description->divisor == 0) { - vbIndex = ShaderInputs::getSpecialUserData(UserDataMapping::BaseInstance, builder); + vbIndex = m_baseInstance; } else if (description->divisor == 1) { // Use instance index if (!m_instanceIndex) { @@ -1236,7 +1272,7 @@ Value *VertexFetchImpl::fetchVertex(Type *inputTy, const VertexInputDescription // There is a divisor. vbIndex = builder.CreateUDiv(ShaderInputs::getInput(ShaderInput::InstanceId, builder, *m_lgcContext), builder.getInt32(description->divisor)); - vbIndex = builder.CreateAdd(vbIndex, ShaderInputs::getSpecialUserData(UserDataMapping::BaseInstance, builder)); + vbIndex = builder.CreateAdd(vbIndex, m_baseInstance); } } @@ -1352,6 +1388,117 @@ Value *VertexFetchImpl::fetchVertex(Type *inputTy, const VertexInputDescription return vertex; } +// ===================================================================================================================== +// Fetch baseInstanceOffset from perDraw vertex buffer, fetch baseInstance or vertexId from indirect buffer +// +// @param pipelineState : pointer of pipeline state +// @param vertexId : Vertex ID, unique for each vertex +// @param instanceId : Instance ID, unique for each instance +// @param drawId : Draw ID, unique for each draw +// @param baseVertex : The first vertex ID of the current draw command +// @param baseInstance : The first instance ID of the current draw command +// @param builderImpl : Builder to use to insert vertex fetch instructions +void VertexFetchImpl::mutateVertexBuiltinValue(const PipelineState *pipelineState, Value *vertexId, Value *instanceId, + Value *drawId, Value *baseVertex, Value *baseInstance, + BuilderImpl &builderImpl) { + BuilderBase &builder = BuilderBase::get(builderImpl); + + Value *inputVertexId = nullptr; + Value *inputInstanceId = nullptr; + Value *inputDrawId = nullptr; + Value *inputBaseVertex = nullptr; + Value *inputBaseInstance = nullptr; + + if (vertexId) { + // Transform pipeline, get all the built-in inputs from function args + assert(instanceId && drawId && baseVertex && baseInstance); + + inputVertexId = vertexId; + inputInstanceId = instanceId; + inputDrawId = drawId; + inputBaseVertex = baseVertex; + inputBaseInstance = baseInstance; + } else { + // Graphics pipeline, get all the built-in inputs from shader input or user data register + inputVertexId = ShaderInputs::getInput(ShaderInput::VertexId, builder, *m_lgcContext); + inputInstanceId = ShaderInputs::getInput(ShaderInput::InstanceId, builder, *m_lgcContext); + + IRBuilder<>::InsertPointGuard guard(builder); + builder.SetInsertPointPastAllocas(builder.GetInsertBlock()->getParent()); + + inputDrawId = ShaderInputs::getSpecialUserData(UserDataMapping::DrawIndex, builder); + inputBaseVertex = ShaderInputs::getSpecialUserData(UserDataMapping::BaseVertex, builder); + inputBaseInstance = ShaderInputs::getSpecialUserData(UserDataMapping::BaseInstance, builder); + } + + // lambda: helper function to fetch values from per-draw vertex buffer or multi-draw indirect buffer + auto fetchBufferValue = [this, &builderImpl](const VertexInputDescription &description, Value *desc, Value *vbIndex) { + const VertexCompFormatInfo *compFormatInfo = getVertexComponentFormatInfo(description.dfmt); + const VertexNumFormatInfo *numFormatInfo = getVertexNumericFormatInfo(description.nfmt); + Type *inputCompTy = Type::getInt32Ty(*m_context); + const unsigned numChannels = 4; + const unsigned inputCompBytes = 4; + + Value *vertexFetch = nullptr; + addVertexFetchInst(desc, vbIndex, nullptr, inputCompTy, numChannels, description.offset, compFormatInfo->fetchDfmt, + description.nfmt, inputCompBytes, inputCompBytes, numFormatInfo->isSigned, false, false, + builderImpl, &vertexFetch); + + return builderImpl.CreateExtractElement(vertexFetch, builderImpl.getInt32(0)); + }; + + for (const auto &description : pipelineState->getVertexInputDescriptions()) { + if (description.binding == BaseInstanceOffsetBinding || description.binding == IndirectBaseInstanceBinding || + description.binding == IndirectVertexIdBinding) { + + Value *desc = nullptr; + Value *vbIndex = nullptr; + unsigned binding = description.binding; + + // Fetch baseInstanceOffset from per-draw vertex buffer + if (binding == BaseInstanceOffsetBinding) { + desc = builderImpl.CreateBufferDesc(InternalDescriptorSetId, binding, inputDrawId, Builder::BufferFlagConst, + false); + if (description.inputRate == VertexInputRateVertex || + description.inputRate == VertexInputRatePerDrawPerVertex) { + vbIndex = inputVertexId; + } else { + assert(description.inputRate == VertexInputRateInstance || + description.inputRate == VertexInputRatePerDrawPerInstance); + vbIndex = inputInstanceId; + } + + // Get baseInstanceOffset from per-draw vertex buffer, calculate actual gl_BaseInstance and gl_InstanceIndex + // gl_BaseInstance = inputBaseInstance + baseInstanceOffset + // gl_InstanceIndex = gl_baseInstance + inputInstanceId; + Value *baseInstanceOffset = fetchBufferValue(description, desc, vbIndex); + m_baseInstance = builder.CreateAdd(inputBaseInstance, baseInstanceOffset, "BaseInstance"); + m_instanceIndex = builder.CreateAdd(m_baseInstance, inputInstanceId, "InstanceIndex"); + + } else if (binding == IndirectBaseInstanceBinding) { + desc = loadVertexBufferDescriptor(binding, builderImpl); + if (description.inputRate == VertexInputRatePerDraw) { + vbIndex = inputDrawId; + } else { + vbIndex = inputVertexId; + } + + // Get actual gl_BaseInstance from indirect draw buffer and calculate gl_InstanceIndex + m_baseInstance = fetchBufferValue(description, desc, vbIndex); + m_instanceIndex = builder.CreateAdd(m_baseInstance, inputInstanceId, "InstanceIndex"); + + } else if (binding == IndirectVertexIdBinding) { + desc = loadVertexBufferDescriptor(binding, builderImpl); + vbIndex = inputVertexId; + + // Get actual gl_VertexID from indirect draw buffer and calculate gl_VertexIndex + Value *vertexId = fetchBufferValue(description, desc, vbIndex); + m_vertexIndex = builder.CreateAdd(inputBaseVertex, vertexId, "VertexIndex"); + } + } + } +} + // ===================================================================================================================== // Gets component info from table according to vertex buffer data format. // diff --git a/lgc/patch/WorkaroundDsSubdwordWrite.cpp b/lgc/lowering/WorkaroundDsSubdwordWrite.cpp similarity index 95% rename from lgc/patch/WorkaroundDsSubdwordWrite.cpp rename to lgc/lowering/WorkaroundDsSubdwordWrite.cpp index 904f84da5f..6fb2387546 100644 --- a/lgc/patch/WorkaroundDsSubdwordWrite.cpp +++ b/lgc/lowering/WorkaroundDsSubdwordWrite.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ *********************************************************************************************************************** */ -#include "lgc/patch/WorkaroundDsSubdwordWrite.h" +#include "lgc/lowering/WorkaroundDsSubdwordWrite.h" #include "lgc/builder/BuilderImpl.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" @@ -61,7 +61,7 @@ namespace lgc { // @param [in/out] analysisManager : Analysis manager to use for this transformation // @returns : The preserved analyses (The analyses that are still valid after this pass) PreservedAnalyses WorkaroundDsSubdwordWrite::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass WorkaroundDsSubdwordWrite\n"); + LLVM_DEBUG(dbgs() << "Run the pass Workaround-Ds-Subword-Write\n"); PipelineState *pipelineState = analysisManager.getResult(module).getPipelineState(); bool workaroundSubdwordWrite = 0; if (WorkaroundSubdwordWrite.getNumOccurrences()) diff --git a/lgc/state/Compiler.cpp b/lgc/state/Compiler.cpp index 011fe76d86..fd193ca20a 100644 --- a/lgc/state/Compiler.cpp +++ b/lgc/state/Compiler.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,7 +31,7 @@ #include "llvmraytracing/Continuations.h" #include "lgc/LgcContext.h" #include "lgc/PassManager.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm/Analysis/TargetTransformInfo.h" diff --git a/lgc/state/LgcContext.cpp b/lgc/state/LgcContext.cpp index 43e36b293d..a2f414cc76 100644 --- a/lgc/state/LgcContext.cpp +++ b/lgc/state/LgcContext.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -33,7 +33,7 @@ #include "lgc/Debug.h" #include "lgc/LgcDialect.h" #include "lgc/PassManager.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PassManagerCache.h" #include "lgc/state/PipelineState.h" #include "lgc/state/TargetInfo.h" diff --git a/lgc/state/PassManagerCache.cpp b/lgc/state/PassManagerCache.cpp index c49530e17a..1883caf5ab 100644 --- a/lgc/state/PassManagerCache.cpp +++ b/lgc/state/PassManagerCache.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -30,8 +30,8 @@ */ #include "lgc/state/PassManagerCache.h" #include "lgc/LgcContext.h" -#include "lgc/patch/IncludeLlvmIr.h" -#include "lgc/patch/SetupTargetFeatures.h" +#include "lgc/lowering/IncludeLlvmIr.h" +#include "lgc/lowering/SetupTargetFeatures.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IRPrinter/IRPrintingPasses.h" #include "llvm/Target/TargetMachine.h" diff --git a/lgc/state/PipelineState.cpp b/lgc/state/PipelineState.cpp index 497020f1a6..ffe4ad31eb 100644 --- a/lgc/state/PipelineState.cpp +++ b/lgc/state/PipelineState.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -32,7 +32,7 @@ #include "lgc/CommonDefs.h" #include "lgc/LgcContext.h" #include "lgc/PassManager.h" -#include "lgc/patch/FragmentColorExport.h" +#include "lgc/lowering/FragmentColorExport.h" #include "lgc/state/AbiMetadata.h" #include "lgc/state/PalMetadata.h" #include "lgc/state/TargetInfo.h" @@ -1344,9 +1344,9 @@ void PipelineState::determineShaderWaveSize(Module *module) { defaultWaveSize[stage] = m_waveSize[stage]; } - for (unsigned stage = 0; stage < ShaderStage::Count; ++stage) { - unsigned waveSize = hasShaderStage(static_cast(stage)) ? defaultWaveSize[stage] : 0; - auto mergingStage = getMergingShaderStage(static_cast(stage)); + for (auto stage : ShaderStagesNative) { + unsigned waveSize = hasShaderStage(stage) ? defaultWaveSize[stage] : 0; + auto mergingStage = getMergingShaderStage(stage); unsigned mergingWaveSize = hasShaderStage(mergingStage) ? defaultWaveSize[mergingStage] : 0; // Just use default wave size when neither stage is present. if (waveSize == 0 && mergingWaveSize == 0) diff --git a/lgc/test/CsComputeLibrary.lgc b/lgc/test/CsComputeLibrary.lgc index e88ff1fefb..fd957e0bc5 100644 --- a/lgc/test/CsComputeLibrary.lgc +++ b/lgc/test/CsComputeLibrary.lgc @@ -1,6 +1,6 @@ ; Define a compute library that can be called from a compute shader. -; RUN: lgc -mcpu=gfx1010 -print-after=lgc-mutate-entry-point -print-after=lgc-patch-prepare-pipeline-abi -print-after=lgc-set-up-target-features -o /dev/null 2>&1 - <%s | FileCheck --check-prefixes=CHECK %s +; RUN: lgc -mcpu=gfx1010 -print-after=lgc-mutate-entry-point -print-after=lgc-prepare-pipeline-abi -print-after=lgc-set-up-target-features -o /dev/null 2>&1 - <%s | FileCheck --check-prefixes=CHECK %s ; CHECK: IR Dump After Mutate entry point ; CHECK: define amdgpu_gfx void @func(i32 inreg noundef %globalTable, ptr addrspace(4) inreg noundef %numWorkgroupsPtr, i32 inreg noundef %userdata0, i32 inreg noundef %userdata1, i32 inreg noundef %userdata2, i32 inreg noundef %userdata3, i32 inreg noundef %userdata4, i32 inreg noundef %userdata5, i32 inreg noundef %userdata6, i32 inreg noundef %userdata7, i32 inreg noundef %userdata8, i32 inreg noundef %userdata9, i32 inreg noundef %userdata10, i32 inreg noundef %userdata11, i32 inreg noundef %spillTable, <3 x i32> inreg noundef %WorkgroupId, i32 inreg noundef %MultiDispatchInfo, <3 x i32> noundef %LocalInvocationId) #0 !lgc.shaderstage !7 { ; CHECK: !7 = !{i32 7} diff --git a/lgc/test/CsReconfigWorkgroup.lgc b/lgc/test/CsReconfigWorkgroup.lgc index 3235ced729..5b1e79335e 100644 --- a/lgc/test/CsReconfigWorkgroup.lgc +++ b/lgc/test/CsReconfigWorkgroup.lgc @@ -40,9 +40,9 @@ attributes #0 = { nounwind } ; RUN: lgc -extract=2 -mcpu=gfx1010 %s -o - | FileCheck --check-prefixes=CHECK2 %s ; CHECK2-LABEL: _amdgpu_cs_main: ; CHECK2: .threadgroup_dimensions: -; CHECK2: - 0x50 +; CHECK2: - 0x8 +; CHECK2: - 0xa ; CHECK2: - 0x6 -; CHECK2: - 0x7 define dllexport spir_func void @lgc.shader.CS.main() local_unnamed_addr #0 !lgc.shaderstage !0 { .entry: @@ -87,9 +87,9 @@ attributes #0 = { nounwind } ; RUN: lgc -extract=3 -mcpu=gfx1010 %s -o - | FileCheck --check-prefixes=CHECK3 %s ; CHECK3-LABEL: _amdgpu_cs_main: ; CHECK3: .threadgroup_dimensions: -; CHECK3: - 0x24 +; CHECK3: - 0x6 +; CHECK3: - 0x6 ; CHECK3: - 0x5 -; CHECK3: - 0x1 define dllexport spir_func void @lgc.shader.CS.main() local_unnamed_addr #0 !lgc.shaderstage !0 { .entry: diff --git a/lgc/test/ElfRelocationAndNote.lgc b/lgc/test/ElfRelocationAndNote.lgc index c681adcd2a..58732f1adb 100644 --- a/lgc/test/ElfRelocationAndNote.lgc +++ b/lgc/test/ElfRelocationAndNote.lgc @@ -58,7 +58,7 @@ target triple = "amdgcn--amdpal" ; Function Attrs: nounwind define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !lgc.shaderstage !0 { .entry: - %0 = call <4 x i32> (...) @lgc.load.vertex.input__v4i32(i1 false, i32 5, i32 0, i32 0, i32 poison, i32 poison, i32 poison) + %0 = call <4 x i32> (...) @lgc.load.vertex.input__v4i32(i1 false, i32 5, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %bc = bitcast <4 x i32> %0 to <4 x float> %1 = shufflevector <4 x float> %bc, <4 x float> undef, <3 x i32> call void (...) @lgc.create.write.generic.output(<3 x float> %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 undef) diff --git a/lgc/test/ElfRelocationSize.lgc b/lgc/test/ElfRelocationSize.lgc index 6246fbcb87..5af2d3213a 100644 --- a/lgc/test/ElfRelocationSize.lgc +++ b/lgc/test/ElfRelocationSize.lgc @@ -143,9 +143,9 @@ target triple = "amdgcn--amdpal" define dllexport void @lgc.shader.VS.main() !lgc.shaderstage !22 { entry: %TEXCOORD1 = alloca <2 x float>, align 8, addrspace(5) - %TEXCOORD = call <2 x float> (...) @lgc.load.vertex.input__v2f32(i1 false, i32 1, i32 0, i32 0, i32 1, i32 16, i32 poison) + %TEXCOORD = call <2 x float> (...) @lgc.load.vertex.input__v2f32(i1 false, i32 1, i32 0, i32 0, i32 1, i32 16, i32 poison, i32 poison, i32 poison, i32 poison) %SV_Position = alloca <4 x float>, align 16, addrspace(5) - %POSITION = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 0, i32 0, i32 0, i32 1, i32 16, i32 poison) + %POSITION = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 0, i32 0, i32 0, i32 1, i32 16, i32 poison, i32 poison, i32 poison, i32 poison) %posx = extractelement <3 x float> %POSITION, i32 0 %posxi = fptoui float %posx to i32 diff --git a/lgc/test/InOutPackingNonZeroBase.lgc b/lgc/test/InOutPackingNonZeroBase.lgc index a8603a8964..0026c00940 100644 --- a/lgc/test/InOutPackingNonZeroBase.lgc +++ b/lgc/test/InOutPackingNonZeroBase.lgc @@ -39,7 +39,7 @@ target triple = "amdgcn--amdpal" define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spirv.ExecutionModel !9 !lgc.shaderstage !10 { ; IR-LABEL: @lgc.shader.VS.main( ; IR-NEXT: .entry: -; IR-NEXT: [[TMP0:%.*]] = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison) +; IR-NEXT: [[TMP0:%.*]] = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; IR-NEXT: [[TMP1:%.*]] = extractelement <3 x float> [[TMP0]], i64 0 ; IR-NEXT: [[TMP2:%.*]] = extractelement <3 x float> [[TMP0]], i64 1 ; IR-NEXT: [[TMP3:%.*]] = extractelement <3 x float> [[TMP0]], i64 2 @@ -50,7 +50,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; IR-NEXT: ret void ; .entry: - %0 = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison) + %0 = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %1 = extractelement <3 x float> %0, i64 0 %2 = extractelement <3 x float> %0, i64 1 diff --git a/lgc/test/PartPipeline.lgc b/lgc/test/PartPipeline.lgc index 26636e4f3b..7f727ffb87 100644 --- a/lgc/test/PartPipeline.lgc +++ b/lgc/test/PartPipeline.lgc @@ -151,9 +151,9 @@ target triple = "amdgcn--amdpal" define dllexport void @lgc.shader.VS.main() !lgc.shaderstage !22 { entry: %TEXCOORD1 = alloca <2 x float>, align 8, addrspace(5) - %TEXCOORD = call <2 x float> (...) @lgc.load.vertex.input__v2f32(i1 false, i32 1, i32 0, i32 0, i32 1, i32 16, i32 poison) + %TEXCOORD = call <2 x float> (...) @lgc.load.vertex.input__v2f32(i1 false, i32 1, i32 0, i32 0, i32 1, i32 16, i32 poison, i32 poison, i32 poison, i32 poison) %SV_Position = alloca <4 x float>, align 16, addrspace(5) - %POSITION = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 0, i32 0, i32 0, i32 1, i32 16, i32 poison) + %POSITION = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 0, i32 0, i32 0, i32 1, i32 16, i32 poison, i32 poison, i32 poison, i32 poison) %posx = extractelement <3 x float> %POSITION, i32 0 %posxi = fptoui float %posx to i32 diff --git a/lgc/test/PhiWithArgument.lgc b/lgc/test/PhiWithArgument.lgc index 89a8b06cb8..6ac0a326fc 100644 --- a/lgc/test/PhiWithArgument.lgc +++ b/lgc/test/PhiWithArgument.lgc @@ -8,7 +8,7 @@ target triple = "amdgcn--amdpal" define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !lgc.shaderstage !10 { .entry: %0 = call [76 x i8] addrspace(4)* (...) @lgc.create.load.push.constants.ptr.p4a76i8() - %1 = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 2, i32 0, i32 0, i32 poison, i32 poison, i32 poison) + %1 = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 2, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %__llpc_input_proxy_.0.vec.extract = extractelement <3 x float> %1, i32 0 %2 = fcmp oeq float %__llpc_input_proxy_.0.vec.extract, 1.000000e+00 br i1 %2, label %3, label %7 diff --git a/lgc/test/ScalarizeInputWithDynamicIndexUser.lgc b/lgc/test/ScalarizeInputWithDynamicIndexUser.lgc index ce47085bb8..e12d056662 100644 --- a/lgc/test/ScalarizeInputWithDynamicIndexUser.lgc +++ b/lgc/test/ScalarizeInputWithDynamicIndexUser.lgc @@ -10,9 +10,9 @@ target triple = "amdgcn--amdpal" ; Function Attrs: nounwind define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !lgc.shaderstage !15 { .entry: - %0 = call <4 x float> (...) @lgc.load.vertex.input__v4f32(i1 false, i32 2, i32 0, i32 0, i32 poison, i32 poison, i32 poison) - %1 = call <4 x float> (...) @lgc.load.vertex.input__v4f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison) - %2 = call <4 x float> (...) @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) + %0 = call <4 x float> (...) @lgc.load.vertex.input__v4f32(i1 false, i32 2, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) + %1 = call <4 x float> (...) @lgc.load.vertex.input__v4f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) + %2 = call <4 x float> (...) @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) call void (...) @lgc.create.write.generic.output(<4 x float> %2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 undef) call void (...) @lgc.create.write.generic.output(<4 x float> %1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 undef) call void (...) @lgc.create.write.generic.output(<4 x float> %0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 undef) diff --git a/lgc/test/TestWaterfallLoopForStruct.lgc b/lgc/test/TestWaterfallLoopForStruct.lgc index 809e54e68a..8aa82da97b 100644 --- a/lgc/test/TestWaterfallLoopForStruct.lgc +++ b/lgc/test/TestWaterfallLoopForStruct.lgc @@ -8,7 +8,7 @@ target triple = "amdgcn--amdpal" ; Function Attrs: nounwind define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spirv.ExecutionModel !11 !lgc.shaderstage !1 { .entry: - %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) + %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %1 = call ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) %2 = call i32 (...) @lgc.create.get.desc.stride__i32(i32 1, i32 1, i64 0, i32 0) %3 = insertvalue { ptr addrspace(4), i32, i32, i32 } poison, i32 %2, 1 @@ -77,7 +77,7 @@ attributes #2 = { nounwind willreturn memory(read) } ; CHECK-NEXT: .entry: ; CHECK-NEXT: [[TMP0:%.*]] = call i64 @llvm.amdgcn.s.getpc() ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i64 [[TMP0]] to <2 x i32> -; CHECK-NEXT: [[TMP2:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) +; CHECK-NEXT: [[TMP2:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @lgc.load.user.data__i32(i32 0) ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x i32> [[TMP1]], i32 [[TMP3]], i64 0 ; CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP4]] to i64 diff --git a/lgc/test/Transforms/LowerBufferOperations/strided-buffer-ops.lgc b/lgc/test/Transforms/LowerBufferOperations/strided-buffer-ops.lgc index 82c2be38c5..b4abb90966 100644 --- a/lgc/test/Transforms/LowerBufferOperations/strided-buffer-ops.lgc +++ b/lgc/test/Transforms/LowerBufferOperations/strided-buffer-ops.lgc @@ -279,9 +279,14 @@ define amdgpu_kernel void @constant_strided_buffer_desc_to_ptr_index(<4 x i32> i ; GFX11-NEXT: [[TMP13:%.*]] = insertelement <4 x i32> [[TMP11]], i32 [[TMP12]], i64 1 ; GFX11-NEXT: [[TMP14:%.*]] = insertelement <4 x i32> [[TMP13]], i32 -1, i64 2 ; GFX11-NEXT: [[TMP15:%.*]] = insertelement <4 x i32> [[TMP14]], i32 805392300, i64 3 -; GFX11-NEXT: [[TMP16:%.*]] = call i32 @llvm.amdgcn.struct.buffer.load.i32{{(\.v4i32)?}}(<4 x i32> [[TMP15]], i32 24, i32 0, i32 0, i32 0) -; GFX11-NEXT: [[TMP17:%.*]] = bitcast i32 [[TMP16]] to float -; GFX11-NEXT: store float [[TMP17]], ptr [[OUT]], align 4 +; GFX11-NEXT: [[TMP16:%.*]] = extractelement <4 x i32> [[TMP15]], i64 1 +; GFX11-NEXT: [[TMP17:%.*]] = lshr i32 [[TMP16]], 16 +; GFX11-NEXT: [[TMP18:%.*]] = and i32 [[TMP17]], 16383 +; GFX11-NEXT: [[TMP19:%.*]] = mul i32 24, [[TMP18]] +; GFX11-NEXT: [[TMP20:%.*]] = add i32 0, [[TMP19]] +; GFX11-NEXT: [[TMP21:%.*]] = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> [[TMP15]], i32 [[TMP20]], i32 0), !invariant.load [[META8:![0-9]+]] +; GFX11-NEXT: [[TMP22:%.*]] = bitcast i32 [[TMP21]] to float +; GFX11-NEXT: store float [[TMP22]], ptr [[OUT]], align 4 ; GFX11-NEXT: ret void ; entry: @@ -313,9 +318,14 @@ define amdgpu_kernel void @strided_buffer_uniform_strided_load(<4 x i32> %desc, ; GFX11-NEXT: [[TMP13:%.*]] = insertelement <4 x i32> [[TMP11]], i32 [[TMP12]], i64 1 ; GFX11-NEXT: [[TMP14:%.*]] = insertelement <4 x i32> [[TMP13]], i32 -1, i64 2 ; GFX11-NEXT: [[TMP15:%.*]] = insertelement <4 x i32> [[TMP14]], i32 805392300, i64 3 -; GFX11-NEXT: [[TMP16:%.*]] = call i32 @llvm.amdgcn.struct.buffer.load.i32{{(\.v4i32)?}}(<4 x i32> [[TMP15]], i32 24, i32 0, i32 0, i32 0) -; GFX11-NEXT: [[TMP17:%.*]] = bitcast i32 [[TMP16]] to float -; GFX11-NEXT: store float [[TMP17]], ptr [[OUT]], align 4 +; GFX11-NEXT: [[TMP16:%.*]] = extractelement <4 x i32> [[TMP15]], i64 1 +; GFX11-NEXT: [[TMP17:%.*]] = lshr i32 [[TMP16]], 16 +; GFX11-NEXT: [[TMP18:%.*]] = and i32 [[TMP17]], 16383 +; GFX11-NEXT: [[TMP19:%.*]] = mul i32 24, [[TMP18]] +; GFX11-NEXT: [[TMP20:%.*]] = add i32 0, [[TMP19]] +; GFX11-NEXT: [[TMP21:%.*]] = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> [[TMP15]], i32 %20, i32 0), !invariant.load [[META8:![0-9]+]] +; GFX11-NEXT: [[TMP22:%.*]] = bitcast i32 [[TMP21]] to float +; GFX11-NEXT: store float [[TMP22]], ptr [[OUT]], align 4 ; GFX11-NEXT: ret void ; entry: diff --git a/lgc/test/UberFetchShader.lgc b/lgc/test/UberFetchShader.lgc index 97424bc995..79945aacbd 100644 --- a/lgc/test/UberFetchShader.lgc +++ b/lgc/test/UberFetchShader.lgc @@ -54,12 +54,12 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spirv.ExecutionModel !10 !lgc.shaderstage !11 { .entry: - %0 = call <4 x float> @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) #1 + %0 = call <4 x float> @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) #1 ret void } ; Function Attrs: nounwind readonly willreturn -declare <4 x float> @lgc.load.vertex.input__v4f32(i1, i32, i32, i32, i32, i32, i32) #1 +declare <4 x float> @lgc.load.vertex.input__v4f32(i1, i32, i32, i32, i32, i32, i32, i32, i32, i32) #1 ; Function Attrs: nounwind declare void @lgc.output.export.builtin.CullDistance.i32.a1f32(i32, [1 x float]) #0 diff --git a/lgc/test/lgcdis.lgc b/lgc/test/lgcdis.lgc index 855a887c8a..30ee123612 100644 --- a/lgc/test/lgcdis.lgc +++ b/lgc/test/lgcdis.lgc @@ -71,8 +71,8 @@ target triple = "amdgcn--amdpal" define dllexport void @lgc.shader.VS.main() !lgc.shaderstage !24 { entry: - %TEXCOORD = call <2 x float> (...) @lgc.load.vertex.input__v2f32(i1 false, i32 1, i32 0, i32 0, i32 1, i32 16, i32 poison) - %POSITION = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 0, i32 0, i32 0, i32 1, i32 16, i32 poison) + %TEXCOORD = call <2 x float> (...) @lgc.load.vertex.input__v2f32(i1 false, i32 1, i32 0, i32 0, i32 1, i32 16, i32 poison, i32 poison, i32 poison, i32 poison) + %POSITION = call <3 x float> (...) @lgc.load.vertex.input__v3f32(i1 false, i32 0, i32 0, i32 0, i32 1, i32 16, i32 poison, i32 poison, i32 poison, i32 poison) %posext = shufflevector <3 x float> %POSITION, <3 x float> , <4 x i32> call void (...) @lgc.create.write.builtin.output(<4 x float> %posext, i32 0, i32 0, i32 poison, i32 poison) call void (...) @lgc.create.write.generic.output(<2 x float> %TEXCOORD, i32 1, i32 0, i32 0, i32 1, i32 0, i32 poison) diff --git a/lgc/test/scalarizationOfDescriptorLoadsTest1.lgc b/lgc/test/scalarizationOfDescriptorLoadsTest1.lgc index 34faf88508..7ec3bea739 100644 --- a/lgc/test/scalarizationOfDescriptorLoadsTest1.lgc +++ b/lgc/test/scalarizationOfDescriptorLoadsTest1.lgc @@ -12,7 +12,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: .entry: ; CHECK-NEXT: [[TMP8:%.*]] = call i64 @llvm.amdgcn.s.getpc() ; CHECK-NEXT: [[TMP12:%.*]] = bitcast i64 [[TMP8]] to <2 x i32> -; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) +; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @lgc.load.user.data__i32(i32 0) ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x i32> [[TMP12]], i32 [[TMP3]], i64 0 ; CHECK-NEXT: [[TMP19:%.*]] = bitcast <2 x i32> [[TMP4]] to i64 @@ -44,7 +44,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: ret void ; .entry: - %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) + %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %1 = call ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) %2 = call i32 (...) @lgc.create.get.desc.stride__i32(i32 1, i32 1, i64 0, i32 0) %3 = mul i32 %0, %2 diff --git a/lgc/test/scalarizationOfDescriptorLoadsTest2.lgc b/lgc/test/scalarizationOfDescriptorLoadsTest2.lgc index 4967e35e9e..0b6c0d5688 100644 --- a/lgc/test/scalarizationOfDescriptorLoadsTest2.lgc +++ b/lgc/test/scalarizationOfDescriptorLoadsTest2.lgc @@ -12,7 +12,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: .entry: ; CHECK-NEXT: [[TMP15:%.*]] = call i64 @llvm.amdgcn.s.getpc() ; CHECK-NEXT: [[TMP16:%.*]] = bitcast i64 [[TMP15]] to <2 x i32> -; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) +; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @lgc.load.user.data__i32(i32 0) ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x i32> [[TMP16]], i32 [[TMP3]], i64 0 ; CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP4]] to i64 @@ -36,7 +36,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: ret void ; .entry: - %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) + %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %1 = call ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) %2 = call i32 (...) @lgc.create.get.desc.stride__i32(i32 1, i32 1, i64 0, i32 0) %3 = mul i32 %0, %2 diff --git a/lgc/test/scalarizationOfDescriptorLoadsTest3.lgc b/lgc/test/scalarizationOfDescriptorLoadsTest3.lgc index bfe917e808..26d264e908 100644 --- a/lgc/test/scalarizationOfDescriptorLoadsTest3.lgc +++ b/lgc/test/scalarizationOfDescriptorLoadsTest3.lgc @@ -12,7 +12,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: .entry: ; CHECK-NEXT: [[TMP0:%.*]] = call i64 @llvm.amdgcn.s.getpc() ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i64 [[TMP0]] to <2 x i32> -; CHECK-NEXT: [[TMP2:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) +; CHECK-NEXT: [[TMP2:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @lgc.load.user.data__i32(i32 0) ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x i32> [[TMP1]], i32 [[TMP3]], i64 0 ; CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP4]] to i64 @@ -40,7 +40,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: ret void ; .entry: - %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) + %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %1 = call ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) %2 = call i32 (...) @lgc.create.get.desc.stride__i32(i32 1, i32 1, i64 0, i32 0) %3 = mul i32 %0, %2 diff --git a/lgc/test/scalarizationOfDescriptorLoadsTest4.lgc b/lgc/test/scalarizationOfDescriptorLoadsTest4.lgc index 5db2a1feb9..580581b0cd 100644 --- a/lgc/test/scalarizationOfDescriptorLoadsTest4.lgc +++ b/lgc/test/scalarizationOfDescriptorLoadsTest4.lgc @@ -14,7 +14,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: .entry: ; CHECK-NEXT: [[TMP19:%.*]] = call i64 @llvm.amdgcn.s.getpc() ; CHECK-NEXT: [[TMP20:%.*]] = bitcast i64 [[TMP19]] to <2 x i32> -; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) +; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @lgc.load.user.data__i32(i32 0) ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x i32> [[TMP20]], i32 [[TMP3]], i64 0 ; CHECK-NEXT: [[TMP21:%.*]] = bitcast <2 x i32> [[TMP4]] to i64 @@ -43,7 +43,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: ret void ; .entry: - %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) + %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %1 = call ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) %2 = call i32 (...) @lgc.create.get.desc.stride__i32(i32 1, i32 1, i64 0, i32 0) %3 = mul i32 %0, %2 diff --git a/lgc/test/scalarizationOfDescriptorLoadsTest5.lgc b/lgc/test/scalarizationOfDescriptorLoadsTest5.lgc index 53805e6421..80aea0036d 100644 --- a/lgc/test/scalarizationOfDescriptorLoadsTest5.lgc +++ b/lgc/test/scalarizationOfDescriptorLoadsTest5.lgc @@ -12,7 +12,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP8:%.*]] = call i64 @llvm.amdgcn.s.getpc() ; CHECK-NEXT: [[TMP12:%.*]] = bitcast i64 [[TMP8]] to <2 x i32> -; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) +; CHECK-NEXT: [[TMP0:%.*]] = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; CHECK-NEXT: [[DOTNOT:%.*]] = icmp eq i32 [[TMP0]], 0 ; CHECK-NEXT: br i1 [[DOTNOT]], label [[RET:%.*]], label [[BB:%.*]] ; CHECK: bb: @@ -49,7 +49,7 @@ define dllexport spir_func void @lgc.shader.VS.main() local_unnamed_addr #0 !spi ; CHECK-NEXT: ret void ; entry: - %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison) + %0 = call i32 (...) @lgc.load.vertex.input__i32(i1 false, i32 0, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) %.not = icmp eq i32 %0, 0 br i1 %.not, label %ret, label %bb diff --git a/lgc/tool/lgc/lgc.cpp b/lgc/tool/lgc/lgc.cpp index 8375067b17..9d4a8a27fd 100644 --- a/lgc/tool/lgc/lgc.cpp +++ b/lgc/tool/lgc/lgc.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -36,7 +36,7 @@ #include "lgc/LgcIlCpsDialect.h" #include "lgc/PassManager.h" #include "lgc/Pipeline.h" -#include "lgc/patch/LgcLowering.h" +#include "lgc/lowering/LgcLowering.h" #include "lgc/state/PipelineShaders.h" #include "lgc/state/PipelineState.h" #include "llvm-dialects/Dialect/Dialect.h" diff --git a/lgc/util/WorkgroupLayout.cpp b/lgc/util/WorkgroupLayout.cpp index dbbc7c725a..c71211c786 100644 --- a/lgc/util/WorkgroupLayout.cpp +++ b/lgc/util/WorkgroupLayout.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -131,33 +131,27 @@ Value *lgc::reconfigWorkgroupLayout(Value *localInvocationId, PipelineState *pip WorkgroupLayout macroLayout, WorkgroupLayout microLayout, unsigned workgroupSizeX, unsigned workgroupSizeY, unsigned workgroupSizeZ, bool isHwLocalInvocationId, BuilderBase &builder) { - Value *apiX = builder.getInt32(0); - Value *apiY = builder.getInt32(0); Value *newLocalInvocationId = PoisonValue::get(localInvocationId->getType()); unsigned bitsX = 0; unsigned bitsY = 0; - ResourceUsage *resUsage = pipelineState->getShaderResourceUsage(shaderStage); - if (shaderStage == ShaderStage::Mesh) { - resUsage->builtInUsage.mesh.foldWorkgroupXY = true; - } else if (shaderStage == ShaderStage::Task) { - resUsage->builtInUsage.task.foldWorkgroupXY = true; - } else { - assert(shaderStage == ShaderStage::Compute); - resUsage->builtInUsage.cs.foldWorkgroupXY = true; - } - Value *tidXY = builder.CreateExtractElement(localInvocationId, builder.getInt32(0), "tidXY"); + + Value *tidX = builder.CreateExtractElement(localInvocationId, builder.getInt32(0), "tidX"); + Value *tidY = builder.CreateExtractElement(localInvocationId, builder.getInt32(1), "tidY"); + + Value *apiX = builder.getInt32(0); + Value *apiY = builder.getInt32(0); Value *apiZ = builder.getInt32(0); if (workgroupSizeZ > 1) { - apiZ = builder.CreateExtractElement(localInvocationId, builder.getInt32(1), "tidZ"); + apiZ = builder.CreateExtractElement(localInvocationId, builder.getInt32(2), "tidZ"); } - // For BuiltInUnswizzledLocalInvocationId, it shouldn't swizzle and return the localInvocation without - // foldXY. + if (isHwLocalInvocationId) { - apiX = builder.CreateURem(tidXY, builder.getInt32(workgroupSizeX)); - apiY = builder.CreateUDiv(tidXY, builder.getInt32(workgroupSizeX)); + apiX = tidX; + apiY = tidY; } else { // Micro-tiling with quad:2x2, the thread-id will be marked as {<0,0>,<1,0>,<0,1>,<1,1>} // for each quad. Each 4 threads will be wrapped in the same tid. + Value *tidXY = builder.CreateAdd(builder.CreateMul(tidY, builder.getInt32(workgroupSizeX)), tidX); if (microLayout == WorkgroupLayout::Quads) { apiX = builder.CreateAnd(tidXY, builder.getInt32(1)); apiY = builder.CreateAnd(builder.CreateLShr(tidXY, builder.getInt32(1)), builder.getInt32(1)); diff --git a/llpc/context/llpcCompiler.cpp b/llpc/context/llpcCompiler.cpp index 23fb17a2d7..f1783d6a98 100644 --- a/llpc/context/llpcCompiler.cpp +++ b/llpc/context/llpcCompiler.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2016-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2016-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -1874,10 +1874,12 @@ Result Compiler::buildPipelineInternal(Context *context, ArrayRefensureGfxRuntimeLibrary(); bool isTransformPipeline = false; - auto computePipelineInfo = - static_cast(context->getPipelineContext()->getPipelineBuildInfo()); - if (computePipelineInfo != nullptr && computePipelineInfo->transformGraphicsPipeline != nullptr) - isTransformPipeline = true; + if (context->getPipelineContext()->getPipelineType() == PipelineType::Compute) { + auto computePipelineInfo = + static_cast(context->getPipelineContext()->getPipelineBuildInfo()); + if (computePipelineInfo != nullptr && computePipelineInfo->transformGraphicsPipeline != nullptr) + isTransformPipeline = true; + } for (unsigned shaderIndex = 0; shaderIndex < shaderInfo.size() && result == Result::Success; ++shaderIndex) { const PipelineShaderInfo *shaderInfoEntry = shaderInfo[shaderIndex]; @@ -1975,7 +1977,7 @@ Result Compiler::buildPipelineInternal(Context *context, ArrayRef, ShaderStageGfxCount> modulesToLink; for (unsigned shaderIndex = 0; shaderIndex < shaderInfo.size() && result == Result::Success; ++shaderIndex) { - // Per-shader SPIR-V lowering passes. + // Per-shader FE lowering passes. const PipelineShaderInfo *shaderInfoEntry = shaderInfo[shaderIndex]; ShaderStage entryStage = shaderInfoEntry ? shaderInfoEntry->entryStage : ShaderStageInvalid; if (!shaderInfoEntry || !shaderInfoEntry->pModuleData) @@ -1997,7 +1999,7 @@ Result Compiler::buildPipelineInternal(Context *context, ArrayRefusage.enableRayQuery; flag.isInternalRtShader = moduleData->usage.isInternalRtShader; flag.usesAdvancedBlend = enableAdvancedBlend; - SpirvLower::addPasses(context, entryStage, *lowerPassMgr, timerProfiler.getTimer(TimerLower), flag); + SpirvLower::addPasses(context, entryStage, *lowerPassMgr, timerProfiler.getTimer(TimerFeLowering), flag); // Run the passes. lowerPassMgr->run(*modules[shaderIndex]); @@ -2050,7 +2052,7 @@ Result Compiler::buildPipelineInternal(Context *context, ArrayRefaddPass(LowerCfgMerges()); + // Function inlining. Use the "always inline" pass, since we want to inline all functions, and // we marked (non-entrypoint) functions as "always inline" just after SPIR-V reading. lowerPassMgr->addPass(AlwaysInlinerPass()); @@ -3049,7 +3054,7 @@ Result Compiler::generatePipeline(Context *context, unsigned moduleIndex, std::u raw_svector_ostream elfStream(pipelineElf); Timer *timers[] = { - timerProfiler.getTimer(TimerPatch), + timerProfiler.getTimer(TimerLgcLowering), timerProfiler.getTimer(TimerOpt), timerProfiler.getTimer(TimerCodeGen), }; @@ -3204,7 +3209,7 @@ Result Compiler::buildRayTracingPipelineInternal(RayTracingContext &rtContext, // - Run lower passes on all modules // - Merge all modules and inline if necessary { - Timer *lowerTimer = timerProfiler.getTimer(TimerLower); + Timer *lowerTimer = timerProfiler.getTimer(TimerFeLowering); auto passMgr = lgc::MbPassManager::Create(builderContext->getTargetMachine()); passMgr->setPassIndex(&passIndex); SpirvLower::registerLoweringPasses(*passMgr); diff --git a/llpc/context/llpcContext.cpp b/llpc/context/llpcContext.cpp index 0b51686af8..e7a423485e 100644 --- a/llpc/context/llpcContext.cpp +++ b/llpc/context/llpcContext.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2016-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2016-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -256,7 +256,6 @@ void Context::ensureGpurtLibrary() { PipelineShaderInfo shaderInfo = {}; shaderInfo.entryStage = ShaderStageCompute; - shaderInfo.pEntryTarget = Vkgc::getEntryPointNameFromSpirvBinary(&rtState->gpurtShaderLibrary); shaderInfo.pModuleData = &moduleData; // Disable fast math contract on OpDot when there is no hardware intersectRay diff --git a/llpc/context/llpcDialect.h b/llpc/context/llpcDialect.h index 5ba32ee0d9..265c2f9cff 100644 --- a/llpc/context/llpcDialect.h +++ b/llpc/context/llpcDialect.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -25,7 +25,7 @@ /** *********************************************************************************************************************** * @file llpcDialect.h - * @brief LLPC header file: contains dialect declarations specific to SPIR-V lowering. + * @brief LLPC header file: contains dialect declarations specific to FE lowering. *********************************************************************************************************************** */ #pragma once diff --git a/llpc/context/llpcPipelineContext.cpp b/llpc/context/llpcPipelineContext.cpp index 42976ba2d2..b5788356a6 100644 --- a/llpc/context/llpcPipelineContext.cpp +++ b/llpc/context/llpcPipelineContext.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -361,6 +361,15 @@ void PipelineContext::setVertexInputDescriptions(Pipeline *pipeline, const Graph bindings[idx].inputRate = VertexInputRateInstance; bindings[idx].divisor = 1; // Set default divisor break; + case VK_VERTEX_INPUT_RATE_PER_DRAW_PER_VERTEX: + bindings[idx].inputRate = VertexInputRatePerDrawPerVertex; + break; + case VK_VERTEX_INPUT_RATE_PER_DRAW_PER_INSTANCE: + bindings[idx].inputRate = VertexInputRatePerDrawPerInstance; + break; + case VK_VERTEX_INPUT_RATE_PER_DRAW: + bindings[idx].inputRate = VertexInputRatePerDraw; + break; default: llvm_unreachable("Should never be called!"); } @@ -698,7 +707,6 @@ ShaderOptions PipelineContext::computeShaderOptions(const PipelineShaderInfo &sh shaderOptions.waveSize = shaderInfo.options.waveSize; shaderOptions.wgpMode = shaderInfo.options.wgpMode; - // If subgroupSize is specified, we should use the specified value. if (shaderInfo.options.subgroupSize != 0) shaderOptions.subgroupSize = shaderInfo.options.subgroupSize; diff --git a/llpc/docs/AddingPasses.md b/llpc/docs/AddingPasses.md index 1187b2a48e..8a5ae524ec 100644 --- a/llpc/docs/AddingPasses.md +++ b/llpc/docs/AddingPasses.md @@ -29,4 +29,4 @@ To register a front-end pass, you need to add an entry to the LLPC front-end pas ## Register a middle-end pass -The process to register a middle-end pass is the same. The middle-end pass registry file is `lgc/patch/PassRegistry.inc`. +The process to register a middle-end pass is the same. The middle-end pass registry file is `lgc/lowering/PassRegistry.inc`. diff --git a/llpc/lowering/LinkTransformShaders.cpp b/llpc/lowering/LinkTransformShaders.cpp index c04320eef0..2ee63a80fb 100644 --- a/llpc/lowering/LinkTransformShaders.cpp +++ b/llpc/lowering/LinkTransformShaders.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -49,7 +49,7 @@ static const char TransformVertex[] = "TransformVertexAmd"; static const char GetTransformVertexAttribute[] = "GetTransformVertexAttributeAmd"; // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerAccessChain.cpp b/llpc/lowering/LowerAccessChain.cpp index 8f6cc8ecb8..1bc81f6a66 100644 --- a/llpc/lowering/LowerAccessChain.cpp +++ b/llpc/lowering/LowerAccessChain.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -49,12 +49,12 @@ using namespace Llpc; namespace Llpc { // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation PreservedAnalyses LowerAccessChain::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Spirv-Lower-Access-Chain\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Access-Chain\n"); SpirvLower::init(&module); diff --git a/llpc/lowering/LowerAccessChain.h b/llpc/lowering/LowerAccessChain.h index 683af15a24..fbaee74bd1 100644 --- a/llpc/lowering/LowerAccessChain.h +++ b/llpc/lowering/LowerAccessChain.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -37,7 +37,7 @@ namespace Llpc { // ===================================================================================================================== -// Represents the pass of SPIR-V lowering operations for access chain. +// Represents the pass of FE lowering operations for access chain. class LowerAccessChain : public SpirvLower, public llvm::InstVisitor, public llvm::PassInfoMixin { @@ -48,7 +48,7 @@ class LowerAccessChain : public SpirvLower, virtual void visitStoreInst(llvm::StoreInst &storeInst); virtual void visitCallInst(llvm::CallInst &callInst); - static llvm::StringRef name() { return "Lower SPIR-V access chain"; } + static llvm::StringRef name() { return "Lower access chain"; } private: llvm::Instruction *tryToCoalesceChain(llvm::Instruction *getElemPtr); diff --git a/llpc/lowering/LowerAdvancedBlend.cpp b/llpc/lowering/LowerAdvancedBlend.cpp index d2bd39174c..8a01ed59be 100644 --- a/llpc/lowering/LowerAdvancedBlend.cpp +++ b/llpc/lowering/LowerAdvancedBlend.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -54,7 +54,7 @@ LowerAdvancedBlend::LowerAdvancedBlend(unsigned binding, bool enableRov) : m_bin } // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerAdvancedBlend.h b/llpc/lowering/LowerAdvancedBlend.h index 3a1af04f3d..f7c962ccf5 100644 --- a/llpc/lowering/LowerAdvancedBlend.h +++ b/llpc/lowering/LowerAdvancedBlend.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -36,13 +36,13 @@ namespace Llpc { // ===================================================================================================================== -// Represents the pass of SPIR-V lowering advanced blend shader +// Represents the pass of FE lowering advanced blend shader class LowerAdvancedBlend : public SpirvLower, public llvm::PassInfoMixin { public: LowerAdvancedBlend(unsigned binding, bool enableRov); llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V advanced blend shader"; } + static llvm::StringRef name() { return "Lower advanced blend shader"; } private: typedef void (LowerAdvancedBlend::*LibraryFuncPtr)(llvm::Function *, unsigned); diff --git a/llpc/lowering/LowerCfgMerges.cpp b/llpc/lowering/LowerCfgMerges.cpp index e293b81caa..c1b9bfaad5 100644 --- a/llpc/lowering/LowerCfgMerges.cpp +++ b/llpc/lowering/LowerCfgMerges.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -300,12 +300,12 @@ void LowerCfgMerges::mapConvergentValues(Module &module) { } // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation PreservedAnalyses LowerCfgMerges::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Lower-CfgMerges\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Cfg-Merges\n"); LLVM_DEBUG(dbgs() << "Processing module: " << module); SpirvLower::init(&module); diff --git a/llpc/lowering/LowerCfgMerges.h b/llpc/lowering/LowerCfgMerges.h index 2e22ac5328..f7a0c96776 100644 --- a/llpc/lowering/LowerCfgMerges.h +++ b/llpc/lowering/LowerCfgMerges.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -41,14 +41,14 @@ class Value; namespace Llpc { // ===================================================================================================================== -// Represents the pass of SPIR-V lowering CFG merges. +// Represents the pass of FE lowering CFG merges. class LowerCfgMerges : public SpirvLower, public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); void mapConvergentValues(llvm::Module &module); - static llvm::StringRef name() { return "Lower SPIR-V CFG merges"; } + static llvm::StringRef name() { return "Lower CFG merges"; } private: llvm::DenseSet m_convergentValues; diff --git a/llpc/lowering/LowerConstImmediateStore.cpp b/llpc/lowering/LowerConstImmediateStore.cpp index 2311e304fd..fcb5b2589a 100644 --- a/llpc/lowering/LowerConstImmediateStore.cpp +++ b/llpc/lowering/LowerConstImmediateStore.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -47,7 +47,7 @@ using namespace Llpc; namespace Llpc { // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerConstImmediateStore.h b/llpc/lowering/LowerConstImmediateStore.h index ba7828e83f..45f291de53 100644 --- a/llpc/lowering/LowerConstImmediateStore.h +++ b/llpc/lowering/LowerConstImmediateStore.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -42,12 +42,12 @@ class Value; namespace Llpc { // ===================================================================================================================== -// Represents the pass of SPIR-V lowering operations for constant immediate store +// Represents the pass of FE lowering operations for constant immediate store class LowerConstImmediateStore : public SpirvLower, public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V constant immediate store"; } + static llvm::StringRef name() { return "Lower constant immediate store"; } private: bool processAllocaInsts(llvm::Function *func); diff --git a/llpc/lowering/LowerCooperativeMatrix.cpp b/llpc/lowering/LowerCooperativeMatrix.cpp index 5f501eb987..3e4c9f0fd4 100644 --- a/llpc/lowering/LowerCooperativeMatrix.cpp +++ b/llpc/lowering/LowerCooperativeMatrix.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -162,7 +162,7 @@ void LowerCooperativeMatrix::visitPointerUsers(Value *ptr, CooperativeMatrixElem } // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerCooperativeMatrix.h b/llpc/lowering/LowerCooperativeMatrix.h index 52d60e1b47..a6fe814c9f 100644 --- a/llpc/lowering/LowerCooperativeMatrix.h +++ b/llpc/lowering/LowerCooperativeMatrix.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -40,7 +40,7 @@ class LowerCooperativeMatrixProxy : public llvm::PassInfoMixin { public: LowerGlCompatibility(); llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower GLSL compatibility variables and operations"; } + static llvm::StringRef name() { return "Lower GL compatibility variables and operations"; } private: bool needRun(); diff --git a/llpc/lowering/LowerGlobals.cpp b/llpc/lowering/LowerGlobals.cpp index 4a1f9f7932..438f9c4881 100644 --- a/llpc/lowering/LowerGlobals.cpp +++ b/llpc/lowering/LowerGlobals.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -204,12 +204,12 @@ LowerGlobals::LowerGlobals() : m_lastVertexProcessingStage(ShaderStageInvalid) { } // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation PreservedAnalyses LowerGlobals::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Spirv-Lower-Global\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Globals\n"); SpirvLower::init(&module); @@ -317,11 +317,11 @@ void LowerGlobals::lowerEdgeFlag() { if (binding->binding == edgeflagInputLocation) { Type *int32Ty = Type::getInt32Ty(*m_context); Value *zeroValue = m_builder->getInt32(0); - + Value *poisonValue = PoisonValue::get(int32Ty); lgc::InOutInfo inOutInfo; - Value *edgeflagValue = m_builder->create( - int32Ty, false, edgeflagInputLocation, zeroValue, zeroValue, PoisonValue::get(int32Ty), - PoisonValue::get(int32Ty), PoisonValue::get(int32Ty)); + Value *edgeflagValue = m_builder->create(int32Ty, false, edgeflagInputLocation, zeroValue, + zeroValue, poisonValue, poisonValue, poisonValue, + poisonValue, poisonValue, poisonValue); m_builder->CreateWriteBuiltInOutput(edgeflagValue, lgc::BuiltInEdgeFlag, inOutInfo, nullptr, nullptr); return; } @@ -450,7 +450,8 @@ static bool hasPrimitiveIdx(const Constant &metaVal) { // Maps the specified global variable to proxy variable. // // @param globalVar : Global variable to be mapped -void LowerGlobals::mapGlobalVariableToProxy(GlobalVariable *globalVar) { +// @param initializer: an optional initializer for the proxy. +void LowerGlobals::mapGlobalVariableToProxy(GlobalVariable *globalVar, Constant *initializer) { const auto &dataLayout = m_module->getDataLayout(); Type *globalVarTy = globalVar->getValueType(); @@ -467,10 +468,9 @@ void LowerGlobals::mapGlobalVariableToProxy(GlobalVariable *globalVar) { proxy = m_builder->CreateAlloca(globalVarTy, dataLayout.getAllocaAddrSpace(), nullptr, Twine(LlpcName::GlobalProxyPrefix) + globalVar->getName()); - if (globalVar->hasInitializer()) { - auto initializer = globalVar->getInitializer(); - m_builder->CreateStore(initializer, proxy); - } + if (globalVar->hasInitializer() || initializer) + m_builder->CreateStore(initializer ? initializer : globalVar->getInitializer(), proxy); + globalVar->mutateType(proxy->getType()); globalVar->replaceUsesWithIf(proxy, [func](Use &U) { Instruction *userInst = cast(U.getUser()); @@ -972,17 +972,20 @@ Value *LowerGlobals::addCallInstForInOutImport(Type *inOutTy, unsigned addrSpace inOutInfo, vertexIdx); } else { if (m_shaderStage == ShaderStageVertex) { - if (vertexIdx == nullptr) - vertexIdx = PoisonValue::get(m_builder->getInt32Ty()); - Value *instanceIdx = PoisonValue::get(m_builder->getInt32Ty()); Value *arrayIdx = PoisonValue::get(m_builder->getInt32Ty()); + Value *vertexId = PoisonValue::get(m_builder->getInt32Ty()); + Value *instanceId = PoisonValue::get(m_builder->getInt32Ty()); + Value *drawId = PoisonValue::get(m_builder->getInt32Ty()); + Value *baseVertex = PoisonValue::get(m_builder->getInt32Ty()); + Value *baseInstance = PoisonValue::get(m_builder->getInt32Ty()); if (m_transformVertex) { assert(TransformParamCount == m_entryPoint->arg_size()); - vertexIdx = m_builder->CreateAdd(m_entryPoint->getArg(TransformVertexId), - m_entryPoint->getArg(TransformBaseVertex)); - instanceIdx = m_builder->CreateAdd(m_entryPoint->getArg(TransformInstanceId), - m_entryPoint->getArg(TransformBaseInstance)); + vertexId = m_entryPoint->getArg(TransformVertexId); + instanceId = m_entryPoint->getArg(TransformInstanceId); + drawId = m_entryPoint->getArg(TransformDrawId); + baseVertex = m_entryPoint->getArg(TransformBaseVertex); + baseInstance = m_entryPoint->getArg(TransformBaseInstance); } // Fold constant locationOffset into location. @@ -992,7 +995,8 @@ Value *LowerGlobals::addCallInstForInOutImport(Type *inOutTy, unsigned addrSpace location += vtxLocOffset; } inOutValue = m_builder->create(inOutTy, false, location, m_builder->getInt32(0), - elemIdx, arrayIdx, vertexIdx, instanceIdx); + elemIdx, arrayIdx, vertexId, instanceId, drawId, + baseVertex, baseInstance); } else { inOutValue = m_builder->CreateReadGenericInput(inOutTy, inOutMeta.Value, locOffset, elemIdx, maxLocOffset, inOutInfo, vertexIdx); @@ -1988,7 +1992,7 @@ void LowerGlobals::lowerPushConsts() { void LowerGlobals::lowerUniformConstants() { SmallVector globalsToRemove; - for (GlobalVariable &global : m_module->globals()) { + for (GlobalVariable &global : llvm::make_early_inc_range(m_module->globals())) { // Skip anything that is not a default uniform. if (global.getAddressSpace() != SPIRAS_Uniform || !global.hasMetadata(gSPIRVMD::UniformConstant)) continue; @@ -1998,90 +2002,80 @@ void LowerGlobals::lowerUniformConstants() { // A map from the function to the instructions inside it which access the global variable. SmallMapVector, 8> globalUsers; - for (User *const user : global.users()) { - Instruction *inst = cast(user); - globalUsers[inst->getFunction()].push_back(inst); - } - // Replace uniform constant variable with a compile time constants if it is set from driver side. Vkgc::CompileConstInfo *compileTimeConstsInfo = m_context->getPipelineContext()->getPipelineOptions()->compileConstInfo; - if (compileTimeConstsInfo && compileTimeConstsInfo->numCompileTimeConstants > 0) { - GlobalVariable *compileTimeConstVal = nullptr; - bool foundGlobal = false; - MDNode *metaNode = global.getMetadata(gSPIRVMD::UniformConstant); - auto uniformConstantsSet = mdconst::extract(metaNode->getOperand(0))->getZExtValue(); - auto uniformConstantsBinding = mdconst::extract(metaNode->getOperand(1))->getZExtValue(); - auto uniformConstantsOffset = mdconst::dyn_extract(metaNode->getOperand(2))->getZExtValue(); - for (uint32_t i = 0; i < compileTimeConstsInfo->numCompileTimeConstants; i++) { - auto specializeUniformInfo = compileTimeConstsInfo->pCompileTimeConstants[i]; - if (specializeUniformInfo.offset == uniformConstantsOffset && - specializeUniformInfo.set == uniformConstantsSet && - specializeUniformInfo.binding == uniformConstantsBinding) { - // determine result constant type. - foundGlobal = true; - uint32_t uniformChannelCount = 1; - uint32_t uniformChannelBytesCount = 1; - Type *uniformTy = global.getValueType(); - assert(!uniformTy->isStructTy()); - Type *constTy = uniformTy; - - if (auto *vectorUniformTy = dyn_cast(uniformTy)) { - constTy = vectorUniformTy->getElementType(); - uniformChannelCount = vectorUniformTy->getElementCount().getFixedValue(); - } - uniformChannelBytesCount = constTy->getScalarSizeInBits() / (sizeof(uint8_t) * 8); + MDNode *metaNode = global.getMetadata(gSPIRVMD::UniformConstant); + auto uniformConstantsSet = mdconst::extract(metaNode->getOperand(0))->getZExtValue(); + auto uniformConstantsBinding = mdconst::extract(metaNode->getOperand(1))->getZExtValue(); + auto uniformConstantsOffset = mdconst::extract(metaNode->getOperand(2))->getZExtValue(); - if (uniformChannelBytesCount * uniformChannelCount != specializeUniformInfo.validBytes) { - // Don't support partial replacement now (like vector component partial replacement). - continue; - } + if (compileTimeConstsInfo && compileTimeConstsInfo->numCompileTimeConstants > 0) { + auto *pCompileTimeConstant = compileTimeConstsInfo->pCompileTimeConstants; + unsigned count = compileTimeConstsInfo->numCompileTimeConstants; + // Get the matching compile time constant info entry. + Vkgc::CompileTimeConst *specializeUniformInfo = + std::find_if(pCompileTimeConstant, pCompileTimeConstant + count, [&](const Vkgc::CompileTimeConst &item) { + return item.offset == uniformConstantsOffset && item.set == uniformConstantsSet && + item.binding == uniformConstantsBinding; + }); + + // Specialize the uniform constant if we found a compile time constant entry. + if (specializeUniformInfo != pCompileTimeConstant + count) { + uint32_t elemCount = 1; + Type *uniformTy = global.getValueType(); + assert(!uniformTy->isStructTy()); + Type *elemTy = uniformTy; + + if (auto *vectorUniformTy = dyn_cast(uniformTy)) { + elemTy = vectorUniformTy->getElementType(); + elemCount = vectorUniformTy->getElementCount().getFixedValue(); + } else { + assert(uniformTy->isIntegerTy()); + } - // Construct constants - Constant *constData[16] = {}; - compileTimeConstVal = new GlobalVariable(uniformTy, true, global.getLinkage(), nullptr, "", - GlobalValue::NotThreadLocal, SPIRAS_Private); - for (uint32_t i = 0; i < uniformChannelCount; i++) { - if (uniformTy->isFloatingPointTy()) { - double data = 0.0; - memcpy(&data, specializeUniformInfo.values.u8 + i * uniformChannelBytesCount, uniformChannelBytesCount); - constData[i] = ConstantFP::get(constTy, data); - } else { - uint64_t data = 0; - memcpy(&data, specializeUniformInfo.values.u8 + i * uniformChannelBytesCount, uniformChannelBytesCount); - constData[i] = ConstantInt::get(constTy, data); - } + assert(elemTy->getScalarSizeInBits() % 8 == 0); + uint32_t elemBytes = elemTy->getScalarSizeInBits() / 8; + + // Don't support partial replacement now (like vector component partial replacement). + assert(elemBytes * elemCount == specializeUniformInfo->validBytes); + + // Construct constants + Constant *constData[16] = {}; + for (uint32_t i = 0; i < elemCount; i++) { + if (elemTy->isFloatTy()) { + float data = 0.0; + assert(specializeUniformInfo->validBytes == 4); + memcpy(&data, specializeUniformInfo->values.u8 + i * 4, 4); + constData[i] = ConstantFP::get(elemTy, data); + } else if (elemTy->isDoubleTy()) { + double data = 0.0; + assert(specializeUniformInfo->validBytes == 8); + memcpy(&data, specializeUniformInfo->values.u8 + i * 8, 8); + constData[i] = ConstantFP::get(elemTy, data); + } else { + uint64_t data = 0; + assert(elemTy->isIntegerTy()); + memcpy(&data, specializeUniformInfo->values.u8 + i * elemBytes, elemBytes); + constData[i] = ConstantInt::get(elemTy, data); } + } - // Replace current uniform with known compile time constants. - Constant *initializer = uniformChannelCount > 1 ? ConstantVector::get(constData) : constData[0]; - compileTimeConstVal->setInitializer(initializer); - for (auto &eachFunc : globalUsers) { - for (auto *inst : eachFunc.second) { - inst->replaceUsesOfWith(&global, compileTimeConstVal); - } - } + // Replace current uniform with known compile time constants. + Constant *initializer = elemCount > 1 ? ConstantVector::get(constData) : constData[0]; - // Insert new global to list and remove replaced global variable. - global.getParent()->insertGlobalVariable(compileTimeConstVal); - mapGlobalVariableToProxy(compileTimeConstVal); - globalsToRemove.push_back(&global); - break; - } - } - // If replacement happens, skip following buffer load convert. - if (foundGlobal) { + mapGlobalVariableToProxy(&global, initializer); continue; } } - for (auto &eachFunc : globalUsers) { - MDNode *metaNode = global.getMetadata(gSPIRVMD::UniformConstant); - auto uniformConstantsSet = mdconst::extract(metaNode->getOperand(0))->getZExtValue(); - auto uniformConstantsBinding = mdconst::extract(metaNode->getOperand(1))->getZExtValue(); - auto uniformConstantsOffset = mdconst::extract(metaNode->getOperand(2))->getZExtValue(); + for (User *const user : global.users()) { + Instruction *inst = cast(user); + globalUsers[inst->getFunction()].push_back(inst); + } + for (auto &eachFunc : globalUsers) { m_builder->SetInsertPointPastAllocas(eachFunc.first); Value *bufferDesc = m_builder->create( uniformConstantsSet, uniformConstantsBinding, m_builder->getInt32(0), lgc::Builder::BufferFlagNonConst); diff --git a/llpc/lowering/LowerGlobals.h b/llpc/lowering/LowerGlobals.h index dd1b692f81..efb1deb40a 100644 --- a/llpc/lowering/LowerGlobals.h +++ b/llpc/lowering/LowerGlobals.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -44,7 +44,7 @@ namespace Llpc { // ===================================================================================================================== -// Represents the pass of SPIR-V lowering operations for globals (global variables, inputs, and outputs). +// Represents the pass of FE lowering operations for globals (global variables, inputs, and outputs). class LowerGlobals : public SpirvLower, public llvm::PassInfoMixin { public: LowerGlobals(); @@ -58,10 +58,10 @@ class LowerGlobals : public SpirvLower, public llvm::PassInfoMixin void handleStoreInst(); void handleStoreInstGEP(GlobalVariable *output, ArrayRef indexOperands, StoreInst &storeInst); - static llvm::StringRef name() { return "Lower SPIR-V globals (global variables, inputs, and outputs)"; } + static llvm::StringRef name() { return "Lower globals (global variables, inputs, and outputs)"; } private: - void mapGlobalVariableToProxy(llvm::GlobalVariable *globalVar); + void mapGlobalVariableToProxy(llvm::GlobalVariable *globalVar, llvm::Constant *initializer = nullptr); void lowerInOut(llvm::GlobalVariable *globalVar); void lowerInOutUsersInPlace(llvm::GlobalVariable *globalVar, llvm::Value *current, SmallVectorImpl &indexStack); diff --git a/llpc/lowering/LowerInstMetaRemove.cpp b/llpc/lowering/LowerInstMetaRemove.cpp index 5967d25f3f..5e12abf050 100644 --- a/llpc/lowering/LowerInstMetaRemove.cpp +++ b/llpc/lowering/LowerInstMetaRemove.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -47,7 +47,7 @@ LowerInstMetaRemove::LowerInstMetaRemove() { } // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerInstMetaRemove.h b/llpc/lowering/LowerInstMetaRemove.h index f8f5a85b88..72b717049c 100644 --- a/llpc/lowering/LowerInstMetaRemove.h +++ b/llpc/lowering/LowerInstMetaRemove.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -36,14 +36,14 @@ namespace Llpc { // ===================================================================================================================== -// Represents the pass of SPIR-V lowering operations for removing the instruction metadata. +// Represents the pass of FE lowering operations for removing the instruction metadata. class LowerInstMetaRemove : public SpirvLower, public llvm::PassInfoMixin { public: LowerInstMetaRemove(); llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V instruction metadata by removing those targeted"; } + static llvm::StringRef name() { return "Lower instruction metadata by removing those targeted"; } }; } // namespace Llpc diff --git a/llpc/lowering/LowerMath.cpp b/llpc/lowering/LowerMath.cpp index 9cb85b7c5c..1707c4f9af 100644 --- a/llpc/lowering/LowerMath.cpp +++ b/llpc/lowering/LowerMath.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -194,7 +194,7 @@ static void disableFastMath(Value *value, bool clearAll) { #define DEBUG_TYPE DEBUG_TYPE_CONST_FOLDING // ===================================================================================================================== -// Executes constant folding SPIR-V lowering pass on the specified LLVM module. +// Executes constant folding FElowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation @@ -391,7 +391,7 @@ bool LowerMathPrecision::propagateNoContract(Module &module, bool forward, bool } // ===================================================================================================================== -// Run precision (fast math flag) adjustment SPIR-V lowering pass on the specified LLVM module. +// Run precision (fast math flag) adjustment FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation @@ -460,7 +460,7 @@ PreservedAnalyses LowerMathPrecision::run(Module &module, ModuleAnalysisManager #define DEBUG_TYPE DEBUG_TYPE_FLOAT_OP // ===================================================================================================================== -// Executes floating point optimisation SPIR-V lowering pass on the specified LLVM module. +// Executes floating point optimisation FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerMath.h b/llpc/lowering/LowerMath.h index fe416f7533..0f86384c35 100644 --- a/llpc/lowering/LowerMath.h +++ b/llpc/lowering/LowerMath.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -38,7 +38,7 @@ namespace Llpc { // ===================================================================================================================== -// SPIR-V lowering operations for math transformation. +// FE lowering operations for math transformation. class LowerMath : public SpirvLower { public: LowerMath(); @@ -55,13 +55,13 @@ class LowerMath : public SpirvLower { }; // ===================================================================================================================== -// SPIR-V lowering operations for math constant folding. +// FE lowering operations for math constant folding. class LowerMathConstFolding : public LowerMath, public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V math constant folding"; } + static llvm::StringRef name() { return "Lower math constant folding"; } // NOTE: This function is only used by the legacy pass manager wrapper class to retrieve the // entry point. The function can be removed once the switch to the new pass manager is completed. @@ -69,13 +69,13 @@ class LowerMathConstFolding : public LowerMath, public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V for precision (fast math flags)"; } + static llvm::StringRef name() { return "Lower math precision (fast math flags)"; } bool adjustExports(llvm::Module &module, bool clearAll); bool propagateNoContract(llvm::Module &module, bool forward, bool backward); @@ -83,7 +83,7 @@ class LowerMathPrecision : public SpirvLower, public llvm::PassInfoMixin, public llvm::InstVisitor { @@ -93,7 +93,7 @@ class LowerMathFloatOp : public LowerMath, virtual void visitBinaryOperator(llvm::BinaryOperator &binaryOp); virtual void visitCallInst(llvm::CallInst &callInst); virtual void visitFPTruncInst(llvm::FPTruncInst &fptruncInst); - static llvm::StringRef name() { return "Lower SPIR-V math floating point optimisation"; } + static llvm::StringRef name() { return "Lower math FP operations"; } }; } // namespace Llpc diff --git a/llpc/lowering/LowerMemoryOp.cpp b/llpc/lowering/LowerMemoryOp.cpp index 5ec48a11a9..68eadac46b 100644 --- a/llpc/lowering/LowerMemoryOp.cpp +++ b/llpc/lowering/LowerMemoryOp.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -45,7 +45,7 @@ using namespace Llpc; namespace Llpc { // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerMemoryOp.h b/llpc/lowering/LowerMemoryOp.h index 004f6ebbd3..bae2e666ba 100644 --- a/llpc/lowering/LowerMemoryOp.h +++ b/llpc/lowering/LowerMemoryOp.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -51,14 +51,14 @@ struct StoreExpandInfo { }; // ===================================================================================================================== -// Represents the pass of SPIR-V lowering memory operations. +// Represents the pass of FE lowering memory operations. class LowerMemoryOp : public SpirvLower, public llvm::InstVisitor, public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V memory operations"; } + static llvm::StringRef name() { return "Lower memory operations"; } virtual void visitGetElementPtrInst(llvm::GetElementPtrInst &getElementPtrInst); virtual void visitExtractElementInst(llvm::ExtractElementInst &extractElementInst); diff --git a/llpc/lowering/LowerPostInline.cpp b/llpc/lowering/LowerPostInline.cpp index 1646860944..58cfd8d6ae 100644 --- a/llpc/lowering/LowerPostInline.cpp +++ b/llpc/lowering/LowerPostInline.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -44,12 +44,12 @@ using namespace Llpc; namespace Llpc { // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation PreservedAnalyses LowerPostInline::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Spirv-Lower-ray-query-post-inline\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Post-Inline\n"); for (Function &func : module) { MDNode *execModelNode = func.getMetadata(gSPIRVMD::ExecutionModel); diff --git a/llpc/lowering/LowerPostInline.h b/llpc/lowering/LowerPostInline.h index 1224cab3e6..d247bd3ad0 100644 --- a/llpc/lowering/LowerPostInline.h +++ b/llpc/lowering/LowerPostInline.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -35,12 +35,12 @@ namespace Llpc { -// Represents the pass of SPIR-V lowering ray query post inline. +// Represents the pass of FE lowering ray query post inline. class LowerPostInline : public SpirvLower, public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V PostInline operations"; } + static llvm::StringRef name() { return "Lower post-inline operations"; } }; } // namespace Llpc diff --git a/llpc/lowering/LowerRayTracing.cpp b/llpc/lowering/LowerRayTracing.cpp index c491711905..a7c3e7d997 100644 --- a/llpc/lowering/LowerRayTracing.cpp +++ b/llpc/lowering/LowerRayTracing.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -543,12 +543,12 @@ void SpirvLowerRayTracingImpl::visitReportHitOp(ReportHitOp &inst) { } // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on // @param [in/out] analysisManager : Analysis manager to use for this transformation PreservedAnalyses SpirvLowerRayTracingImpl::run(Module &module, ModuleAnalysisManager &analysisManager) { - LLVM_DEBUG(dbgs() << "Run the pass Spirv-Lower-Ray-Tracing\n"); + LLVM_DEBUG(dbgs() << "Run the pass Lower-Ray-Tracing\n"); SpirvLower::init(&module); auto rayTracingContext = static_cast(m_context->getPipelineContext()); diff --git a/llpc/lowering/LowerRayTracing.h b/llpc/lowering/LowerRayTracing.h index 06e911b449..52aa766c08 100644 --- a/llpc/lowering/LowerRayTracing.h +++ b/llpc/lowering/LowerRayTracing.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -190,12 +190,12 @@ enum RayFlag : unsigned { }; // ===================================================================================================================== -// Represents the pass of SPIR-V lowering ray tracing. +// Represents the pass of FE lowering ray tracing. class SpirvLowerRayTracing : public llvm::PassInfoMixin { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V RayTracing operations"; } + static llvm::StringRef name() { return "Lower ray tracing operations"; } }; } // namespace Llpc diff --git a/llpc/lowering/LowerTerminator.cpp b/llpc/lowering/LowerTerminator.cpp index 1d41655690..87b3b93399 100644 --- a/llpc/lowering/LowerTerminator.cpp +++ b/llpc/lowering/LowerTerminator.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -51,7 +51,7 @@ using namespace Llpc; namespace Llpc { // ===================================================================================================================== -// Executes this SPIR-V lowering pass on the specified LLVM module. +// Executes this FE lowering pass on the specified LLVM module. // // @param [in/out] module : LLVM module to be run on (empty on entry) // @param [in/out] analysisManager : Analysis manager to use for this transformation diff --git a/llpc/lowering/LowerTerminator.h b/llpc/lowering/LowerTerminator.h index 58e548c94c..ab0fdedc23 100644 --- a/llpc/lowering/LowerTerminator.h +++ b/llpc/lowering/LowerTerminator.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -37,14 +37,14 @@ namespace Llpc { // ===================================================================================================================== -// Represents the pass of SPIR-V lowering terminators. +// Represents the pass of FE lowering terminators. class LowerTerminator : public SpirvLower, public llvm::PassInfoMixin, public llvm::InstVisitor { public: llvm::PreservedAnalyses run(llvm::Module &module, llvm::ModuleAnalysisManager &analysisManager); - static llvm::StringRef name() { return "Lower SPIR-V terminator"; } + static llvm::StringRef name() { return "Lower terminator"; } virtual void visitCallInst(llvm::CallInst &callInst); diff --git a/llpc/lowering/LowerTranslator.h b/llpc/lowering/LowerTranslator.h index 86416d21aa..a389cc1685 100644 --- a/llpc/lowering/LowerTranslator.h +++ b/llpc/lowering/LowerTranslator.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2018-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -49,7 +49,7 @@ class LowerTranslator : public SpirvLower, public llvm::PassInfoMixin promotableFunctions; + for (Function *func : maybeRtFuncs) { + if (!processLibraryFunction(func)) + promotableFunctions.push_back(func); + } // Implement builtins whose implementation is generic, i.e. not specific to LGC. - earlyGpurtTransform(module); + // Do not use the return value of `earlyGpurtTransform` since "Changed" would be trivially true in this pass. + earlyGpurtTransform(module, promotableFunctions, /*PreserveWaitMasks = */ false); return PreservedAnalyses::none(); } @@ -210,29 +215,38 @@ ProcessGpuRtLibrary::LibraryFunctionTable::LibraryFunctionTable() { } // ===================================================================================================================== -// Clear the block before patching the function +// Clear the block before lowering the function // // @param func : The function to process -void ProcessGpuRtLibrary::processLibraryFunction(Function *&func) { +// @ret: Returns whether the function has been processed. +bool ProcessGpuRtLibrary::processLibraryFunction(Function *&func) { auto funcName = func->getName(); // Special handling for _AmdContStackStore* and _AmdContStackLoad* to accept arbitrary type if (funcName.starts_with("_AmdContStackStore")) { m_builder->SetInsertPoint(clearBlock(func)); createContStackStore(func); - return; - } else if (funcName.starts_with("_AmdContStackLoad")) { + return true; + } + + if (funcName.starts_with("_AmdContStackLoad")) { m_builder->SetInsertPoint(clearBlock(func)); createContStackLoad(func); - return; - } else if (funcName.starts_with("_AmdEnqueue") || funcName.starts_with("_AmdWaitEnqueue")) { + return true; + } + + if (funcName.starts_with("_AmdEnqueue") || funcName.starts_with("_AmdWaitEnqueue")) { m_builder->SetInsertPoint(clearBlock(func)); createEnqueue(func); - return; - } else if (funcName.starts_with("_AmdValueI32Count")) { + return true; + } + + if (funcName.starts_with("_AmdValueI32Count")) { ContHelper::handleValueI32Count(*func, *m_builder); - return; - } else if (funcName.starts_with("_AmdValueGetI32") || funcName.starts_with("_AmdValueSetI32")) { + return true; + } + + if (funcName.starts_with("_AmdValueGetI32") || funcName.starts_with("_AmdValueSetI32")) { // The intrinsic handling require first argument to be a pointer, the rest to be values. SmallBitVector promotionMask(func->arg_size(), true); promotionMask.reset(0); @@ -241,7 +255,7 @@ void ProcessGpuRtLibrary::processLibraryFunction(Function *&func) { ContHelper::handleValueGetI32(*newFunc, *m_builder); else ContHelper::handleValueSetI32(*newFunc, *m_builder); - return; + return true; } // Create implementation for intrinsic functions. @@ -251,7 +265,7 @@ void ProcessGpuRtLibrary::processLibraryFunction(Function *&func) { auto funcPtr = gpurtFuncIt->second; m_builder->SetInsertPoint(clearBlock(func)); (this->*funcPtr)(func); - return; + return true; } auto &commonFuncTable = InternalLibraryIntrinsicUtil::LibraryFunctionTable::get().m_libFuncPtrs; @@ -260,65 +274,21 @@ void ProcessGpuRtLibrary::processLibraryFunction(Function *&func) { auto funcPtr = commonFuncIt->second; m_builder->SetInsertPoint(clearBlock(func)); (*funcPtr)(func, m_builder); - return; + return true; } // NOTE: GPURT now preserves all function names started with "_Amd", but some of them are not intrinsics, e.g., // "_AmdSystemData.IsTraversal", which are methods of system data structs. Skip those to let them be inlined // automatically. - bool isAmdIntrinsic = funcName.starts_with("_Amd") && !funcName.contains("."); - if (funcName.starts_with("_cont_") || isAmdIntrinsic) { - // TODO: Once we remove createEnqueue, also handle _AmdEnqueue* and _AmdWaitEnqueue* here. - bool isAmdAwaitLike = - isAmdIntrinsic && (funcName.starts_with("_AmdAwait") || funcName.starts_with("_AmdWaitAwait")); - - // This function is provided by GPURT to the compiler. + const bool isAmdIntrinsic = funcName.starts_with("_Amd") && !funcName.contains("."); + if (funcName.contains("_cont_") || isAmdIntrinsic) { if (!isAmdIntrinsic) func->setLinkage(GlobalValue::WeakAnyLinkage); - // Skip _AmdAwaitTraversal function resulting from calls to _AmdWaitAwaitTraversal. - if (!func->hasMetadata(TypedFuncTy::MDTypesName) && !func->arg_empty()) - return; - - SmallBitVector promotionMask(func->arg_size()); - for (unsigned argNo = 0; argNo < func->arg_size(); argNo++) { - auto *arg = func->getArg(argNo); - TypedArgTy argTy = TypedArgTy::get(arg); - auto funcName = func->getName(); - - if (!argTy.isPointerTy()) - continue; - - // Change the pointer type to its value type for non-struct types. - // Amd*Await use value types for all arguments. - // For _cont_SetTriangleHitAttributes, we always use its value type for hitAttributes argument. - if (!isa(argTy.getPointerElementType()) || isAmdAwaitLike || - (funcName == ContDriverFunc::SetTriangleHitAttributesName && argNo == 1)) - promotionMask.set(argNo); - } - - auto *newFunc = CompilerUtils::promotePointerArguments(func, promotionMask); - - // This function is provided by the compiler to GPURT. It will be substituted by LowerRaytracingPipeline. - if (isAmdIntrinsic) - newFunc->deleteBody(); - - // Fixup WaitAwait by removing the wait mask. - if (newFunc->getName().starts_with("_AmdWaitAwait")) { - llvm::forEachCall(*newFunc, [&](CallInst &CInst) { - SmallVector args(CInst.args()); - // Remove wait mask - args.erase(args.begin() + 1); - - m_builder->SetInsertPoint(&CInst); - auto *newValue = m_builder->CreateNamedCall("_AmdAwait", CInst.getType(), args, {}); - CInst.replaceAllUsesWith(newValue); - CInst.eraseFromParent(); - }); - } - - return; + return false; } + + return true; } // ===================================================================================================================== diff --git a/llpc/lowering/ProcessGpuRtLibrary.h b/llpc/lowering/ProcessGpuRtLibrary.h index 23c7e527e5..117e7d8f18 100644 --- a/llpc/lowering/ProcessGpuRtLibrary.h +++ b/llpc/lowering/ProcessGpuRtLibrary.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -91,7 +91,7 @@ class ProcessGpuRtLibrary : public SpirvLower, public llvm::PassInfoMixin, ptr addrspace({{.*}}) %{{.*}}, i32 0, i32 %{{[0-9]*}} ; SHADERTEST: getelementptr <3 x float>, ptr addrspace({{.*}}) %{{.*}}, i32 0, i32 %{{[0-9]*}} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %[[cmp1:.*]] = icmp eq i32 %{{[0-9]*}}, 1 ; SHADERTEST: select i1 %[[cmp1]], i32 {{.*}}, i32 {{.*}} ; SHADERTEST: %[[cmp2:.*]] = icmp eq i32 %{{[0-9]*}}, 2 diff --git a/llpc/test/shaderdb/core/OpAccessChain_TestInOutVectorExtract_lit.frag b/llpc/test/shaderdb/core/OpAccessChain_TestInOutVectorExtract_lit.frag index 7c747006f9..e4b99762ef 100644 --- a/llpc/test/shaderdb/core/OpAccessChain_TestInOutVectorExtract_lit.frag +++ b/llpc/test/shaderdb/core/OpAccessChain_TestInOutVectorExtract_lit.frag @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: add i32 %{{[0-9]*}}, 1 ; SHADERTEST: getelementptr [4 x <4 x float>], ptr addrspace({{.*}}) %{{.*}}, i32 0, i32 %{{[0-9]*}}, i32 %{{[0-9]*}} ; SHADERTEST: load i32, ptr addrspace({{.*}}) %{{[0-9]*}} diff --git a/llpc/test/shaderdb/core/OpAccessChain_TestMultiLevelChain_lit.spvasm b/llpc/test/shaderdb/core/OpAccessChain_TestMultiLevelChain_lit.spvasm index 408b21f068..6913124b92 100644 --- a/llpc/test/shaderdb/core/OpAccessChain_TestMultiLevelChain_lit.spvasm +++ b/llpc/test/shaderdb/core/OpAccessChain_TestMultiLevelChain_lit.spvasm @@ -6,12 +6,12 @@ ; SHADERTEST: getelementptr{{.*}}<{ [8 x [4 x float]], i32 }>, ptr addrspace({{.*}}) @{{.*}}, i32 0, ; SHADERTEST: getelementptr [4 x float], ptr addrspace({{.*}}) %{{[0-9]*}}, i32 0, i32 1 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: @lgc.load.buffer.desc(i64 0, i32 0, i32 0, ; SHADERTEST: load i32, ptr addrspace({{.*}}) {{.*}} ; SHADERTEST: load float, ptr addrspace({{.*}}) {{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpAccessChain_TestOutBlockMemberLocUnspecified_lit.vert b/llpc/test/shaderdb/core/OpAccessChain_TestOutBlockMemberLocUnspecified_lit.vert index 95e716d11d..885f29eb9f 100644 --- a/llpc/test/shaderdb/core/OpAccessChain_TestOutBlockMemberLocUnspecified_lit.vert +++ b/llpc/test/shaderdb/core/OpAccessChain_TestOutBlockMemberLocUnspecified_lit.vert @@ -26,7 +26,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: icmp eq i32 %{{[0-9]*}}, 1 ; SHADERTEST: select i1 %{{[0-9]*}}, ptr addrspace({{.*}}) %{{.*}}, ptr addrspace({{.*}}) %{{.*}} ; SHADERTEST: store <3 x double> {{(splat \(double 5\.000000e\-01\))|()}}, ptr addrspace({{.*}}) %{{[0-9]*}} diff --git a/llpc/test/shaderdb/core/OpAccessChain_TestUniformVectorExtract_lit.frag b/llpc/test/shaderdb/core/OpAccessChain_TestUniformVectorExtract_lit.frag index bf443bc343..cb94065a7b 100644 --- a/llpc/test/shaderdb/core/OpAccessChain_TestUniformVectorExtract_lit.frag +++ b/llpc/test/shaderdb/core/OpAccessChain_TestUniformVectorExtract_lit.frag @@ -19,7 +19,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; REQUIRES: do-not-run-me -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: [[GEPVAR:%[^ ]+]] = getelementptr <{ [4 x double], i32 }>, ptr addrspace(7) {{%[^,]+}}, i64 0, i32 0, i64 % ; SHADERTEST: load double, ptr addrspace(7) [[GEPVAR]], align 8 ; SHADERTEST: [[GEP16:%[^ ]+]] = getelementptr inbounds <{ [4 x double], i32 }>, ptr addrspace(7) {{%[^,]+}}, i64 0, i32 0, i64 2 diff --git a/llpc/test/shaderdb/core/OpArrayLength_TestGeneral_lit.frag b/llpc/test/shaderdb/core/OpArrayLength_TestGeneral_lit.frag index 3f5ac1944b..ad6fd6534f 100644 --- a/llpc/test/shaderdb/core/OpArrayLength_TestGeneral_lit.frag +++ b/llpc/test/shaderdb/core/OpArrayLength_TestGeneral_lit.frag @@ -25,9 +25,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST: call i32 {{.*}}@lgc.buffer.length( -; SHADERTEST: call i32 {{.*}}@lgc.buffer.length( +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST: call i64 {{.*}}@lgc.buffer.length( +; SHADERTEST: call i64 {{.*}}@lgc.buffer.length( ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpAtomicAnd_TestInt64ImageAtomicAnd.spvasm b/llpc/test/shaderdb/core/OpAtomicAnd_TestInt64ImageAtomicAnd.spvasm index 498d36264f..7055ec3109 100644 --- a/llpc/test/shaderdb/core/OpAtomicAnd_TestInt64ImageAtomicAnd.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicAnd_TestInt64ImageAtomicAnd.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 8 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.and.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestInt64ImageAtomicCompSwap.spvasm b/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestInt64ImageAtomicCompSwap.spvasm index 2b58dd9a5e..d1f828c8c7 100644 --- a/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestInt64ImageAtomicCompSwap.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestInt64ImageAtomicCompSwap.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.compare.swap.i64(i32 1 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.cmpswap.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestStrongCompare.spvasm b/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestStrongCompare.spvasm index bb88eec9b5..cf3a70827b 100644 --- a/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestStrongCompare.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicCompareExchange_TestStrongCompare.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %[[RESULT:[0-9]*]] = call i32 @llvm.amdgcn.raw.buffer.atomic.cmpswap.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, i32 %[[COMPARE:[0-9]*]] ; SHADERTEST: %[[IS_EQUAL:[0-9]*]] = icmp eq i32 %[[RESULT]], %[[COMPARE]] ; SHADERTEST: %[[INS1:[0-9]*]] = insertvalue { i32, i1 } %{{[0-9]*}}, i1 %[[IS_EQUAL]], 1 diff --git a/llpc/test/shaderdb/core/OpAtomicExchange_TestInt64ImageAtomicExchange.spvasm b/llpc/test/shaderdb/core/OpAtomicExchange_TestInt64ImageAtomicExchange.spvasm index b62118d9f4..949cbba7e2 100644 --- a/llpc/test/shaderdb/core/OpAtomicExchange_TestInt64ImageAtomicExchange.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicExchange_TestInt64ImageAtomicExchange.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 0 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.swap.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicIAdd_TestInt64ImageAtomicAdd.spvasm b/llpc/test/shaderdb/core/OpAtomicIAdd_TestInt64ImageAtomicAdd.spvasm index 57142da842..31f4681206 100644 --- a/llpc/test/shaderdb/core/OpAtomicIAdd_TestInt64ImageAtomicAdd.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicIAdd_TestInt64ImageAtomicAdd.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 2 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.add.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicIDecrement_TestInt64ImageAtomicDecrement.spvasm b/llpc/test/shaderdb/core/OpAtomicIDecrement_TestInt64ImageAtomicDecrement.spvasm index 9f3c8b02c1..51ac036d45 100644 --- a/llpc/test/shaderdb/core/OpAtomicIDecrement_TestInt64ImageAtomicDecrement.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicIDecrement_TestInt64ImageAtomicDecrement.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 3, {{.*}}, i64 1) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.sub.2d.i64.i16{{(\.v8i32)?}}(i64 1, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicIDecrement_TestStorageBlock_lit.spvasm b/llpc/test/shaderdb/core/OpAtomicIDecrement_TestStorageBlock_lit.spvasm index 797740d65b..cd074b042c 100644 --- a/llpc/test/shaderdb/core/OpAtomicIDecrement_TestStorageBlock_lit.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicIDecrement_TestStorageBlock_lit.spvasm @@ -1,11 +1,11 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST; call i32 @lgc.buffer.atomic.idecrement.i32(<4 x i32> %{{[0-9]*}}, i32 24, i32 0, i1 false) ; SHADERTEST: store i32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.atomic.sub.i32{{(\.v4i32)?}}(i32 1, <4 x i32> %{{[0-9]*}}, i32 24, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 0, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpAtomicIIncrement_TestInt64ImageAtomicIncrement.spvasm b/llpc/test/shaderdb/core/OpAtomicIIncrement_TestInt64ImageAtomicIncrement.spvasm index 473bea4d2d..17777a2f9f 100644 --- a/llpc/test/shaderdb/core/OpAtomicIIncrement_TestInt64ImageAtomicIncrement.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicIIncrement_TestInt64ImageAtomicIncrement.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 2, {{.*}}, i64 1) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.add.2d.i64.i16{{(\.v8i32)?}}(i64 1, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicIIncrement_TestStorageBlock_lit.spvasm b/llpc/test/shaderdb/core/OpAtomicIIncrement_TestStorageBlock_lit.spvasm index 4b6446796a..d6e9389556 100644 --- a/llpc/test/shaderdb/core/OpAtomicIIncrement_TestStorageBlock_lit.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicIIncrement_TestStorageBlock_lit.spvasm @@ -1,11 +1,11 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST; store i32 ; SHADERTEST: atomicrmw add ptr -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.atomic.add.i32{{(\.v4i32)?}}(i32 1, <4 x i32> %{{[0-9]*}}, i32 24, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 0, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicIIncrement_TestVariablePointer_lit.spvasm b/llpc/test/shaderdb/core/OpAtomicIIncrement_TestVariablePointer_lit.spvasm index 5e59fa2953..f16199d4f1 100644 --- a/llpc/test/shaderdb/core/OpAtomicIIncrement_TestVariablePointer_lit.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicIIncrement_TestVariablePointer_lit.spvasm @@ -1,9 +1,9 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST; call i32 @lgc.buffer.atomic.iincrement.i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0, i1 false) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.atomic.add.i32{{(\.v4i32)?}}(i32 1, <4 x i32> %{{[0-9]*}}, i32 0, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicISub_TestInt64ImageAtomicSub.spvasm b/llpc/test/shaderdb/core/OpAtomicISub_TestInt64ImageAtomicSub.spvasm index e535c33cad..af369cc05f 100644 --- a/llpc/test/shaderdb/core/OpAtomicISub_TestInt64ImageAtomicSub.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicISub_TestInt64ImageAtomicSub.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 3 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.sub.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicLoad_TestInt64ImageAtomicLoad.spvasm b/llpc/test/shaderdb/core/OpAtomicLoad_TestInt64ImageAtomicLoad.spvasm index 677c6052e4..1d8f555c4f 100644 --- a/llpc/test/shaderdb/core/OpAtomicLoad_TestInt64ImageAtomicLoad.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicLoad_TestInt64ImageAtomicLoad.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 2, {{.*}}, i64 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.add.2d.i64.i16{{(\.v8i32)?}}(i64 0, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicLoad_TestStorageBlock_lit.spvasm b/llpc/test/shaderdb/core/OpAtomicLoad_TestStorageBlock_lit.spvasm index 6cdfdd1eb6..dc027d6a68 100644 --- a/llpc/test/shaderdb/core/OpAtomicLoad_TestStorageBlock_lit.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicLoad_TestStorageBlock_lit.spvasm @@ -2,10 +2,10 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{.*}} = load atomic i32, ptr addrspace({{.*}}) {{.*}} monotonic -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{.*}} = call i32 @llvm.amdgcn.raw.atomic.buffer.load.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicOr_TestInt64ImageAtomicOr.spvasm b/llpc/test/shaderdb/core/OpAtomicOr_TestInt64ImageAtomicOr.spvasm index 039c4c760e..0c404e7283 100644 --- a/llpc/test/shaderdb/core/OpAtomicOr_TestInt64ImageAtomicOr.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicOr_TestInt64ImageAtomicOr.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 9 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.or.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicSMax_TestInt64ImageAtomicMax.spvasm b/llpc/test/shaderdb/core/OpAtomicSMax_TestInt64ImageAtomicMax.spvasm index 3ed4320662..4869c770f0 100644 --- a/llpc/test/shaderdb/core/OpAtomicSMax_TestInt64ImageAtomicMax.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicSMax_TestInt64ImageAtomicMax.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 6 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.smax.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicSMin_TestInt64ImageAtomicMin.spvasm b/llpc/test/shaderdb/core/OpAtomicSMin_TestInt64ImageAtomicMin.spvasm index a78d57f0c7..32e99f2427 100644 --- a/llpc/test/shaderdb/core/OpAtomicSMin_TestInt64ImageAtomicMin.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicSMin_TestInt64ImageAtomicMin.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 4 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.smin.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicStore_TestInt64ImageAtomicStore.spvasm b/llpc/test/shaderdb/core/OpAtomicStore_TestInt64ImageAtomicStore.spvasm index 52eff183e7..9ae9cd8656 100644 --- a/llpc/test/shaderdb/core/OpAtomicStore_TestInt64ImageAtomicStore.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicStore_TestInt64ImageAtomicStore.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 0 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.swap.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicStore_TestStorageBlock_lit.spvasm b/llpc/test/shaderdb/core/OpAtomicStore_TestStorageBlock_lit.spvasm index a6a0db5cc4..8e9c010abb 100644 --- a/llpc/test/shaderdb/core/OpAtomicStore_TestStorageBlock_lit.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicStore_TestStorageBlock_lit.spvasm @@ -2,10 +2,10 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: store atomic i32 %{{.*}}, ptr addrspace({{.*}}7) %{{.*}} monotonic -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 %{{.*}}, <4 x i32> %{{.*}}, i32 %{{.*}}, i32 0, i32 1) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicUMax_TestInt64ImageAtomicMax.spvasm b/llpc/test/shaderdb/core/OpAtomicUMax_TestInt64ImageAtomicMax.spvasm index 550da81a81..fec5c0477d 100644 --- a/llpc/test/shaderdb/core/OpAtomicUMax_TestInt64ImageAtomicMax.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicUMax_TestInt64ImageAtomicMax.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 7 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.umax.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicUMin_TestInt64ImageAtomicMin.spvasm b/llpc/test/shaderdb/core/OpAtomicUMin_TestInt64ImageAtomicMin.spvasm index 01196491f3..2b8acf1e8b 100644 --- a/llpc/test/shaderdb/core/OpAtomicUMin_TestInt64ImageAtomicMin.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicUMin_TestInt64ImageAtomicMin.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 5 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.umin.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpAtomicXXX_TestImageDimension_lit.comp b/llpc/test/shaderdb/core/OpAtomicXXX_TestImageDimension_lit.comp index fe4376bc13..c54813cdbf 100644 --- a/llpc/test/shaderdb/core/OpAtomicXXX_TestImageDimension_lit.comp +++ b/llpc/test/shaderdb/core/OpAtomicXXX_TestImageDimension_lit.comp @@ -123,7 +123,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 0, i32 512, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 7, i32 9) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 1, i32 512, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 7\))|()}}, i32 9) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 2, i32 512, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <3 x i32> {{(splat \(i32 7\))|()}}, i32 9) @@ -213,7 +213,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.compare.swap.i32(i32 6, i32 512, i32 0, ptr addrspace(4) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.compare.swap.i32(i32 7, i32 512, i32 0, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.1d.i32.i16{{(\.v8i32)?}}(i32 9, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.2d.i32.i16{{(\.v8i32)?}}(i32 9, i16 7, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.3d.i32.i16{{(\.v8i32)?}}(i32 9, i16 7, i16 7, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpAtomicXXX_TestImageMemoryQualifier_lit.comp b/llpc/test/shaderdb/core/OpAtomicXXX_TestImageMemoryQualifier_lit.comp index b1c29c82d8..2dc29e0f32 100644 --- a/llpc/test/shaderdb/core/OpAtomicXXX_TestImageMemoryQualifier_lit.comp +++ b/llpc/test/shaderdb/core/OpAtomicXXX_TestImageMemoryQualifier_lit.comp @@ -15,12 +15,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 1, i32 512, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 5\))|()}}, i32 9) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 1, i32 513, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 5\))|()}}, i32 9) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 1, i32 515, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 5\))|()}}, i32 9) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.2d.i32.i16{{(\.v8i32)?}}(i32 9, i16 5, i16 5, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.2d.i32.i16{{(\.v8i32)?}}(i32 9, i16 5, i16 5, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.2d.i32.i16{{(\.v8i32)?}}(i32 9, i16 5, i16 5, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.comp b/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.comp index b6d56db32d..39c30f2f0f 100644 --- a/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.comp +++ b/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.comp @@ -45,7 +45,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 1, i32 512, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 7\))|()}}, i32 9) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 4, i32 1, i32 512, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 7\))|()}}, i32 9) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 6, i32 1, i32 512, i32 0, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 7\))|()}}, i32 9) @@ -64,7 +64,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.compare.swap.i32(i32 1, i32 512, i32 0, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.image.atomic.f32(i32 0, i32 1, i32 512, i32 0, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.2d.i32.i16{{(\.v8i32)?}}(i32 9, i16 7, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.smin.2d.i32.i16{{(\.v8i32)?}}(i32 9, i16 7, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.smax.2d.i32.i16{{(\.v8i32)?}}(i32 9, i16 7, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.frag b/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.frag index 76fb5d19dc..75fadea235 100644 --- a/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.frag +++ b/llpc/test/shaderdb/core/OpAtomicXXX_TestImage_lit.frag @@ -47,7 +47,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 0, i32 512, i32 0, ptr addrspace(4) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 4, i32 1, i32 512, i32 0, ptr addrspace(4) ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 6, i32 1, i32 640, i32 0, ptr addrspace(4) @@ -66,7 +66,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.compare.swap.i32(i32 3, i32 512, i32 0, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.image.atomic.f32(i32 0, i32 9, i32 512, i32 0, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.add.1d.i32.i16{{(\.v8i32)?}}(i32 %{{.*}}, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.smin.2d.i32.i16{{(\.v8i32)?}}(i32 %{{.*}}, i16 2, i16 2, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.atomic.smax.2d.i32.i16{{(\.v8i32)?}}(i32 %{{.*}}, i16 2, i16 2, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpAtomicXXX_TestSharedVariable_lit.comp b/llpc/test/shaderdb/core/OpAtomicXXX_TestSharedVariable_lit.comp index c8d7ebdcb7..5b59cc5a0a 100644 --- a/llpc/test/shaderdb/core/OpAtomicXXX_TestSharedVariable_lit.comp +++ b/llpc/test/shaderdb/core/OpAtomicXXX_TestSharedVariable_lit.comp @@ -62,7 +62,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: @{{.*}} = addrspace(3) global i32 ; SHADERTEST: @{{.*}} = addrspace(3) global [4 x i32] ; SHADERTEST: atomicrmw add ptr addrspace(3) @{{.*}}, i32 %{{[0-9]*}} syncscope("agent") monotonic diff --git a/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlockAndSharedWithData64_lit.comp b/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlockAndSharedWithData64_lit.comp index 6fb46ef270..f26b1acee3 100644 --- a/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlockAndSharedWithData64_lit.comp +++ b/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlockAndSharedWithData64_lit.comp @@ -80,7 +80,7 @@ void main () // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: atomicrmw umin ptr addrspace({{.*}}) %{{[0-9]*}}, i64 %{{[0-9]*}} syncscope("agent") monotonic ; SHADERTEST: atomicrmw umax ptr addrspace({{.*}}) %{{[0-9]*}}, i64 %{{[0-9]*}} syncscope("agent") monotonic ; SHADERTEST: atomicrmw and ptr addrspace({{.*}}) %{{[0-9]*}}, i64 %{{[0-9]*}} syncscope("agent") monotonic @@ -106,7 +106,7 @@ void main () ; SHADERTEST: atomicrmw add ptr addrspace(3) getelementptr inbounds {{(nuw )?}}(i8, ptr addrspace(3) @{{.*}}, i32 80), i64 %{{[0-9]*}} syncscope("agent") monotonic ; SHADERTEST: cmpxchg ptr addrspace(3) getelementptr inbounds {{(nuw )?}}(i8, ptr addrspace(3) @{{.*}}, i32 96), i64 78187493520, i64 %{{[0-9]*}} syncscope("agent") monotonic -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.raw.buffer.atomic.umin.i64{{(\.v4i32)?}}(i64 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 0, i32 0, i32 0) ; SHADERTEST: call i64 @llvm.amdgcn.raw.buffer.atomic.umax.i64{{(\.v4i32)?}}(i64 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 8, i32 0, i32 0) ; SHADERTEST: call i64 @llvm.amdgcn.raw.buffer.atomic.and.i64{{(\.v4i32)?}}(i64 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 16, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlock_lit.frag b/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlock_lit.frag index 0f99246bb1..9b0ffe58b0 100644 --- a/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlock_lit.frag +++ b/llpc/test/shaderdb/core/OpAtomicXXX_TestStorageBlock_lit.frag @@ -45,7 +45,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: atomicrmw add ptr {{.*}} monotonic ; SHADERTEST: atomicrmw min ptr {{.*}} monotonic ; SHADERTEST: atomicrmw max ptr {{.*}} monotonic @@ -63,7 +63,7 @@ void main() ; SHADERTEST: atomicrmw xchg ptr {{.*}} monotonic ; SHADERTEST: cmpxchg ptr {{.*}} monotonic monotonic -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.atomic.add.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 0, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.atomic.smin.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 0, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.atomic.smax.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 0, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpAtomicXor_TestInt64ImageAtomicXor.spvasm b/llpc/test/shaderdb/core/OpAtomicXor_TestInt64ImageAtomicXor.spvasm index 31e42ab898..2400c80a12 100644 --- a/llpc/test/shaderdb/core/OpAtomicXor_TestInt64ImageAtomicXor.spvasm +++ b/llpc/test/shaderdb/core/OpAtomicXor_TestInt64ImageAtomicXor.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 10 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i64 @llvm.amdgcn.image.atomic.xor.2d.i64.i16{{(\.v8i32)?}}(i64 %{{.*}}, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitCount_TestIntConst_lit.frag b/llpc/test/shaderdb/core/OpBitCount_TestIntConst_lit.frag index 07685ccd9f..cc640141b5 100644 --- a/llpc/test/shaderdb/core/OpBitCount_TestIntConst_lit.frag +++ b/llpc/test/shaderdb/core/OpBitCount_TestIntConst_lit.frag @@ -10,7 +10,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call {{(range.*)?}}i32 @llvm.ctpop.i32 ; SHADERTEST: add nuw nsw i32 %{{[0-9*]}}, 2 diff --git a/llpc/test/shaderdb/core/OpBitCount_TestInt_lit.frag b/llpc/test/shaderdb/core/OpBitCount_TestInt_lit.frag index 41345ce4c0..a5a5489bdc 100644 --- a/llpc/test/shaderdb/core/OpBitCount_TestInt_lit.frag +++ b/llpc/test/shaderdb/core/OpBitCount_TestInt_lit.frag @@ -19,7 +19,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST-COUNT-2: call {{(range.*)?}}i32 @llvm.ctpop.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitCount_TestIvec4_lit.frag b/llpc/test/shaderdb/core/OpBitCount_TestIvec4_lit.frag index fa37a08a8b..b7cb4c9a37 100644 --- a/llpc/test/shaderdb/core/OpBitCount_TestIvec4_lit.frag +++ b/llpc/test/shaderdb/core/OpBitCount_TestIvec4_lit.frag @@ -10,7 +10,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST-COUNT-4: call {{(range.*)?}}i32 @llvm.ctpop.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitCount_TestUint_lit.frag b/llpc/test/shaderdb/core/OpBitCount_TestUint_lit.frag index 09b228517c..323cb7085a 100644 --- a/llpc/test/shaderdb/core/OpBitCount_TestUint_lit.frag +++ b/llpc/test/shaderdb/core/OpBitCount_TestUint_lit.frag @@ -19,7 +19,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST-COUNT-2: call {{(range.*)?}}i32 @llvm.ctpop.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitFieldInsert_TestIntConst_lit.frag b/llpc/test/shaderdb/core/OpBitFieldInsert_TestIntConst_lit.frag index bf9dd94118..5969854357 100644 --- a/llpc/test/shaderdb/core/OpBitFieldInsert_TestIntConst_lit.frag +++ b/llpc/test/shaderdb/core/OpBitFieldInsert_TestIntConst_lit.frag @@ -15,7 +15,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call i32 (...) @lgc.create.insert.bit.field.i32(i32 3, i32 6, i32 4, i32 5) -; SHADERTEST-LABEL: {{^// LLPC.*}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: float 9.900000e+01 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitFieldSExtract_TestGeneral_lit.frag b/llpc/test/shaderdb/core/OpBitFieldSExtract_TestGeneral_lit.frag index ca6a2f7e87..1a0526cbe6 100644 --- a/llpc/test/shaderdb/core/OpBitFieldSExtract_TestGeneral_lit.frag +++ b/llpc/test/shaderdb/core/OpBitFieldSExtract_TestGeneral_lit.frag @@ -25,7 +25,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.extract.bit.field.i32(i32 {{.*}}, i1 true) ; SHADERTEST: call <3 x i32> (...) @lgc.create.extract.bit.field.v3i32(<3 x i32> {{.*}}, i1 true) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-CONUT-2: call i32 @llvm.amdgcn.sbfe.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitFieldSExtract_TestIntConst_lit.frag b/llpc/test/shaderdb/core/OpBitFieldSExtract_TestIntConst_lit.frag index 5a901b7136..ba9449cab9 100644 --- a/llpc/test/shaderdb/core/OpBitFieldSExtract_TestIntConst_lit.frag +++ b/llpc/test/shaderdb/core/OpBitFieldSExtract_TestIntConst_lit.frag @@ -16,7 +16,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.extract.bit.field.i32(i32 {{.*}}, i1 true) ; SHADERTEST: call i32 (...) @lgc.create.extract.bit.field.i32(i32 3423, i32 0, i32 32, i1 true) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.sbfe.i32 ; SHADERTEST: add i32 %{{[0-9]*}}, 3423 diff --git a/llpc/test/shaderdb/core/OpBitFieldUExtract_TestGeneral_lit.frag b/llpc/test/shaderdb/core/OpBitFieldUExtract_TestGeneral_lit.frag index 39d3349fe9..281b6bc633 100644 --- a/llpc/test/shaderdb/core/OpBitFieldUExtract_TestGeneral_lit.frag +++ b/llpc/test/shaderdb/core/OpBitFieldUExtract_TestGeneral_lit.frag @@ -25,7 +25,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.extract.bit.field.i32(i32 {{.*}}, i1 false) ; SHADERTEST: call <3 x i32> (...) @lgc.create.extract.bit.field.v3i32(<3 x i32> {{.*}}, i1 false) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-2: call i32 @llvm.amdgcn.ubfe.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitFieldUExtract_TestUint_lit.frag b/llpc/test/shaderdb/core/OpBitFieldUExtract_TestUint_lit.frag index 9786b77e8d..a2cb8965d1 100644 --- a/llpc/test/shaderdb/core/OpBitFieldUExtract_TestUint_lit.frag +++ b/llpc/test/shaderdb/core/OpBitFieldUExtract_TestUint_lit.frag @@ -13,7 +13,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call i32 (...) @lgc.create.extract.bit.field.i32(i32 {{.*}}, i1 false) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.ubfe.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitReverse_TestInt_lit.frag b/llpc/test/shaderdb/core/OpBitReverse_TestInt_lit.frag index 9334470866..c67378fda7 100644 --- a/llpc/test/shaderdb/core/OpBitReverse_TestInt_lit.frag +++ b/llpc/test/shaderdb/core/OpBitReverse_TestInt_lit.frag @@ -12,7 +12,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call i32 @llvm.bitreverse.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitcast_TestIvec3ToUvec3_lit.frag b/llpc/test/shaderdb/core/OpBitcast_TestIvec3ToUvec3_lit.frag index acce984381..6d3636d706 100644 --- a/llpc/test/shaderdb/core/OpBitcast_TestIvec3ToUvec3_lit.frag +++ b/llpc/test/shaderdb/core/OpBitcast_TestIvec3ToUvec3_lit.frag @@ -16,7 +16,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: load <3 x i32>, ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpBitcast_TestUintToInt_lit.frag b/llpc/test/shaderdb/core/OpBitcast_TestUintToInt_lit.frag index 0dd93f11f8..1a8f43b2ab 100644 --- a/llpc/test/shaderdb/core/OpBitcast_TestUintToInt_lit.frag +++ b/llpc/test/shaderdb/core/OpBitcast_TestUintToInt_lit.frag @@ -16,7 +16,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: load i32, ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpControlBarrier_TestGeneral_lit.comp b/llpc/test/shaderdb/core/OpControlBarrier_TestGeneral_lit.comp index 9c2cc7c2ae..2f2602cd87 100644 --- a/llpc/test/shaderdb/core/OpControlBarrier_TestGeneral_lit.comp +++ b/llpc/test/shaderdb/core/OpControlBarrier_TestGeneral_lit.comp @@ -18,7 +18,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: @llvm.amdgcn.s.barrier() ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpConvertFToS_TestDoubleToInt_lit.frag b/llpc/test/shaderdb/core/OpConvertFToS_TestDoubleToInt_lit.frag index b1dcb9eb49..f494fd301b 100644 --- a/llpc/test/shaderdb/core/OpConvertFToS_TestDoubleToInt_lit.frag +++ b/llpc/test/shaderdb/core/OpConvertFToS_TestDoubleToInt_lit.frag @@ -16,7 +16,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: fptosi double {{.*}} to i32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpCopyMemory_TestCopyUniformToOutput_lit.spvasm b/llpc/test/shaderdb/core/OpCopyMemory_TestCopyUniformToOutput_lit.spvasm index b30eaead33..3751c03954 100644 --- a/llpc/test/shaderdb/core/OpCopyMemory_TestCopyUniformToOutput_lit.spvasm +++ b/llpc/test/shaderdb/core/OpCopyMemory_TestCopyUniformToOutput_lit.spvasm @@ -3,7 +3,7 @@ ; SHADERTEST-LABEL: {{^// LLPC.*}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]+}} = load <4 x float>, ; SHADERTEST: store <4 x float> %{{[0-9]+}}, ptr addrspace({{[0-9]+}}) @{{.*}} -; SHADERTEST-LABEL: {{^// LLPC.*}} patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: [[ld:%[0-9]*]] = call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32 ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpCopyMemory_TestStruct_lit.spvasm b/llpc/test/shaderdb/core/OpCopyMemory_TestStruct_lit.spvasm index d2c5773884..2dd83c0521 100644 --- a/llpc/test/shaderdb/core/OpCopyMemory_TestStruct_lit.spvasm +++ b/llpc/test/shaderdb/core/OpCopyMemory_TestStruct_lit.spvasm @@ -34,7 +34,7 @@ ; SHADERTEST: extractvalue { <4 x float>, <4 x float>, <4 x float>, <4 x float> } ; SHADERTEST: store <4 x float> -; SHADERTEST-LABEL: {{^// LLPC.*}} patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: @llvm.amdgcn.s.buffer.load.v4i32 ; SHADERTEST: @llvm.amdgcn.s.buffer.load.v4i32 ; SHADERTEST: @llvm.amdgcn.s.buffer.load.v4i32 diff --git a/llpc/test/shaderdb/core/OpDPdx_TestFineCoarse_lit.frag b/llpc/test/shaderdb/core/OpDPdx_TestFineCoarse_lit.frag index c2a882f843..c8491cb3ba 100644 --- a/llpc/test/shaderdb/core/OpDPdx_TestFineCoarse_lit.frag +++ b/llpc/test/shaderdb/core/OpDPdx_TestFineCoarse_lit.frag @@ -19,7 +19,7 @@ void main() ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.derivative.v3f32(<3 x float> %{{.*}}, i1 false, i1 false) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.derivative.v3f32(<3 x float> %{{.*}}, i1 false, i1 true) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.derivative.v3f32(<3 x float> %{{.*}}, i1 false, i1 false) -; SHADERTEST-LABEL: {{^// LLPC.*}} patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32(i32 {{[%0-9]+}}, i32 85, i32 15, i32 15, i1 true) ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32(i32 {{[%0-9]+}}, i32 0, i32 15, i32 15, i1 true) ; SHADERTEST: call {{.*}}float @llvm.amdgcn.wqm.f32(float %{{[0-9]+}}) diff --git a/llpc/test/shaderdb/core/OpDPdy_TestFineCoarse_lit.frag b/llpc/test/shaderdb/core/OpDPdy_TestFineCoarse_lit.frag index 407a397d31..08e442d932 100644 --- a/llpc/test/shaderdb/core/OpDPdy_TestFineCoarse_lit.frag +++ b/llpc/test/shaderdb/core/OpDPdy_TestFineCoarse_lit.frag @@ -19,7 +19,7 @@ void main() ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.derivative.v3f32(<3 x float> %{{.*}}, i1 true, i1 false) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.derivative.v3f32(<3 x float> %{{.*}}, i1 true, i1 true) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.derivative.v3f32(<3 x float> %{{.*}}, i1 true, i1 false) -; SHADERTEST-LABEL: {{^// LLPC.*}} patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32(i32 {{[%0-9]+}}, i32 170, i32 15, i32 15, i1 true) ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32(i32 {{[%0-9]+}}, i32 0, i32 15, i32 15, i1 true) ; SHADERTEST: call {{.*}}float @llvm.amdgcn.wqm.f32(float {{[%0-9]+}}) diff --git a/llpc/test/shaderdb/core/OpEmitStreamVertex_TestGeneral_lit.geom b/llpc/test/shaderdb/core/OpEmitStreamVertex_TestGeneral_lit.geom index 11eb26e804..5067d05cf0 100644 --- a/llpc/test/shaderdb/core/OpEmitStreamVertex_TestGeneral_lit.geom +++ b/llpc/test/shaderdb/core/OpEmitStreamVertex_TestGeneral_lit.geom @@ -22,7 +22,7 @@ void main ( ) ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call {{[a-zA-Z_]+}} void @EmitStreamVertex.i32(i32 1) ; SHADERTEST: call void (...) @lgc.create.end.primitive(i32 1) -; SHADERTEST-LABEL: {{^// LLPC.*}} patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.s.sendmsg(i32 290, i32 %gsWaveId) ; SHADERTEST: call void @llvm.amdgcn.s.sendmsg(i32 290, i32 %gsWaveId) ; SHADERTEST: call void @llvm.amdgcn.s.sendmsg(i32 290, i32 %gsWaveId) diff --git a/llpc/test/shaderdb/core/OpEmitVertex_TestGeneral_lit.geom b/llpc/test/shaderdb/core/OpEmitVertex_TestGeneral_lit.geom index 62c4e667f2..c100efdc20 100644 --- a/llpc/test/shaderdb/core/OpEmitVertex_TestGeneral_lit.geom +++ b/llpc/test/shaderdb/core/OpEmitVertex_TestGeneral_lit.geom @@ -22,7 +22,7 @@ void main ( ) ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call {{[a-zA-Z_]+}} void @EmitVertex() ; SHADERTEST: call void (...) @lgc.create.end.primitive(i32 0) -; SHADERTEST-LABEL: {{^// LLPC.*}} patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.s.sendmsg(i32 34, i32 %gsWaveId) ; SHADERTEST: call void @llvm.amdgcn.s.sendmsg(i32 34, i32 %gsWaveId) ; SHADERTEST: call void @llvm.amdgcn.s.sendmsg(i32 34, i32 %gsWaveId) diff --git a/llpc/test/shaderdb/core/OpFAdd_TestMatrix_lit.frag b/llpc/test/shaderdb/core/OpFAdd_TestMatrix_lit.frag index 210dfd9190..eba074dc55 100644 --- a/llpc/test/shaderdb/core/OpFAdd_TestMatrix_lit.frag +++ b/llpc/test/shaderdb/core/OpFAdd_TestMatrix_lit.frag @@ -22,10 +22,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-2: fadd reassoc nnan nsz arcp contract afn <2 x float> ; SHADERTEST-COUNT-2: fadd reassoc nnan nsz arcp contract <4 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpFAdd_TestVector_lit.frag b/llpc/test/shaderdb/core/OpFAdd_TestVector_lit.frag index 2625d5713f..4ae61b2e9a 100644 --- a/llpc/test/shaderdb/core/OpFAdd_TestVector_lit.frag +++ b/llpc/test/shaderdb/core/OpFAdd_TestVector_lit.frag @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: fadd reassoc nnan nsz arcp contract afn float ; SHADERTEST: fadd reassoc nnan nsz arcp contract <2 x double> ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpFConvert_TestDmat4ToMat4_lit.frag b/llpc/test/shaderdb/core/OpFConvert_TestDmat4ToMat4_lit.frag index 02912d6519..6ecd8f8ed1 100644 --- a/llpc/test/shaderdb/core/OpFConvert_TestDmat4ToMat4_lit.frag +++ b/llpc/test/shaderdb/core/OpFConvert_TestDmat4ToMat4_lit.frag @@ -17,9 +17,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-2: fptrunc <4 x double> {{.*}} to <4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-8: fptrunc double {{.*}} to float ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFConvert_TestDoubleToFloat_lit.frag b/llpc/test/shaderdb/core/OpFConvert_TestDoubleToFloat_lit.frag index d4244c738a..79c2642d46 100644 --- a/llpc/test/shaderdb/core/OpFConvert_TestDoubleToFloat_lit.frag +++ b/llpc/test/shaderdb/core/OpFConvert_TestDoubleToFloat_lit.frag @@ -24,9 +24,9 @@ void main () /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST fptrunc double {{.*}} to float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST fptrunc double {{.*}} to float ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFConvert_TestMat2X3ToDmat2X3_lit.frag b/llpc/test/shaderdb/core/OpFConvert_TestMat2X3ToDmat2X3_lit.frag index 418ea117f4..76a8d29d4e 100644 --- a/llpc/test/shaderdb/core/OpFConvert_TestMat2X3ToDmat2X3_lit.frag +++ b/llpc/test/shaderdb/core/OpFConvert_TestMat2X3ToDmat2X3_lit.frag @@ -18,9 +18,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-1: fpext <3 x float> {{.*}} to <3 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-3: fpext float {{.*}} to double ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTN_lit.spvasm b/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTN_lit.spvasm index 98b59a833d..0833d44a66 100644 --- a/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTN_lit.spvasm +++ b/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTN_lit.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -verify-ir -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{.*}} = call {{.*}} @llvm.fptrunc.round.f16.f32(float %{{.*}}, metadata !"round.downward") ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTP_lit.spvasm b/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTP_lit.spvasm index 1301e337a2..13af0fc152 100644 --- a/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTP_lit.spvasm +++ b/llpc/test/shaderdb/core/OpFConvert_TestRoundingModeRTP_lit.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -verify-ir -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{.*}} = call {{.*}} @llvm.fptrunc.round.f16.f32(float %{{.*}}, metadata !"round.upward") ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpFConvert_TestVec3ToDvec3_lit.frag b/llpc/test/shaderdb/core/OpFConvert_TestVec3ToDvec3_lit.frag index 33a355146d..21c4b49694 100644 --- a/llpc/test/shaderdb/core/OpFConvert_TestVec3ToDvec3_lit.frag +++ b/llpc/test/shaderdb/core/OpFConvert_TestVec3ToDvec3_lit.frag @@ -25,7 +25,7 @@ void main () /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: fpext <3 x float> {{.*}} to <3 x double> ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFDiv_TestVector_lit.frag b/llpc/test/shaderdb/core/OpFDiv_TestVector_lit.frag index 54cafa152c..b51e50769c 100644 --- a/llpc/test/shaderdb/core/OpFDiv_TestVector_lit.frag +++ b/llpc/test/shaderdb/core/OpFDiv_TestVector_lit.frag @@ -24,7 +24,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST-COUNT-1: fdiv reassoc nnan nsz arcp contract afn <4 x float> ; SHADERTEST-COUNT-1: fdiv reassoc nnan nsz arcp contract <2 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fdiv reassoc nnan nsz arcp contract double ; SHADERTEST-COUNT-2: fdiv reassoc nnan nsz arcp contract double ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpFMod_TestFloat_lit.frag b/llpc/test/shaderdb/core/OpFMod_TestFloat_lit.frag index c36a33db13..2ac8790fc5 100644 --- a/llpc/test/shaderdb/core/OpFMod_TestFloat_lit.frag +++ b/llpc/test/shaderdb/core/OpFMod_TestFloat_lit.frag @@ -14,7 +14,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.fmod.f32(float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fdiv reassoc nnan nsz arcp contract afn float ; SHADERTEST: fmul reassoc nnan nsz arcp contract afn float ; SHADERTEST: call reassoc nnan nsz arcp contract afn float @llvm.floor.f32 diff --git a/llpc/test/shaderdb/core/OpFMod_TestVec4_lit.frag b/llpc/test/shaderdb/core/OpFMod_TestVec4_lit.frag index 1caca87c83..f402abbc66 100644 --- a/llpc/test/shaderdb/core/OpFMod_TestVec4_lit.frag +++ b/llpc/test/shaderdb/core/OpFMod_TestVec4_lit.frag @@ -23,7 +23,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST-COUNT-2: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.fmod.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fdiv reassoc nnan nsz arcp contract afn float ; SHADERTEST: call reassoc nnan nsz arcp contract afn float @llvm.floor.f32 ; SHADERTEST: fsub reassoc nnan nsz arcp contract afn float diff --git a/llpc/test/shaderdb/core/OpFMul_TestMatrix_lit.frag b/llpc/test/shaderdb/core/OpFMul_TestMatrix_lit.frag index bb80fc55b8..ed159a60da 100644 --- a/llpc/test/shaderdb/core/OpFMul_TestMatrix_lit.frag +++ b/llpc/test/shaderdb/core/OpFMul_TestMatrix_lit.frag @@ -17,7 +17,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-3: fmul reassoc nnan nsz arcp contract afn <3 x float> ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFMul_TestVector_lit.frag b/llpc/test/shaderdb/core/OpFMul_TestVector_lit.frag index 1b12372515..ce4bff33ac 100644 --- a/llpc/test/shaderdb/core/OpFMul_TestVector_lit.frag +++ b/llpc/test/shaderdb/core/OpFMul_TestVector_lit.frag @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: fmul reassoc nnan nsz arcp contract afn float ; SHADERTEST: fmul reassoc nnan nsz arcp contract <2 x double> ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpFNegate_TestDvec3_lit.frag b/llpc/test/shaderdb/core/OpFNegate_TestDvec3_lit.frag index 6c3c669ecf..6b3db2decd 100644 --- a/llpc/test/shaderdb/core/OpFNegate_TestDvec3_lit.frag +++ b/llpc/test/shaderdb/core/OpFNegate_TestDvec3_lit.frag @@ -18,7 +18,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: {{fsub|fneg}} reassoc nnan nsz arcp contract <3 x double> {{(, )?}}% -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-3: {{fsub|fneg}} {{(reassoc nnan nsz arcp contract )?}}float ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFNegate_TestVec3_lit.frag b/llpc/test/shaderdb/core/OpFNegate_TestVec3_lit.frag index 6f4b5eb9ec..d7ebf5b227 100644 --- a/llpc/test/shaderdb/core/OpFNegate_TestVec3_lit.frag +++ b/llpc/test/shaderdb/core/OpFNegate_TestVec3_lit.frag @@ -18,7 +18,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: {{fsub|fneg}} reassoc nnan nsz arcp contract afn <3 x float> {{(, )?}}% -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-3: {{fsub|fneg}} reassoc nnan nsz arcp contract afn float {{(-0.000000e\+00, )?}}% ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFOrdGreaterThanEqual_TestVec3_lit.frag b/llpc/test/shaderdb/core/OpFOrdGreaterThanEqual_TestVec3_lit.frag index 2c2ac8295e..c3e1a8f048 100644 --- a/llpc/test/shaderdb/core/OpFOrdGreaterThanEqual_TestVec3_lit.frag +++ b/llpc/test/shaderdb/core/OpFOrdGreaterThanEqual_TestVec3_lit.frag @@ -17,10 +17,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <3 x float>, ; SHADERTEST: fcmp oge float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fcmp oge float ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFOrdGreaterThan_TestVec3_lit.frag b/llpc/test/shaderdb/core/OpFOrdGreaterThan_TestVec3_lit.frag index 3bc4cf4fe9..a771ee73a2 100644 --- a/llpc/test/shaderdb/core/OpFOrdGreaterThan_TestVec3_lit.frag +++ b/llpc/test/shaderdb/core/OpFOrdGreaterThan_TestVec3_lit.frag @@ -17,10 +17,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <3 x float>, ; SHADERTEST: fcmp ogt float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fcmp ogt float ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFOrdLessThanEqual_TestVec3_lit.frag b/llpc/test/shaderdb/core/OpFOrdLessThanEqual_TestVec3_lit.frag index d623935844..ce9e717a45 100644 --- a/llpc/test/shaderdb/core/OpFOrdLessThanEqual_TestVec3_lit.frag +++ b/llpc/test/shaderdb/core/OpFOrdLessThanEqual_TestVec3_lit.frag @@ -17,10 +17,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <3 x float>, ; SHADERTEST: fcmp ole float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fcmp ole float ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFOrdLessThan_TestVec3_lit.frag b/llpc/test/shaderdb/core/OpFOrdLessThan_TestVec3_lit.frag index f918acec0e..b22781b53c 100644 --- a/llpc/test/shaderdb/core/OpFOrdLessThan_TestVec3_lit.frag +++ b/llpc/test/shaderdb/core/OpFOrdLessThan_TestVec3_lit.frag @@ -17,10 +17,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <3 x float>, ; SHADERTEST: fcmp olt float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fcmp olt float ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpFSub_TestMatrix_lit.frag b/llpc/test/shaderdb/core/OpFSub_TestMatrix_lit.frag index b59555ac1e..68bba4b8ea 100644 --- a/llpc/test/shaderdb/core/OpFSub_TestMatrix_lit.frag +++ b/llpc/test/shaderdb/core/OpFSub_TestMatrix_lit.frag @@ -20,10 +20,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-2: fsub reassoc nnan nsz arcp contract afn <2 x float> ; SHADERTEST-COUNT-2: fsub reassoc nnan nsz arcp contract <4 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-4: fsub reassoc nnan nsz arcp contract afn float ; SHADERTEST-COUNT-8: fsub reassoc nnan nsz arcp contract double ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpFSub_TestVector_lit.frag b/llpc/test/shaderdb/core/OpFSub_TestVector_lit.frag index 0ef6a63034..630588040f 100644 --- a/llpc/test/shaderdb/core/OpFSub_TestVector_lit.frag +++ b/llpc/test/shaderdb/core/OpFSub_TestVector_lit.frag @@ -20,10 +20,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-1: fsub reassoc nnan nsz arcp contract afn float ; SHADERTEST-COUNT-1: fsub reassoc nnan nsz arcp contract <2 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-1: fsub reassoc nnan nsz arcp contract afn float ; SHADERTEST-COUNT-2: fsub reassoc nnan nsz arcp contract double ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpIAddCarry_TestInt_lit.frag b/llpc/test/shaderdb/core/OpIAddCarry_TestInt_lit.frag index 77216cbd9c..c866586ec0 100644 --- a/llpc/test/shaderdb/core/OpIAddCarry_TestInt_lit.frag +++ b/llpc/test/shaderdb/core/OpIAddCarry_TestInt_lit.frag @@ -14,7 +14,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call { i32, i1 } @llvm.uadd.with.overflow.i32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpIAddCarry_TestUvec4_lit.frag b/llpc/test/shaderdb/core/OpIAddCarry_TestUvec4_lit.frag index 13ece57e43..2cca22827e 100644 --- a/llpc/test/shaderdb/core/OpIAddCarry_TestUvec4_lit.frag +++ b/llpc/test/shaderdb/core/OpIAddCarry_TestUvec4_lit.frag @@ -17,7 +17,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 ; SHADERTEST: = call { <4 x i32>, <4 x i1> } @llvm.uadd.with.overflow.v4i32(<4 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: call { <4 x i32>, <4 x i1> } @llvm.uadd.with.overflow.v4i32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpIMul_TestVector_lit.frag b/llpc/test/shaderdb/core/OpIMul_TestVector_lit.frag index 56464cf822..cc2f64bc08 100644 --- a/llpc/test/shaderdb/core/OpIMul_TestVector_lit.frag +++ b/llpc/test/shaderdb/core/OpIMul_TestVector_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = mul <3 x i32> %{{[0-9]*}}, %{{[0-9]*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: mul i32 %{{.*}}, %{{.*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpINotEqual_TestSignMatch_lit.vert b/llpc/test/shaderdb/core/OpINotEqual_TestSignMatch_lit.vert index 4a1221fb49..b14cbc02af 100644 --- a/llpc/test/shaderdb/core/OpINotEqual_TestSignMatch_lit.vert +++ b/llpc/test/shaderdb/core/OpINotEqual_TestSignMatch_lit.vert @@ -31,7 +31,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = icmp ne i32 %{{[0-9]*}}, 0 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: icmp ne i32 %{{[0-9]*}}, 0 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpINotEqual_TestSignedUnsigned_lit.frag b/llpc/test/shaderdb/core/OpINotEqual_TestSignedUnsigned_lit.frag index a80ce3a87c..9f3f88c4b2 100644 --- a/llpc/test/shaderdb/core/OpINotEqual_TestSignedUnsigned_lit.frag +++ b/llpc/test/shaderdb/core/OpINotEqual_TestSignedUnsigned_lit.frag @@ -25,7 +25,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = icmp ne i32 %{{[0-9a-zA-Z.]*}}, 0 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: icmp eq i32 %{{[0-9a-zA-Z.]*}}, 0 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpISub_TestVector_lit.frag b/llpc/test/shaderdb/core/OpISub_TestVector_lit.frag index b63de36295..c4803d52c5 100644 --- a/llpc/test/shaderdb/core/OpISub_TestVector_lit.frag +++ b/llpc/test/shaderdb/core/OpISub_TestVector_lit.frag @@ -23,7 +23,7 @@ void main() ; SHADERTEST: %{{[0-9]*}} = sub <3 x i32> %{{[0-9]*}}, %{{[0-9]*}} ; SHADERTEST: %{{[0-9]*}} = sub <2 x i32> %{{[0-9]*}}, %{{[0-9]*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: sub i32 %{{.*}}, %{{.*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpImageDrefGather_TestBasic_lit.frag b/llpc/test/shaderdb/core/OpImageDrefGather_TestBasic_lit.frag index 1d3b341562..34ac487b94 100644 --- a/llpc/test/shaderdb/core/OpImageDrefGather_TestBasic_lit.frag +++ b/llpc/test/shaderdb/core/OpImageDrefGather_TestBasic_lit.frag @@ -14,12 +14,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: [[IMAGEPTR:%[0-9A-Za-z_.-]+]] = call {{.*}} @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: [[SAMPLERPTR:%[0-9A-Za-z_.-]+]] = call {{.*}} @lgc.create.get.desc.ptr.p4{{.*}}(i32 2, i32 2, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> {{.*}}@lgc.create.image.gather.v4f32(i32 1, i32 512, ptr addrspace(4) [[IMAGEPTR]], ptr addrspace(4) [[SAMPLERPTR]],{{.*}},{{.*}} float 2.000000e+00 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, float 2.000000e+00, ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageDrefGather_TestOffset_lit.frag b/llpc/test/shaderdb/core/OpImageDrefGather_TestOffset_lit.frag index e3908d4b12..9c4515b3b5 100644 --- a/llpc/test/shaderdb/core/OpImageDrefGather_TestOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageDrefGather_TestOffset_lit.frag @@ -15,12 +15,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> {{.*}}@lgc.create.image.gather.v4f32(i32 1, i32 512,{{.*}} float 2.000000e+00 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1,{{.*}}, float 2.000000e+00,{{.*}},{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffset_lit.frag b/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffset_lit.frag index d49ced5b53..d925133101 100644 --- a/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffset_lit.frag @@ -24,14 +24,14 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 0) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 1, i32 512, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 5, i32 896, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 9, i32 512, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 257, float 0x3FECCCCCC0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2darray.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, diff --git a/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffsets_lit.frag b/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffsets_lit.frag index dcb6ba8e97..82277f135d 100644 --- a/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffsets_lit.frag +++ b/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGatherOffsets_lit.frag @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 2, i32 2, i64 0, i32 1) @@ -37,7 +37,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 5, i32 896, {{.*}}, i32 801, <3 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, float 0.000000e+00, [4 x <2 x i32>] [<2 x i32> {{(splat \(i32 1\))|()}}, <2 x i32> {{(splat \(i32 2\))|()}}, <2 x i32> {{(splat \(i32 3\))|()}}, <2 x i32> {{(splat \(i32 4\))|()}}], float 0x3FE99999A0000000) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 9, i32 512, {{.*}}, i32 801, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, float 0.000000e+00, [4 x <2 x i32>] [<2 x i32> {{(splat \(i32 1\))|()}}, <2 x i32> {{(splat \(i32 2\))|()}}, <2 x i32> {{(splat \(i32 3\))|()}}, <2 x i32> {{(splat \(i32 4\))|()}}], float 0x3FE6666660000000) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 257, float 0x3FECCCCCC0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 514, float 0x3FECCCCCC0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 771, float 0x3FECCCCCC0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGather_lit.frag b/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGather_lit.frag index fffba1c055..91f57630d3 100644 --- a/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGather_lit.frag +++ b/llpc/test/shaderdb/core/OpImageDrefGather_TestTextureGather_lit.frag @@ -24,7 +24,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 2, i32 2, i64 0, i32 1) @@ -36,7 +36,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 5, i32 896, {{.*}}, i32 545, <3 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, float 0.000000e+00, float 0x3FE99999A0000000) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 9, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 545, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, float 0.000000e+00, float 0x3FE6666660000000) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, float 0x3FECCCCCC0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.2darray.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, float 0x3FE99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0.000000e+00, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, float 0x3FE6666660000000, half 0xH3C00, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 true, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageExplicitLod_TestDrefLodOffset_lit.frag b/llpc/test/shaderdb/core/OpImageExplicitLod_TestDrefLodOffset_lit.frag index da9aa00d59..d2f95e932c 100644 --- a/llpc/test/shaderdb/core/OpImageExplicitLod_TestDrefLodOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageExplicitLod_TestDrefLodOffset_lit.frag @@ -14,12 +14,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.image.sample.f32(i32 1, i32 512, ptr addrspace(4){{.*}}, i32 801,{{.*}}, float 1.000000e+00, <2 x i32> , -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} float @llvm.amdgcn.image.sample.c.l.o.2d.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 770,{{.*}},{{.*}},{{.*}}, float 1.000000e+00,{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_disableShadowTable_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_disableShadowTable_lit.frag index 1fe0e6b137..46e7bbd0f0 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_disableShadowTable_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_disableShadowTable_lit.frag @@ -7,7 +7,7 @@ // SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 5, i32 5, i64 0, i32 0 // SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.with.fmask.v4f32(i32 7, i32 1536, {{.*}}, i32 2) -// SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results // "i32 2" is provided sample number // SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i32{{(\.v8i32)?}}(i32 15, {{.*}}, {{.*}}, {{.*}}, i32 2, <8 x i32> %{{[0-9]*}}, i32 0, i32 0) // SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_lit.frag index f6a572d3a5..59291a5b9c 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_Test2DMSArray_lit.frag @@ -15,7 +15,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results call { <8 x i32> addrspace(4)*, i32 } (...) @"lgc.create.get.image.desc.ptr.s[p4v8i32,i32]"(i32 0, i32 0) @@ -23,7 +23,7 @@ call { <8 x i32> addrspace(4)*, i32 } (...) @"lgc.create.get.fmask.desc.ptr.s[p4 call { <4 x i32> addrspace(4)*, i32 } (...) @"lgc.create.get.sampler.desc.ptr.s[p4v4i32,i32]"(i32 0, i32 0) call <4 x float> (...) @lgc.create.image.load.with.fmask.v4f32(i32 7, i32 0,{{.*}}, i32 2) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results call i32 @llvm.amdgcn.image.load.3d.i32.i32{{(\.v8i32)?}}(i32 1,{{.*}}, i32 0, i32 0) call <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i32{{(\.v8i32)?}}(i32 15, i32 {{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpImageFetch_Test2DMS_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_Test2DMS_lit.frag index 57cf432198..9434a06b43 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_Test2DMS_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_Test2DMS_lit.frag @@ -15,12 +15,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 5, i32 5, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.with.fmask.v4f32(i32 6, i32 1536, {{.*}}, i32 2) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32{{(\.v8i32)?}}(i32 15,{{.*}},{{.*}},{{.*}},{{.*}}, i32 0, i32 0), !invariant.load ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageFetch_TestBasic_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_TestBasic_lit.frag index b2cc628704..5b8c8d85f9 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_TestBasic_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_TestBasic_lit.frag @@ -15,11 +15,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 1536, {{.*}}, i32 2) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i32{{(\.v8i32)?}}(i32 15,{{.*}},{{.*}}, i32 2,{{.*}}, i32 0, i32 0), !invariant.load ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageFetch_TestBuffer_lit.comp b/llpc/test/shaderdb/core/OpImageFetch_TestBuffer_lit.comp index b8dd37df79..38e7e6b2d0 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_TestBuffer_lit.comp +++ b/llpc/test/shaderdb/core/OpImageFetch_TestBuffer_lit.comp @@ -17,11 +17,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 4, i32 4, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 10, i32 1536, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 3) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.struct.buffer.load.format.v4f32{{(\.v4i32)?}}({{.*}}, i32 3, i32 0, i32 0, i32 0), !invariant.load ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageFetch_TestDynamicOffset.spvasm b/llpc/test/shaderdb/core/OpImageFetch_TestDynamicOffset.spvasm index 9e1e377f78..99ef2d9f29 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_TestDynamicOffset.spvasm +++ b/llpc/test/shaderdb/core/OpImageFetch_TestDynamicOffset.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: define dllexport spir_func void @main() {{.*}} ; SHADERTEST: [[LABEL:[0-9]*]]: {{.*}} ; SHADERTEST: {{.*}}@lgc.create.image.load.v4f32{{.*}} diff --git a/llpc/test/shaderdb/core/OpImageFetch_TestIntegerSampler_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_TestIntegerSampler_lit.frag index 216a42493f..e57be3f6c1 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_TestIntegerSampler_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_TestIntegerSampler_lit.frag @@ -15,13 +15,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 1, i32 1540, {{.*}}, <2 x i32> , i32 0) ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 1, i32 1536, {{.*}}, <2 x i32> , i32 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.image.load.2d.v4i32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} ; SHADERTEST: call <4 x i32> @llvm.amdgcn.image.load.2d.v4i32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpImageFetch_TestOffset_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_TestOffset_lit.frag index c7e2ce52ea..985682db5c 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_TestOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_TestOffset_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST-LABEL: {{^// GLSL}} program compile/link log ; SHADERTEST: {{.*}} OpImageFetch {{.*}} Lod|ConstOffset {{.*}} ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 1536, {{.*}}, i32 2) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i32{{(\.v8i32)?}}(i32 15,{{.*}},{{.*}}, i32 2,{{.*}}, i32 0, i32 0), !invariant.load ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetchOffset_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetchOffset_lit.frag index ef5d358b95..dfc0fcfa44 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetchOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetchOffset_lit.frag @@ -36,7 +36,7 @@ void main() ; SHADERTEST: {{.*}} OpImageFetch {{.*}} Lod|ConstOffset {{.*}} ; SHADERTEST: {{.*}} OpImageFetch {{.*}} Lod|ConstOffset {{.*}} ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 2, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 3 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 2 @@ -50,7 +50,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 4, i32 1536, {{.*}}, <2 x i32> , i32 6) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 5, i32 1664, {{.*}}, <3 x i32> , i32 2) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 6, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 12, i16 12, i16 6, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 4, i16 4, i16 4, i16 2, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} diff --git a/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetch_lit.frag b/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetch_lit.frag index 95039c2e91..3438c67300 100644 --- a/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetch_lit.frag +++ b/llpc/test/shaderdb/core/OpImageFetch_TestTexelFetch_lit.frag @@ -27,7 +27,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 3 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 4, i32 4, i64 0, i32 2 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1 @@ -39,7 +39,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 10, i32 1536, {{.*}}, i32 5) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.with.fmask.v4f32(i32 6, i32 1664, {{.*}}, {{.*}}, <2 x i32> {{(splat \(i32 6\))|()}}, i32 4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 2, i16 2, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 7, i16 7, i16 8, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} diff --git a/llpc/test/shaderdb/core/OpImageGather_TestBasic_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestBasic_lit.frag index 7bffbcffb6..9cfe98a82f 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestBasic_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestBasic_lit.frag @@ -14,12 +14,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 1, i32 512, {{.*}}, i32 37, {{.*}}, i32 1, float 0.000000e+00) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 2,{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageGather_TestConstOffsets_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestConstOffsets_lit.frag index 98b0ae7c65..7444ae08f0 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestConstOffsets_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestConstOffsets_lit.frag @@ -15,12 +15,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 1, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <2 x {{.*}}, i32 2, float 0.000000e+00, [4 x <2 x i32>] [<2 x i32> , <2 x i32> , <2 x i32> , <2 x i32> ]) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4, i32 513,{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4, i32 1027,{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4, i32 1541,{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageGather_TestDrefConstOffsets_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestDrefConstOffsets_lit.frag index 07fbf87ca1..ad72a06b4e 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestDrefConstOffsets_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestDrefConstOffsets_lit.frag @@ -15,12 +15,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 1, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 801, <2 x {{.*}}, float 0.000000e+00, [4 x <2 x i32>] [<2 x i32> , <2 x i32> , <2 x i32> , <2 x i32> ], float 1.000000e+00) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 513, float 1.000000e+00,{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 1027, float 1.000000e+00,{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.c.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 1541, float 1.000000e+00,{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageGather_TestIntegerSampler.frag b/llpc/test/shaderdb/core/OpImageGather_TestIntegerSampler.frag index cfa4de744c..f315e2a71a 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestIntegerSampler.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestIntegerSampler.frag @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 1 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 @@ -32,7 +32,7 @@ void main() ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.gather.v4i32(i32 1, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <2 x float> , i32 0, float 0.000000e+00, <2 x i32> ) ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.gather.v4i32(i32 1, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <2 x float> , i32 0, float 0.000000e+00, [4 x <2 x i32>] [<2 x i32> {{(splat \(i32 1\))|()}}, <2 x i32> {{(splat \(i32 2\))|()}}, <2 x i32> {{(splat \(i32 3\))|()}}, <2 x i32> {{(splat \(i32 4\))|()}}]) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x float> @llvm.amdgcn.image.gather4.lz.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, half 0xH0000, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 513, half 0xH0000, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 257, half 0xH0000, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageGather_TestOffset_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestOffset_lit.frag index da997e7848..22b7823c65 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestOffset_lit.frag @@ -15,12 +15,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 1, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <2 x {{.*}}, i32 2, float 0.000000e+00, <2 x {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4,{{.*}},{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherBiasLod_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherBiasLod_lit.frag index 33e6f1ea86..6c5195770c 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherBiasLod_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherBiasLod_lit.frag @@ -52,7 +52,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 3 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 2, i32 2, i64 0, i32 3 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 2 @@ -78,7 +78,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 1, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <2 x {{.*}}, i32 0, {{.*}}, [4 x <2 x i32>] [<2 x i32> zeroinitializer, <2 x i32> , <2 x i32> , <2 x i32> {{(splat \(i32 1\))|()}}]) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 5, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <3 x {{.*}}, i32 1, {{.*}}, [4 x <2 x i32>] [<2 x i32> zeroinitializer, <2 x i32> , <2 x i32> , <2 x i32> {{(splat \(i32 1\))|()}}]) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.b.2d.v4f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1,{{.*}},{{.*}},{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.b.2darray.v4f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 2,{{.*}},{{.*}},{{.*}},{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.b.cube.v4f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4,{{.*}},{{.*}},{{.*}},{{.*}},{{.*}},{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffset_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffset_lit.frag index 7ae73d63cb..b91a663591 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffset_lit.frag @@ -24,7 +24,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 2, i32 2, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 1, i32 0) @@ -35,7 +35,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 5, i32 896, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <3 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, i32 3, float 0.000000e+00, <2 x {{.*}}) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 9, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 293, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, i32 0, float 0.000000e+00, <2 x i32> {{(splat \(i32 1\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4,{{.*}}, float 0x3FB99999A0000000, float 0x3FB99999A0000000,{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2darray.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 8,{{.*}}, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0.000000e+00,{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, i32 257, half 0xH3C00, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 true, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffsets_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffsets_lit.frag index a042e92e14..4f7b9a7905 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffsets_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestTextureGatherOffsets_lit.frag @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 2, i32 2, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 1, i32 0) @@ -36,7 +36,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 5, i32 896, {{.*}}, {{.*}}, i32 293, <3 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, i32 3, float 0.000000e+00, [4 x <2 x i32>] [<2 x i32> {{(splat \(i32 1\))|()}}, <2 x i32> {{(splat \(i32 2\))|()}}, <2 x i32> {{(splat \(i32 3\))|()}}, <2 x i32> {{(splat \(i32 4\))|()}}]) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 9, i32 512, {{.*}}, {{.*}}, i32 293, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, i32 0, float 0.000000e+00, [4 x <2 x i32>] [<2 x i32> {{(splat \(i32 1\))|()}}, <2 x i32> {{(splat \(i32 2\))|()}}, <2 x i32> {{(splat \(i32 3\))|()}}, <2 x i32> {{(splat \(i32 4\))|()}}]) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4, i32 257, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4, i32 514, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4, i32 771, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageGather_TestTextureGather_lit.frag b/llpc/test/shaderdb/core/OpImageGather_TestTextureGather_lit.frag index 863c9a18aa..932b8ca145 100644 --- a/llpc/test/shaderdb/core/OpImageGather_TestTextureGather_lit.frag +++ b/llpc/test/shaderdb/core/OpImageGather_TestTextureGather_lit.frag @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 2, i32 2, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 1, i32 0) @@ -34,7 +34,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 5, i32 896, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 37, <3 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, i32 3, float 0.000000e+00) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.gather.v4f32(i32 9, i32 512, ptr addrspace(4) {{.*}}, ptr addrspace(4) {{.*}}, i32 37, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, i32 0, float 0.000000e+00) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 4, float 0x3FB99999A0000000, float 0x3FB99999A0000000, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.2darray.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 8, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0.000000e+00, <8 x i32> %{{[-0-9A-Za0z_.]+}}, <4 x i32> %{{[-0-9A-Za0z_.]+}}, i1 false, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.gather4.lz.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, half 0xH3C00, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 true, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageQueryLevels_TestBasic_lit.comp b/llpc/test/shaderdb/core/OpImageQueryLevels_TestBasic_lit.comp index 04e5e0500b..87c1ed9c59 100644 --- a/llpc/test/shaderdb/core/OpImageQueryLevels_TestBasic_lit.comp +++ b/llpc/test/shaderdb/core/OpImageQueryLevels_TestBasic_lit.comp @@ -46,7 +46,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 12 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 11 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 10 @@ -75,7 +75,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.image.query.levels.i32(i32 5, i32 512, {{.*}}) ; SHADERTEST: call i32 (...) @lgc.create.image.query.levels.i32(i32 8, i32 512, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQueryLevels_TestTextureQueryLevels_lit.frag b/llpc/test/shaderdb/core/OpImageQueryLevels_TestTextureQueryLevels_lit.frag index e16c00fa22..293eb2c58e 100644 --- a/llpc/test/shaderdb/core/OpImageQueryLevels_TestTextureQueryLevels_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQueryLevels_TestTextureQueryLevels_lit.frag @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 2, i32 0) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 1, i32 0) @@ -35,7 +35,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.image.query.levels.i32(i32 1, i32 512, ptr addrspace(4) {{.*}}) ; SHADERTEST: call i32 (...) @lgc.create.image.query.levels.i32(i32 8, i32 640, ptr addrspace(4) {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQueryLod_TestBasic_lit.frag b/llpc/test/shaderdb/core/OpImageQueryLod_TestBasic_lit.frag index a6b5b231f4..4ad2e5e330 100644 --- a/llpc/test/shaderdb/core/OpImageQueryLod_TestBasic_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQueryLod_TestBasic_lit.frag @@ -45,7 +45,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 12) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 2, i32 2, i64 0, i32 12) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 11) diff --git a/llpc/test/shaderdb/core/OpImageQuerySamples_TestBasic_lit.comp b/llpc/test/shaderdb/core/OpImageQuerySamples_TestBasic_lit.comp index 23cefe845d..764cbfa6c2 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySamples_TestBasic_lit.comp +++ b/llpc/test/shaderdb/core/OpImageQuerySamples_TestBasic_lit.comp @@ -22,13 +22,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: ptr addrspace(4) (...) @lgc.create.get.desc.ptr.p4{{.*}}(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call i32 (...) @lgc.create.image.query.samples.i32(i32 6, i32 512, ; SHADERTEST: call i32 (...) @lgc.create.image.query.samples.i32(i32 7, i32 512, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySamples_TestImageSamples_lit.frag b/llpc/test/shaderdb/core/OpImageQuerySamples_TestImageSamples_lit.frag index e9b0ea3f21..754baea4a5 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySamples_TestImageSamples_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQuerySamples_TestImageSamples_lit.frag @@ -21,13 +21,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.query.samples.i32(i32 6, i32 512, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.query.samples.i32(i32 7, i32 640, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySamples_TestTextureSamples_lit.frag b/llpc/test/shaderdb/core/OpImageQuerySamples_TestTextureSamples_lit.frag index 92284a7c9a..72bc182b56 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySamples_TestTextureSamples_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQuerySamples_TestTextureSamples_lit.frag @@ -21,13 +21,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.query.samples.i32(i32 6, i32 512, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.query.samples.i32(i32 7, i32 640, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySizeLod_TestTextureSize_lit.frag b/llpc/test/shaderdb/core/OpImageQuerySizeLod_TestTextureSize_lit.frag index 22043ede5c..6a1d7cfaa5 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySizeLod_TestTextureSize_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQuerySizeLod_TestTextureSize_lit.frag @@ -22,7 +22,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 5) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 4) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) @@ -30,7 +30,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v2i32(i32 1, i32 512, {{.*}}, i32 4) ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v3i32(i32 2, i32 512, {{.*}}, i32 5) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySize_TestBasic_lit.frag b/llpc/test/shaderdb/core/OpImageQuerySize_TestBasic_lit.frag index 45ed00b62b..9bd663e3e7 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySize_TestBasic_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQuerySize_TestBasic_lit.frag @@ -77,7 +77,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 17) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 16) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 12) @@ -110,7 +110,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v2i32(i32 6, i32 512, {{.*}}, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v3i32(i32 7, i32 512, {{.*}}, i32 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySize_TestImageSize_lit.frag b/llpc/test/shaderdb/core/OpImageQuerySize_TestImageSize_lit.frag index f04b11590a..f432d1412c 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySize_TestImageSize_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQuerySize_TestImageSize_lit.frag @@ -28,7 +28,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 2, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) @@ -39,7 +39,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.i32(i32 10, i32 640, {{.*}}, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v3i32(i32 8, i32 640, {{.*}}, i32 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySize_TestImage_lit.comp b/llpc/test/shaderdb/core/OpImageQuerySize_TestImage_lit.comp index aaa04cdc47..3eeca230f6 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySize_TestImage_lit.comp +++ b/llpc/test/shaderdb/core/OpImageQuerySize_TestImage_lit.comp @@ -39,7 +39,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 9) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 8) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 7) @@ -62,7 +62,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v3i32(i32 7, i32 512, {{.*}}, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.i32(i32 10, i32 512, {{.*}}, i32 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySize_TestSeparated_lit.frag b/llpc/test/shaderdb/core/OpImageQuerySize_TestSeparated_lit.frag index 56ec74b0e4..4de1875c43 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySize_TestSeparated_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQuerySize_TestSeparated_lit.frag @@ -14,11 +14,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v2i32(i32 1, i32 512, {{.*}}, i32 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageQuerySize_TestTextureSize_lit.frag b/llpc/test/shaderdb/core/OpImageQuerySize_TestTextureSize_lit.frag index b193bade07..79b48b94c9 100644 --- a/llpc/test/shaderdb/core/OpImageQuerySize_TestTextureSize_lit.frag +++ b/llpc/test/shaderdb/core/OpImageQuerySize_TestTextureSize_lit.frag @@ -24,7 +24,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 2, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) @@ -33,7 +33,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v2i32(i32 6, i32 512, {{.*}}, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.query.size.v3i32(i32 7, i32 640, {{.*}}, i32 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpImageReadWrite_TestImageLoadStoreLod_lit.comp b/llpc/test/shaderdb/core/OpImageReadWrite_TestImageLoadStoreLod_lit.comp index 9344c70ec6..fbab5cb383 100644 --- a/llpc/test/shaderdb/core/OpImageReadWrite_TestImageLoadStoreLod_lit.comp +++ b/llpc/test/shaderdb/core/OpImageReadWrite_TestImageLoadStoreLod_lit.comp @@ -33,7 +33,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 6) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 5) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 4) @@ -56,7 +56,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.store({{.*}}, i32 5, i32 516, {{.*}}, <3 x i32> {{(splat \(i32 9\))|()}}, i32 7) ; SHADERTEST: call {{.*}} @lgc.create.image.store({{.*}}, i32 8, i32 516, {{.*}}, <4 x i32> , i32 7) -; SHADERTEST-LABEL: LLPC pipeline patching results +; SHADERTEST-LABEL: LLPC LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.load.mip.1d.i32.i16{{(\.v8i32)?}}(i32 1, i16 9, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.load.mip.2d.i32.i16{{(\.v8i32)?}}(i32 1, i16 9, i16 9, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.image.load.mip.3d.i32.i16{{(\.v8i32)?}}(i32 1, i16 9, i16 9, i16 9, i16 7, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageRead_Test2DMS_lit.comp b/llpc/test/shaderdb/core/OpImageRead_Test2DMS_lit.comp index f9cd98d668..9761b9dd39 100644 --- a/llpc/test/shaderdb/core/OpImageRead_Test2DMS_lit.comp +++ b/llpc/test/shaderdb/core/OpImageRead_Test2DMS_lit.comp @@ -19,13 +19,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 6, i32 512, {{.*}}, <3 x i32> ) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 7, i32 512, {{.*}}, <4 x i32> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 0, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 0, i16 0, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpImageRead_TestBasic_lit.comp b/llpc/test/shaderdb/core/OpImageRead_TestBasic_lit.comp index 73583ae900..03f14c1279 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestBasic_lit.comp +++ b/llpc/test/shaderdb/core/OpImageRead_TestBasic_lit.comp @@ -26,7 +26,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 5) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 4) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 3) @@ -40,7 +40,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 5, i32 512, {{.*}}, <3 x i32> zeroinitializer) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 9, i32 512, {{.*}}, <2 x i32> zeroinitializer) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 0, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 0, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 0, i16 0, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageRead_TestBuffer_lit.comp b/llpc/test/shaderdb/core/OpImageRead_TestBuffer_lit.comp index d3347f0928..4f5322bb66 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestBuffer_lit.comp +++ b/llpc/test/shaderdb/core/OpImageRead_TestBuffer_lit.comp @@ -17,11 +17,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 4, i32 4, i64 0, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 10, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 3) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.struct.buffer.load.format.v4f32{{(\.v4i32)?}}({{.*}}, i32 3, i32 0, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageRead_TestCube_lit.comp b/llpc/test/shaderdb/core/OpImageRead_TestCube_lit.comp index 324270fd4d..a490dde6aa 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestCube_lit.comp +++ b/llpc/test/shaderdb/core/OpImageRead_TestCube_lit.comp @@ -19,13 +19,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 3, i32 512, {{.*}}, <3 x i32> ) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 8, i32 512, {{.*}}, <4 x i32> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 0, i16 6, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageRead_TestImageLoad_lit.frag b/llpc/test/shaderdb/core/OpImageRead_TestImageLoad_lit.frag index d924b3aec8..448ef172f4 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestImageLoad_lit.frag +++ b/llpc/test/shaderdb/core/OpImageRead_TestImageLoad_lit.frag @@ -28,7 +28,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 2, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) @@ -39,7 +39,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 8, i32 640, {{.*}}, <4 x i32> ) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4f32(i32 6, i32 512, {{.*}}, <3 x i32> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 2, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.struct.buffer.load.format.v4f32{{(\.v4i32)?}}({{.*}}, i32 4, i32 0, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageRead_TestInt64ImageLoad.spvasm b/llpc/test/shaderdb/core/OpImageRead_TestInt64ImageLoad.spvasm index 68ed3ebcbd..2efca42088 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestInt64ImageLoad.spvasm +++ b/llpc/test/shaderdb/core/OpImageRead_TestInt64ImageLoad.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <4 x i64> (...) @lgc.create.image.load.v4i64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <2 x i32> @llvm.amdgcn.image.load.2d.v2i32.i16{{(\.v8i32)?}}(i32 3, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpImageRead_TestIntImage_lit.comp b/llpc/test/shaderdb/core/OpImageRead_TestIntImage_lit.comp index 2941d6589f..717cf17342 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestIntImage_lit.comp +++ b/llpc/test/shaderdb/core/OpImageRead_TestIntImage_lit.comp @@ -19,13 +19,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4i32(i32 1, i32 516, {{.*}}, <2 x i32> zeroinitializer) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4i32(i32 1, i32 512, {{.*}}, <2 x i32> zeroinitializer) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.image.load.2d.v4i32.i16{{(\.v8i32)?}}(i32 15, i16 0, i16 0, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/core/OpImageRead_TestMemoryQualifier_lit.comp b/llpc/test/shaderdb/core/OpImageRead_TestMemoryQualifier_lit.comp index 261dc2e394..5962a5688f 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestMemoryQualifier_lit.comp +++ b/llpc/test/shaderdb/core/OpImageRead_TestMemoryQualifier_lit.comp @@ -22,7 +22,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 3 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 2 ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1 @@ -32,7 +32,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 513, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 3\))|()}}) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 515, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, <2 x i32> {{(splat \(i32 4\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 1, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 2, i16 2, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16{{(\.v8i32)?}}(i32 15, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 5) diff --git a/llpc/test/shaderdb/core/OpImageRead_TestNonVec4Data_lit.spvasm b/llpc/test/shaderdb/core/OpImageRead_TestNonVec4Data_lit.spvasm index 298068ef0b..be47ea7b2a 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestNonVec4Data_lit.spvasm +++ b/llpc/test/shaderdb/core/OpImageRead_TestNonVec4Data_lit.spvasm @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) @@ -16,7 +16,7 @@ ; SHADERTEST: call {{.*}} @lgc.create.image.load.v2f32(i32 1, i32 512, {{.*}}, <2 x i32> ) ; SHADERTEST: call {{.*}} @lgc.create.image.load.v3f32(i32 1, i32 512, {{.*}}, <2 x i32> {{(splat \(i32 1\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.load.2d.i32.i16{{(\.v8i32)?}}(i32 1, i16 0, i16 0, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call <2 x i32> @llvm.amdgcn.image.load.2d.v2i32.i16{{(\.v8i32)?}}(i32 3, i16 0, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call <3 x i32> @llvm.amdgcn.image.load.2d.v3i32.i16{{(\.v8i32)?}}(i32 7, i16 1, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageRead_TestSubpassInput_lit.frag b/llpc/test/shaderdb/core/OpImageRead_TestSubpassInput_lit.frag index 8ca49de146..af4a02fb2c 100644 --- a/llpc/test/shaderdb/core/OpImageRead_TestSubpassInput_lit.frag +++ b/llpc/test/shaderdb/core/OpImageRead_TestSubpassInput_lit.frag @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 5) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 4) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 3) @@ -39,7 +39,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.load.v4i32(i32 1, i32 608, {{.*}}, <2 x i32> zeroinitializer) ; SHADERTEST: call {{.*}} @lgc.create.image.load.with.fmask.v4i32(i32 6, i32 608, {{.*}}, {{.*}}, <2 x i32> zeroinitializer, i32 7) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32{{(\.v8i32)?}}(i32 15,{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32{{(\.v8i32)?}}(i32 15, {{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32{{(\.v8i32)?}}(i32 15,{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestLod_lit.frag b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestLod_lit.frag index 7616342fc0..9ccf75d269 100644 --- a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestLod_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestLod_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 33, <2 x float> zeroinitializer, float 1.000000e+00) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 33, <2 x float> zeroinitializer, float 1.000000e+00) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.l.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH0000, half 0xH0000, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradClamp_lit.frag b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradClamp_lit.frag index c303738876..bc23efad6f 100644 --- a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradClamp_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradClamp_lit.frag @@ -44,7 +44,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 409, <2 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 0x3FF19999A0000000\))|()}}, {{.*}}, <2 x i32> {{(splat \(i32 2\))|()}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 2, i32 512, {{.*}}, {{.*}}, i32 409, <3 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, <3 x float> {{(splat \(float 0x3FF3333340000000\))|()}}, <3 x float> {{(splat \(float 0x3FF4CCCCC0000000\))|()}}, {{.*}}, <3 x i32> {{(splat \(i32 3\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 1, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 153, <2 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 0x3FF19999A0000000\))|()}}, {{.*}}) @@ -52,7 +52,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 409, <2 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 0x3FF19999A0000000\))|()}}, {{.*}}, <2 x i32> {{(splat \(i32 2\))|()}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 2, i32 512, {{.*}}, {{.*}}, i32 409, <3 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, <3 x float> {{(splat \(float 0x3FF3333340000000\))|()}}, <3 x float> {{(splat \(float 0x3FF4CCCCC0000000\))|()}}, {{.*}}, <3 x i32> {{(splat \(i32 3\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call <8 x i32> @llvm.amdgcn.readfirstlane.v8i32 diff --git a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradOffset_lit.frag b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradOffset_lit.frag index e8cce64d41..ffdbfffbc6 100644 --- a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGradOffset_lit.frag @@ -28,13 +28,13 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 281, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 281, <2 x float> {{(splat \(float 4\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 5\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 6\.000000e\+00\))|()}}, <2 x i32> {{(splat \(i32 3\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 1, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 281, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 281, <2 x float> {{(splat \(float 4\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 5\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 6\.000000e\+00\))|()}}, <2 x i32> {{(splat \(i32 3\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.d.o.1d.v4f32.f16.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, i32 2, half 0xH4000, half 0xH4200, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGrad_lit.frag b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGrad_lit.frag index b9f26fa406..b0e9488797 100644 --- a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGrad_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureGrad_lit.frag @@ -28,13 +28,13 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 25, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 25, <2 x float> {{(splat \(float 4\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 5\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 6\.000000e\+00\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 1, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 25, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 25, <2 x float> {{(splat \(float 4\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 5\.000000e\+00\))|()}}, <2 x float> {{(splat \(float 6\.000000e\+00\))|()}}) -; SHADERTEST-LABEL: pipeline patching results +; SHADERTEST-LABEL: LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.d.1d.v4f32.f16.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH4000, half 0xH4200, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLodOffset_lit.frag b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLodOffset_lit.frag index 1b1a4c3cb6..f083f6d9b4 100644 --- a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLodOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLodOffset_lit.frag @@ -28,13 +28,13 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 289, float 5.000000e-01, float 0x3FD99999A0000000, i32 6) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 289, <2 x float> {{(splat \(float 0x3FE3333340000000\))|()}}, float 0x3FE6666660000000, <2 x i32> {{(splat \(i32 5\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 1, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 289, float 5.000000e-01, float 0x3FD99999A0000000, i32 6) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 289, <2 x float> {{(splat \(float 0x3FE3333340000000\))|()}}, float 0x3FE6666660000000, <2 x i32> {{(splat \(i32 5\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.l.o.1d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, i32 6, float 5.000000e-01, float 0x3FD99999A0000000, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLod_lit.frag b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLod_lit.frag index 1f96388f2b..015e7eb7bd 100644 --- a/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLod_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleExplicitLod_TestTextureLod_lit.frag @@ -28,13 +28,13 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 33, float 5.000000e-01, float 0x3FD99999A0000000) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 33, <2 x float> {{(splat \(float 0x3FE3333340000000\))|()}}, float 0x3FE6666660000000) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 1, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 33, float 5.000000e-01, float 0x3FD99999A0000000) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 33, <2 x float> {{(splat \(float 0x3FE3333340000000\))|()}}, float 0x3FE6666660000000) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.l.1d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, float 5.000000e-01, float 0x3FD99999A0000000, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1DArray_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1DArray_lit.frag index fc94b68322..538418b267 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1DArray_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1DArray_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 4, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 4, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.1darray.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH3C00, half 0xH4000, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1D_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1D_lit.frag index 37c1351bbd..41b69c1245 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1D_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test1D_lit.frag @@ -18,11 +18,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32 diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DArray_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DArray_lit.frag index cdd1238b7a..8709161a1d 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DArray_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DArray_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 1, <3 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 1, <3 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.2darray.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH3C00, half 0xH4000, half 0xH4200, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DRect_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DRect_lit.frag index 72ea603217..bf1cc61620 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DRect_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test2DRect_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 9, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 9, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH3C00, half 0xH4000, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 true, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test3D_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test3D_lit.frag index 2b3e078071..0b9883a12f 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test3D_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_Test3D_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 2, i32 512, {{.*}}, {{.*}}, i32 1, <3 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 2, i32 512, {{.*}}, {{.*}}, i32 1, <3 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.3d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH3C00, half 0xH4000, half 0xH4200, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestArrayDirectAccess_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestArrayDirectAccess_lit.frag index 53ae5327b4..f69bf2b9a7 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestArrayDirectAccess_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestArrayDirectAccess_lit.frag @@ -16,11 +16,11 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH3C00, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBasic_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBasic_lit.frag index 3c7faf3f6b..8c44712d20 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBasic_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBasic_lit.frag @@ -15,11 +15,11 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> zeroinitializer) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> zeroinitializer) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH0000, half 0xH0000, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBias_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBias_lit.frag index f4d6d1ae9a..d7fe77815b 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBias_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestBias_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 65, <2 x float> zeroinitializer, float 1.000000e+00) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 65, <2 x float> zeroinitializer, float 1.000000e+00) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.b.2d.v4f32.f16.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH3C00, half 0xH0000, half 0xH0000, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeArray_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeArray_lit.frag index 8c7c5156c0..f91277b2e2 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeArray_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeArray_lit.frag @@ -18,11 +18,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} float @llvm.amdgcn.cubesc diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeShadow_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeShadow_lit.frag index 361182641a..94fd5ef55c 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeShadow_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCubeShadow_lit.frag @@ -18,11 +18,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.f32(i32 3, i32 512, {{.*}}, {{.*}}, i32 513, {{.*}}, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.f32(i32 3, i32 512, {{.*}}, {{.*}}, i32 513, {{.*}}, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} float @llvm.amdgcn.cubesc diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCube_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCube_lit.frag index 216b5ffc8d..46d59ef723 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCube_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestCube_lit.frag @@ -18,11 +18,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 3, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 3, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} float @llvm.amdgcn.cubesc diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestDrefGrad_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestDrefGrad_lit.frag index 5add544d49..d6346ee4d1 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestDrefGrad_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestDrefGrad_lit.frag @@ -18,11 +18,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 537, {{.*}}, <2 x float> , <2 x float> , {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 537, {{.*}}, <2 x float> , <2 x float> , {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} float @llvm.amdgcn.image.sample.c.d.2d.f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestGrad_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestGrad_lit.frag index 8e306467d5..b13bc823aa 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestGrad_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestGrad_lit.frag @@ -18,11 +18,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 25, {{.*}}, <2 x float> , <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 25, {{.*}}, <2 x float> , <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.d.2d.v4f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestIntegerSampler_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestIntegerSampler_lit.frag index bd10af17bc..16037d1c8d 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestIntegerSampler_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestIntegerSampler_lit.frag @@ -19,13 +19,13 @@ void main() ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.sample.v4i32(i32 1, i32 516, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> ) ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.sample.v4i32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4i32(i32 1, i32 516, {{.*}}, {{.*}}, i32 1, <2 x float> ) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4i32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call <4 x i32> @llvm.amdgcn.image.sample.2d.v4i32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH0000, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestMultiDimArrayDirectAccess_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestMultiDimArrayDirectAccess_lit.frag index 37d4778cf3..39461554f8 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestMultiDimArrayDirectAccess_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestMultiDimArrayDirectAccess_lit.frag @@ -16,11 +16,11 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> {{(splat \(float 1\.000000e\+00\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-LABEL: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST-LABEL: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH3C00, half 0xH3C00, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestOffset_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestOffset_lit.frag index de7aeef368..b0856cc3e4 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestOffset_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 257, {{.*}}, <2 x i32> ) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 257, {{.*}}, <2 x i32> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.o.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, i32 770, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestProjDrefGradOffset_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestProjDrefGradOffset_lit.frag index a91b393efe..229bca5c46 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestProjDrefGradOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestProjDrefGradOffset_lit.frag @@ -17,11 +17,11 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 793, {{.*}}, <2 x float> , <2 x float> , <2 x i32> , {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 793, {{.*}}, <2 x float> , <2 x float> , <2 x i32> , {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} float @llvm.amdgcn.image.sample.c.d.o.2d.f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, i32 770, {{.*}}, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FD99999A0000000, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestSeparate_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestSeparate_lit.frag index 61bcbd5510..e3b9538c69 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestSeparate_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestSeparate_lit.frag @@ -16,11 +16,11 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> zeroinitializer) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, <2 x float> zeroinitializer) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, half 0xH0000, half 0xH0000, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureBiasClamp_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureBiasClamp_lit.frag index 5ae78479d3..65556cc49a 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureBiasClamp_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureBiasClamp_lit.frag @@ -57,7 +57,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 193, <3 x float> %{{[0-9]*}}, float 2.000000e+00, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 193, <4 x float> %{{[0-9]*}}, float 2.000000e+00, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 6, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 5, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 4, i32 0) @@ -73,7 +73,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 193, <3 x float> %{{[0-9]*}}, float 2.000000e+00, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 193, <4 x float> %{{[0-9]*}}, float 2.000000e+00, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call <8 x i32> @llvm.amdgcn.readfirstlane.v8i32 diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureClamp_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureClamp_lit.frag index 85ff1288c2..7244ca2503 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureClamp_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureClamp_lit.frag @@ -57,7 +57,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 129, <3 x float> %{{[0-9]*}}, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 129, <4 x float> %{{[0-9]*}}, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 6, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 5, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 4, i32 0) @@ -73,7 +73,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 129, <3 x float> %{{[0-9]*}}, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 129, <4 x float> %{{[0-9]*}}, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.cl.1d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, float %{{[0-9]*}}, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradClamp_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradClamp_lit.frag index f939a7f1a2..15b8cd5ba5 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradClamp_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradClamp_lit.frag @@ -59,7 +59,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 153, <3 x float> %{{[0-9]*}}, <2 x float> %{{[0-9]*}}, <2 x float> %{{[0-9]*}}, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 153, <4 x float> %{{[0-9]*}}, <3 x float> %{{[0-9]*}}, <3 x float> %{{[0-9]*}}, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 6, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 5, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 4, i32 0) @@ -75,7 +75,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 153, <3 x float> %{{[0-9]*}}, <2 x float> %{{[0-9]*}}, <2 x float> %{{[0-9]*}}, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 8, i32 512, {{.*}}, {{.*}}, i32 153, <4 x float> %{{[0-9]*}}, <3 x float> %{{[0-9]*}}, <3 x float> %{{[0-9]*}}, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call <8 x i32> @llvm.amdgcn.readfirstlane.v8i32 diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradOffsetClamp_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradOffsetClamp_lit.frag index b1c2c186d9..3d1dbdf86b 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradOffsetClamp_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureGradOffsetClamp_lit.frag @@ -48,7 +48,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 4, i32 512, {{.*}}, {{.*}}, i32 409, <2 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, float 0x3FC99999A0000000, float 0x3FD3333340000000, {{.*}}, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 409, <3 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, <2 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, <2 x float> {{(splat \(float 0x3FD3333340000000\))|()}}, {{.*}}, <2 x i32> {{(splat \(i32 2\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 5, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 4, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 2, i32 0) @@ -60,7 +60,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 4, i32 512, {{.*}}, {{.*}}, i32 409, <2 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, float 0x3FC99999A0000000, float 0x3FD3333340000000, {{.*}}, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 409, <3 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, <2 x float> {{(splat \(float 0x3FC99999A0000000\))|()}}, <2 x float> {{(splat \(float 0x3FD3333340000000\))|()}}, {{.*}}, <2 x i32> {{(splat \(i32 2\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{.*}} ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{.*}} ; SHADERTEST: call <8 x i32> @llvm.amdgcn.readfirstlane.v8i32 diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffsetClamp_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffsetClamp_lit.frag index 9b72a6da84..3f6a9dc4af 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffsetClamp_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffsetClamp_lit.frag @@ -48,7 +48,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 4, i32 512, {{.*}}, {{.*}}, i32 385, <2 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, {{.*}}, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 385, <3 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, {{.*}}, <2 x i32> {{(splat \(i32 2\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 5, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 4, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 2, i32 0) @@ -60,7 +60,7 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 4, i32 512, {{.*}}, {{.*}}, i32 385, <2 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, {{.*}}, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 5, i32 512, {{.*}}, {{.*}}, i32 385, <3 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, {{.*}}, <2 x i32> {{(splat \(i32 2\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call <8 x i32> @llvm.amdgcn.readfirstlane.v8i32 diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffset_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffset_lit.frag index 68da7d1e4e..a5f38c1b25 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffset_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTextureOffset_lit.frag @@ -27,13 +27,13 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 321, float 1.000000e+00, float 0x3FD99999A0000000, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 257, <2 x float> {{(splat \(float 5\.000000e\-01\))|()}}, <2 x i32> {{(splat \(i32 5\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 1, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 321, float 1.000000e+00, float 0x3FD99999A0000000, i32 2) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 257, <2 x float> {{(splat \(float 5\.000000e\-01\))|()}}, <2 x i32> {{(splat \(i32 5\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.b.o.1d.v4f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, i32 2, float 0x3FD99999A0000000, float 1.000000e+00, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTexture_lit.frag b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTexture_lit.frag index 4289ed2cfd..6662e57993 100644 --- a/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTexture_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSampleImplicitLod_TestTexture_lit.frag @@ -28,13 +28,13 @@ void main() ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 65, float 1.000000e+00, float 0x3FD99999A0000000) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 1, <2 x float> {{(splat \(float 5\.000000e\-01\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 1, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 0, i32 512, {{.*}}, {{.*}}, i32 65, float 1.000000e+00, float 0x3FD99999A0000000) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, {{.*}}, {{.*}}, i32 1, <2 x float> {{(splat \(float 5\.000000e\-01\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.b.1d.v4f32.f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}({{.*}}, float 0x3FD99999A0000000, float 1.000000e+00, {{.*}}) diff --git a/llpc/test/shaderdb/core/OpImageSample_TestSeparateSampler_lit.frag b/llpc/test/shaderdb/core/OpImageSample_TestSeparateSampler_lit.frag index 71ecedf341..6c77e777bb 100644 --- a/llpc/test/shaderdb/core/OpImageSample_TestSeparateSampler_lit.frag +++ b/llpc/test/shaderdb/core/OpImageSample_TestSeparateSampler_lit.frag @@ -19,13 +19,13 @@ void main() { ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 1) ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, {{.*}}, {{.*}}, i32 1, {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <8 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %{{[0-9]*}} ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32 diff --git a/llpc/test/shaderdb/core/OpImageSparseRead_TestInt64SparseImageLoad.spvasm b/llpc/test/shaderdb/core/OpImageSparseRead_TestInt64SparseImageLoad.spvasm index 288794b30e..e35147b1f2 100644 --- a/llpc/test/shaderdb/core/OpImageSparseRead_TestInt64SparseImageLoad.spvasm +++ b/llpc/test/shaderdb/core/OpImageSparseRead_TestInt64SparseImageLoad.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call { <4 x i64>, i32 } (...) @"lgc.create.image.load.s[v4i64,i32]" -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call { <2 x i32>, i32 } @llvm.amdgcn.image.load.2d.sl_v2i32i32s.i16{{(\.v8i32)?}}(i32 3, i16 3, i16 3, <8 x i32> %{{.*}}, i32 1, i32 0), !invariant.load !{{.*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpImageWrite_TestInt64ImageStore.spvasm b/llpc/test/shaderdb/core/OpImageWrite_TestInt64ImageStore.spvasm index 8c80d8accd..0250062b43 100644 --- a/llpc/test/shaderdb/core/OpImageWrite_TestInt64ImageStore.spvasm +++ b/llpc/test/shaderdb/core/OpImageWrite_TestInt64ImageStore.spvasm @@ -1,8 +1,8 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.create.image.store(<4 x i64> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.image.store.2d.v2f32.i16{{(\.v8i32)?}}(<2 x float> %{{.*}}, i32 3, i16 3, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpIsInf_TestDouble_lit.frag b/llpc/test/shaderdb/core/OpIsInf_TestDouble_lit.frag index 89ab4e81d1..2affccfeb3 100644 --- a/llpc/test/shaderdb/core/OpIsInf_TestDouble_lit.frag +++ b/llpc/test/shaderdb/core/OpIsInf_TestDouble_lit.frag @@ -17,7 +17,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call i1 (...) @lgc.create.isinf.i1(double -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %[[FABS:[0-9]+]] = call double @llvm.fabs.f64(double %{{[0-9]*}}) ; SHADERTEST: = fcmp oeq double %[[FABS]], 0x7FF0000000000000 diff --git a/llpc/test/shaderdb/core/OpIsInf_TestFloat_lit.frag b/llpc/test/shaderdb/core/OpIsInf_TestFloat_lit.frag index 7231cc78a5..7ad58a8483 100644 --- a/llpc/test/shaderdb/core/OpIsInf_TestFloat_lit.frag +++ b/llpc/test/shaderdb/core/OpIsInf_TestFloat_lit.frag @@ -17,7 +17,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call i1 (...) @lgc.create.isinf.i1(float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %[[FABS:[0-9]+]] = call float @llvm.fabs.f32(float %{{[0-9]*}}) ; SHADERTEST: = fcmp oeq float %[[FABS]], 0x7FF0000000000000 diff --git a/llpc/test/shaderdb/core/OpKill_TestFunctionBranch_lit.spvasm b/llpc/test/shaderdb/core/OpKill_TestFunctionBranch_lit.spvasm index 4d78e30c50..e55da056f8 100644 --- a/llpc/test/shaderdb/core/OpKill_TestFunctionBranch_lit.spvasm +++ b/llpc/test/shaderdb/core/OpKill_TestFunctionBranch_lit.spvasm @@ -3,7 +3,7 @@ ; Test that branch after a kill is correctly replaced with a return. -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.kill ; SHADERTEST-NEXT: call {{.*}} @lgc.create.write.generic.output ; SHADERTEST-NEXT: ret void diff --git a/llpc/test/shaderdb/core/OpKill_TestFunctionDynamic_lit.frag b/llpc/test/shaderdb/core/OpKill_TestFunctionDynamic_lit.frag index 6f34c92067..b1acccdbdd 100644 --- a/llpc/test/shaderdb/core/OpKill_TestFunctionDynamic_lit.frag +++ b/llpc/test/shaderdb/core/OpKill_TestFunctionDynamic_lit.frag @@ -21,7 +21,7 @@ void main (void) ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call void{{.*}} @lgc.create.kill -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.kill ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpKill_TestFunctionInlineReturn_lit.frag b/llpc/test/shaderdb/core/OpKill_TestFunctionInlineReturn_lit.frag index 518ee6b90a..effd3b3505 100644 --- a/llpc/test/shaderdb/core/OpKill_TestFunctionInlineReturn_lit.frag +++ b/llpc/test/shaderdb/core/OpKill_TestFunctionInlineReturn_lit.frag @@ -4,7 +4,7 @@ /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; Test that after SPIR-V lowering there are only two kills and +; Test that after FE lowering there are only two kills and ; both branch directly to the return block. ; Check that the selection of constants is correctly preserved @@ -12,7 +12,7 @@ ; correctly lowering a PHI, in a manner that can fail if ; PHIs are not updated correctly. -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call void{{.*}} @lgc.create.kill ; SHADERTEST-NEXT: br label %[[LABEL:[0-9]*]] diff --git a/llpc/test/shaderdb/core/OpKill_TestFunctionInline_lit.frag b/llpc/test/shaderdb/core/OpKill_TestFunctionInline_lit.frag index a0aedac2d0..e992814e40 100644 --- a/llpc/test/shaderdb/core/OpKill_TestFunctionInline_lit.frag +++ b/llpc/test/shaderdb/core/OpKill_TestFunctionInline_lit.frag @@ -4,10 +4,10 @@ /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; Test that after SPIR-V lowering all operations after first kill have been +; Test that after FE lowering all operations after first kill have been ; replaced with a branch to the return block. -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call void{{.*}} @lgc.create.kill ; SHADERTEST-NEXT: br label %[[LABEL:[0-9]*]] ; SHADERTEST-NOT: call void{{.*}} @lgc.create.kill diff --git a/llpc/test/shaderdb/core/OpKill_TestFunctionUnreachable_lit.spvasm b/llpc/test/shaderdb/core/OpKill_TestFunctionUnreachable_lit.spvasm index d4afb05dc3..dce585cf50 100644 --- a/llpc/test/shaderdb/core/OpKill_TestFunctionUnreachable_lit.spvasm +++ b/llpc/test/shaderdb/core/OpKill_TestFunctionUnreachable_lit.spvasm @@ -7,7 +7,7 @@ ; SHADERTEST-LABEL: {{^// LLPC.*}} SPIRV-to-LLVM translation results ; SHADERTEST: unreachable -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call void{{.*}} @lgc.create.kill ; SHADERTEST-NEXT: br label %[[LABEL:[0-9]*]] ; SHADERTEST: [[LABEL]]: diff --git a/llpc/test/shaderdb/core/OpKill_TestGeneral_lit.frag b/llpc/test/shaderdb/core/OpKill_TestGeneral_lit.frag index ff1b817587..c7f1a49f1b 100644 --- a/llpc/test/shaderdb/core/OpKill_TestGeneral_lit.frag +++ b/llpc/test/shaderdb/core/OpKill_TestGeneral_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call void{{.*}} @lgc.create.kill -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.kill ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpLoad_TestAggregate_lit.frag b/llpc/test/shaderdb/core/OpLoad_TestAggregate_lit.frag index 737a944b76..a157a92571 100644 --- a/llpc/test/shaderdb/core/OpLoad_TestAggregate_lit.frag +++ b/llpc/test/shaderdb/core/OpLoad_TestAggregate_lit.frag @@ -41,11 +41,11 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: load -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <4 x float>, ; SHADERTEST: load i32, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32 ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32 diff --git a/llpc/test/shaderdb/core/OpLoad_TestMatrix_lit.frag b/llpc/test/shaderdb/core/OpLoad_TestMatrix_lit.frag index 75aa62914a..03bdc8957d 100644 --- a/llpc/test/shaderdb/core/OpLoad_TestMatrix_lit.frag +++ b/llpc/test/shaderdb/core/OpLoad_TestMatrix_lit.frag @@ -28,10 +28,10 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: load <3 x float>, ptr -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <3 x float>, ptr -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat2xDmat2_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat2xDmat2_lit.frag index 6f20c927be..4e2045a0f6 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat2xDmat2_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat2xDmat2_lit.frag @@ -23,7 +23,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [2 x <2 x double>] (...) @lgc.create.matrix.times.matrix.a2v2f64([2 x <2 x double>] %{{[^, ]*}}, [2 x <2 x double>] %{{[^, ]*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}double %{{[^, ]*}}, %{{[^, ]*}} ; SHADERTEST: fadd {{.*}}double %{{[^, ]*}}, %{{[^, ]*}} diff --git a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat4X3xDmat3X4_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat4X3xDmat3X4_lit.frag index 90bfe2aa65..16b645ae13 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat4X3xDmat3X4_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestDmat4X3xDmat3X4_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [3 x <3 x double>] (...) @lgc.create.matrix.times.matrix.a3v3f64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}double %{{[^, ]*}}, %{{[^, ]*}} ; SHADERTEST: fadd {{.*}}double %{{[^, ]*}}, %{{[^, ]*}} diff --git a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2X3xMat4X3_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2X3xMat4X3_lit.frag index 43d8cd47c8..26a12ccaf8 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2X3xMat4X3_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2X3xMat4X3_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [4 x <3 x float>] (...) @lgc.create.matrix.times.matrix.a4v3f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}float %{{[^, ]*}}, %{{[^, ]*}} ; SHADERTEST: fadd {{.*}}float %{{[^, ]*}}, %{{[^, ]*}} diff --git a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2xMat2_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2xMat2_lit.frag index 25e6d5c92e..cc8e5bf5a8 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2xMat2_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat2xMat2_lit.frag @@ -20,7 +20,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [2 x <2 x float>] (...) @lgc.create.matrix.times.matrix.a2v2f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}float %{{.*}}, %{{[^, ]*}} ; SHADERTEST: fadd {{.*}}float %{{[^, ]*}}, %{{[^, ]*}} diff --git a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat3xMat3_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat3xMat3_lit.frag index 159d86b2ac..dbdf9cea58 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat3xMat3_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat3xMat3_lit.frag @@ -23,7 +23,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [3 x <3 x float>] (...) @lgc.create.matrix.times.matrix.a3v3f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}float %{{[^, ]*}}, %{{[^, ]*}} ; SHADERTEST: fadd {{.*}}float %{{[^, ]*}}, %{{[^, ]*}} diff --git a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat4xMat4_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat4xMat4_lit.frag index 45af031305..bdffff3b3a 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat4xMat4_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesMatrix_TestMat4xMat4_lit.frag @@ -28,10 +28,10 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [4 x <4 x float>] (...) @lgc.create.matrix.times.matrix.a4v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: fmul {{.*}}contract {{.*}}float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}float %{{[^, ]*}}, %{{[^, ]*}} ; SHADERTEST: fadd {{.*}}float %{{[^, ]*}}, %{{[^, ]*}} diff --git a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDmat3xDouble_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDmat3xDouble_lit.frag index 1488bdd2fb..07aaf907b2 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDmat3xDouble_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDmat3xDouble_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call {{.*}}[3 x <3 x double>] (...) @lgc.create.matrix.times.scalar.a3v3f64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}double %{{[^, ]*}}, %{{[^, ]*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDoublexDmat4_bit.frag b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDoublexDmat4_bit.frag index a0fbd2cc79..48326a5212 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDoublexDmat4_bit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestDoublexDmat4_bit.frag @@ -19,7 +19,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [4 x <4 x double>] (...) @lgc.create.matrix.times.scalar.a4v4f64 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: fmul {{.*}}double %{{[^, ]*}}, %{{[^, ]*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat3X4xFloat_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat3X4xFloat_lit.frag index 0583904cb8..803e856ae6 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat3X4xFloat_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat3X4xFloat_lit.frag @@ -27,10 +27,10 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [3 x <4 x float>] (...) @lgc.create.matrix.times.scalar.a3v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: fmul {{.*}}contract {{.*}}float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul {{.*}}float ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat4X2xConstFloat_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat4X2xConstFloat_lit.frag index a59a6f517f..72252c592f 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat4X2xConstFloat_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesScalar_TestMat4X2xConstFloat_lit.frag @@ -15,7 +15,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [4 x <2 x float>] (...) @lgc.create.matrix.times.scalar.a4v2f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: float 5.000000e-01, float 5.000000e-01, float 0.000000e+00, float 0.000000e+00 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2X3xDvec2_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2X3xDvec2_lit.frag index b7282a6100..278da5ee7b 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2X3xDvec2_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2X3xDvec2_lit.frag @@ -23,7 +23,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: <3 x double> (...) @lgc.create.matrix.times.vector.v3f64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul reassoc nnan nsz arcp contract double ; SHADERTEST: fadd reassoc nnan nsz arcp contract double diff --git a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2xDvec2_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2xDvec2_lit.frag index 7fa1e49ee3..f228487c66 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2xDvec2_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat2xDvec2_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: <2 x double> (...) @lgc.create.matrix.times.vector.v2f64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul reassoc nnan nsz arcp contract double ; SHADERTEST: fadd reassoc nnan nsz arcp contract double diff --git a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat4X2xDvec4_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat4X2xDvec4_lit.frag index 472554c010..699a23a8cf 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat4X2xDvec4_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestDmat4X2xDvec4_lit.frag @@ -23,7 +23,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: <2 x double> (...) @lgc.create.matrix.times.vector.v2f64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul reassoc nnan nsz arcp contract double ; SHADERTEST: fadd reassoc nnan nsz arcp contract double diff --git a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3X4xVec4_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3X4xVec4_lit.frag index ae99777764..cb1ad11577 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3X4xVec4_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3X4xVec4_lit.frag @@ -26,7 +26,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: <4 x float> (...) @lgc.create.matrix.times.vector.v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul reassoc nnan nsz arcp contract afn float ; SHADERTEST: fadd reassoc nnan nsz arcp contract afn float diff --git a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3xVec3_lit.frag b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3xVec3_lit.frag index baa54bb38f..e9f032518f 100644 --- a/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3xVec3_lit.frag +++ b/llpc/test/shaderdb/core/OpMatrixTimesVector_TestMat3xVec3_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: <3 x float> (...) @lgc.create.matrix.times.vector.v3f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: fmul reassoc nnan nsz arcp contract afn float ; SHADERTEST: fadd reassoc nnan nsz arcp contract afn float diff --git a/llpc/test/shaderdb/core/OpPhi_Switch_FunctionCall_Phi.spvasm b/llpc/test/shaderdb/core/OpPhi_Switch_FunctionCall_Phi.spvasm index 7b2dc25a3d..7bf473ddf8 100644 --- a/llpc/test/shaderdb/core/OpPhi_Switch_FunctionCall_Phi.spvasm +++ b/llpc/test/shaderdb/core/OpPhi_Switch_FunctionCall_Phi.spvasm @@ -1,5 +1,5 @@ ; RUN: amdllpc -verify-ir -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpPhi_TestMultiIncomingFromSwitch.spvasm b/llpc/test/shaderdb/core/OpPhi_TestMultiIncomingFromSwitch.spvasm index 2e2512a7a8..a08d961f8f 100644 --- a/llpc/test/shaderdb/core/OpPhi_TestMultiIncomingFromSwitch.spvasm +++ b/llpc/test/shaderdb/core/OpPhi_TestMultiIncomingFromSwitch.spvasm @@ -9,7 +9,7 @@ ; SHADERTEST-NEXT: ] ; SHADERTEST: [[SUCCESSOR]]: ; SHADERTEST-NEXT: %{{.*}} = phi float [ 5.000000e-01, %[[PREDECESSOR]] ], [ %{{.*}}, %{{.*}} ], [ 5.000000e-01, %[[PREDECESSOR]] ] -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpSDotAccSat_TestIVec16bit.spvasm b/llpc/test/shaderdb/core/OpSDotAccSat_TestIVec16bit.spvasm index 5d02075be2..3dea47a8f7 100644 --- a/llpc/test/shaderdb/core/OpSDotAccSat_TestIVec16bit.spvasm +++ b/llpc/test/shaderdb/core/OpSDotAccSat_TestIVec16bit.spvasm @@ -2,7 +2,7 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]+}} = call i32 (...) @lgc.create.integer.dot.product.i32(<4 x i16> %{{[0-9]+}}, <4 x i16> %{{[0-9]+}}, i32 {{[0-9]+}}, i32 3) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]+}} = call i32 @llvm.sadd.sat.i32(i32 %{{[0-9]+}}, i32 {{[0-9]+}}) ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpSMod_TestInt_lit.frag b/llpc/test/shaderdb/core/OpSMod_TestInt_lit.frag index d3973c692c..090831ca79 100644 --- a/llpc/test/shaderdb/core/OpSMod_TestInt_lit.frag +++ b/llpc/test/shaderdb/core/OpSMod_TestInt_lit.frag @@ -20,7 +20,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call i32 (...) @lgc.create.smod.i32(i32 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: srem i32 ; SHADERTEST: insertelement <4 x float> , float %{{.*}}, i{{32|64}} 0 diff --git a/llpc/test/shaderdb/core/OpSelect_TestDescriptorArray.spvasm b/llpc/test/shaderdb/core/OpSelect_TestDescriptorArray.spvasm index 2e3bbf0e0d..e478f7791f 100644 --- a/llpc/test/shaderdb/core/OpSelect_TestDescriptorArray.spvasm +++ b/llpc/test/shaderdb/core/OpSelect_TestDescriptorArray.spvasm @@ -1,7 +1,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; REQUIRES: do-not-run-me -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: getelementptr <{ [10 x %llpc.array.element] }>, ptr addrspace(7) %{{.*}}, i64 0, i32 0, i64 %{{.*}}, i32 0 ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpSelectionMerge_TestFlatten_lit.spvasm b/llpc/test/shaderdb/core/OpSelectionMerge_TestFlatten_lit.spvasm index 0f3f691656..421714839c 100644 --- a/llpc/test/shaderdb/core/OpSelectionMerge_TestFlatten_lit.spvasm +++ b/llpc/test/shaderdb/core/OpSelectionMerge_TestFlatten_lit.spvasm @@ -4,7 +4,7 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: br -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: select i1 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpSpecConstantOp_TestArithLogicOp_lit.frag b/llpc/test/shaderdb/core/OpSpecConstantOp_TestArithLogicOp_lit.frag index c8200cbddb..e8b243052b 100644 --- a/llpc/test/shaderdb/core/OpSpecConstantOp_TestArithLogicOp_lit.frag +++ b/llpc/test/shaderdb/core/OpSpecConstantOp_TestArithLogicOp_lit.frag @@ -257,7 +257,7 @@ void main() ; SHADERTEST: add i32 %{{[0-9]*}}, -6 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: float 0x4034E66680000000, float 0x4034E66680000000, float 0x4034E66680000000, float 0x4034E66680000000 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpSpecConstantOp_TestQuantizeFlushToZero_lit.pipe b/llpc/test/shaderdb/core/OpSpecConstantOp_TestQuantizeFlushToZero_lit.pipe index 75730e831a..aacdc72941 100644 --- a/llpc/test/shaderdb/core/OpSpecConstantOp_TestQuantizeFlushToZero_lit.pipe +++ b/llpc/test/shaderdb/core/OpSpecConstantOp_TestQuantizeFlushToZero_lit.pipe @@ -3,10 +3,10 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: store float -0.000000e+00, ptr addrspace(7) %{{[0-9]*}} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: store float -0.000000e+00, ptr addrspace(7) %{{[0-9]*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallInsertion.frag b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallInsertion.frag index 8a63609974..6350529711 100644 --- a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallInsertion.frag +++ b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallInsertion.frag @@ -21,7 +21,7 @@ void main() // RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s // Make sure that the begin indices chosen are the non-uniform offsets rather than the whole resource desc // Make sure that there's a waterfall.readfirstlane for both the image resource desc and sample desc -// SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST: %[[mul:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-NEXT: %[[begin:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul]]) // SHADERTEST-NEXT: %[[readfirstlane:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin]], i32 %[[mul]]) diff --git a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize.frag b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize.frag index 4eb41bef9c..d3c4e40921 100644 --- a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize.frag +++ b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize.frag @@ -20,7 +20,7 @@ void main() // Make sure that both the image resource desc and sample desc have the same index and there is only one // waterfall.readfirstlane for both of them -// SHADERTEST-GFX-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX: %[[mul:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX-NEXT: %[[begin:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul]]) // SHADERTEST-GFX-NEXT: %[[readfirstlane:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin]], i32 %[[mul]]) @@ -39,7 +39,7 @@ void main() // SHADERTEST-GFX-NEXT: %[[end:[0-9]+]] = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %[[begin]], <4 x float> %[[image_call]]) // SHADERTEST-GFX: AMDLLPC SUCCESS // -// SHADERTEST-GFX_10_3_0-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX_10_3_0-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX_10_3_0: %[[mul:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX_10_3_0-NEXT: %[[begin:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul]]) // SHADERTEST-GFX_10_3_0-NEXT: %[[readfirstlane:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin]], i32 %[[mul]]) @@ -52,7 +52,7 @@ void main() // SHADERTEST-GFX_10_3_0-NEXT: %[[end:[0-9]+]] = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %[[begin]], <4 x float> %[[image_call]]) // SHADERTEST-GFX_10_3_0: AMDLLPC SUCCESS // -// SHADERTEST-GFX_10_3_2-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX_10_3_2-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX_10_3_2: %[[mul:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX_10_3_2-NEXT: %[[begin:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul]]) // SHADERTEST-GFX_10_3_2-NEXT: %[[readfirstlane:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin]], i32 %[[mul]]) diff --git a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarizeVgprLimit.frag b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarizeVgprLimit.frag index 50b9a75371..13cf5f66cf 100644 --- a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarizeVgprLimit.frag +++ b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarizeVgprLimit.frag @@ -19,7 +19,7 @@ void main() // BEGIN_SHADERTEST // // RUN: amdllpc -vgpr-limit=64 -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -// SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST: call i32 @llvm.amdgcn.waterfall.begin.i32 // SHADERTEST-NOT: call i32 @llvm.amdgcn.waterfall.begin.i32 // SHADERTEST: call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32 diff --git a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_MultiBlock.frag b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_MultiBlock.frag index 3cc08fb052..3f8b6ecf58 100644 --- a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_MultiBlock.frag +++ b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_MultiBlock.frag @@ -30,7 +30,7 @@ void main() // Make sure that both the image resource desc and sample desc have the same index and there is only one // waterfall.readfirstlane for both of them -// SHADERTEST-GFX-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX: %[[mul1:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX-NEXT: %[[begin1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul1]]) // SHADERTEST-GFX-NEXT: %[[readfirstlane1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin1]], i32 %[[mul1]]) @@ -81,7 +81,7 @@ void main() // SHADERTEST-GFX-NEXT: %[[end3:[0-9]+]] = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %[[begin3]], <4 x float> %[[image_call3]]) // SHADERTEST-GFX: AMDLLPC SUCCESS // -// SHADERTEST-GFX_10_3_0-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX_10_3_0-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX_10_3_0: %[[mul1:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX_10_3_0-NEXT: %[[begin1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul1]]) // SHADERTEST-GFX_10_3_0-NEXT: %[[readfirstlane1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin1]], i32 %[[mul1]]) @@ -114,7 +114,7 @@ void main() // SHADERTEST-GFX_10_3_0-NEXT: %[[end3:[0-9]+]] = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %[[begin3]], <4 x float> %[[image_call3]]) // SHADERTEST-GFX_10_3_0: AMDLLPC SUCCESS // -// SHADERTEST-GFX_10_3_2-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX_10_3_2-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX_10_3_2: %[[mul1:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX_10_3_2-NEXT: %[[begin1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul1]]) // SHADERTEST-GFX_10_3_2-NEXT: %[[readfirstlane1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin1]], i32 %[[mul1]]) diff --git a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_SharedDesc.frag b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_SharedDesc.frag index 6548e3e885..54a348e3eb 100644 --- a/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_SharedDesc.frag +++ b/llpc/test/shaderdb/core/OpTypeSampledImage_TestWaterfallScalarize_SharedDesc.frag @@ -23,7 +23,7 @@ void main() // Make sure that both the image resource desc and sample desc have the same index and there is only one // waterfall.readfirstlane for both of them -// SHADERTEST-GFX-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX: %[[mul1:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX-NEXT: %[[begin1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul1]]) // SHADERTEST-GFX-NEXT: %[[readfirstlane1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin1]], i32 %[[mul1]]) @@ -58,7 +58,7 @@ void main() // SHADERTEST-GFX-NEXT: %[[end2:[0-9]+]] = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %[[begin2]], <4 x float> %[[image_call2]]) // SHADERTEST-GFX: AMDLLPC SUCCESS -// SHADERTEST-GFX_10_3_0-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX_10_3_0-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX_10_3_0: %[[mul1:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX_10_3_0-NEXT: %[[begin1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul1]]) // SHADERTEST-GFX_10_3_0-NEXT: %[[readfirstlane1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin1]], i32 %[[mul1]]) @@ -81,7 +81,7 @@ void main() // SHADERTEST-GFX_10_3_0-NEXT: %[[end2:[0-9]+]] = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %[[begin2]], <4 x float> %[[image_call2]]) // SHADERTEST-GFX_10_3_0: AMDLLPC SUCCESS -// SHADERTEST-GFX_10_3_2-LABEL: {{^// LLPC}} pipeline patching results +// SHADERTEST-GFX_10_3_2-LABEL: {{^// LLPC}} LGC lowering results // SHADERTEST-GFX_10_3_2: %[[mul1:[0-9]+]] = mul i32 %{{.*}}, 48 // SHADERTEST-GFX_10_3_2-NEXT: %[[begin1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %[[mul1]]) // SHADERTEST-GFX_10_3_2-NEXT: %[[readfirstlane1:[0-9]+]] = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %[[begin1]], i32 %[[mul1]]) diff --git a/llpc/test/shaderdb/core/OpUDotAccSat_TestUVec16bit.spvasm b/llpc/test/shaderdb/core/OpUDotAccSat_TestUVec16bit.spvasm index c05dff6be2..21e1ba3686 100644 --- a/llpc/test/shaderdb/core/OpUDotAccSat_TestUVec16bit.spvasm +++ b/llpc/test/shaderdb/core/OpUDotAccSat_TestUVec16bit.spvasm @@ -2,7 +2,7 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]+}} = call i32 (...) @lgc.create.integer.dot.product.i32(<4 x i16> %{{[0-9]+}}, <4 x i16> %{{[0-9]+}}, i32 {{[0-9]+}}, i32 0) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]+}} = call i32 @llvm.uadd.sat.i32(i32 %{{[0-9]+}}, i32 {{[0-9]+}}) ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/core/OpVectorShuffle_TestDifferentInputVecSizes_lit.spvasm b/llpc/test/shaderdb/core/OpVectorShuffle_TestDifferentInputVecSizes_lit.spvasm index 43da432df1..b1cb2ffbfc 100644 --- a/llpc/test/shaderdb/core/OpVectorShuffle_TestDifferentInputVecSizes_lit.spvasm +++ b/llpc/test/shaderdb/core/OpVectorShuffle_TestDifferentInputVecSizes_lit.spvasm @@ -9,7 +9,7 @@ ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <2 x double> %{{.*}}, <2 x double> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x double> [[TEMP_VEC]], <4 x double> %{{.*}}, <4 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{.*}} = shufflevector <4 x double> %{{.*}}, <4 x double> {{poison|undef}}, <2 x i32> ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <2 x double> %{{.*}}, <2 x double> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x double> [[TEMP_VEC]], <4 x double> %{{.*}}, <4 x i32> diff --git a/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UndefVariable_lit.spvasm b/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UndefVariable_lit.spvasm index 2b02b7faa4..051e3ee34f 100644 --- a/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UndefVariable_lit.spvasm +++ b/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UndefVariable_lit.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: %{{.*}} = shufflevector <4 x double> undef, <4 x double> %1, <2 x i32> ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <2 x double> %{{.*}}, <2 x double> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x double> %{{.*}}, <4 x double> [[TEMP_VEC]], <4 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{.*}} = shufflevector <4 x double> %{{.*}}, <4 x double> {{poison|undef}}, <2 x i32> ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <2 x double> %{{.*}}, <2 x double> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x double> [[TEMP_VEC]], <4 x double> %{{.*}}, <4 x i32> diff --git a/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UnspecifiedChannel_lit.spvasm b/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UnspecifiedChannel_lit.spvasm index 5a2ce20976..184f2f772b 100644 --- a/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UnspecifiedChannel_lit.spvasm +++ b/llpc/test/shaderdb/core/OpVectorShuffle_TestDvec4UnspecifiedChannel_lit.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: %{{.*}} = shufflevector <4 x double> %{{.*}}, <4 x double> %{{.*}}, <2 x i32> ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <2 x double> %{{.*}}, <2 x double> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x double> %{{.*}}, <4 x double> [[TEMP_VEC]], <4 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <4 x double> %{{.*}}, <4 x double> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x double> [[TEMP_VEC]], <4 x double> %{{.*}}, <4 x i32> ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpVectorShuffle_TestVec4UnspecifiedChannel_lit.spvasm b/llpc/test/shaderdb/core/OpVectorShuffle_TestVec4UnspecifiedChannel_lit.spvasm index 40b5c742e6..abc5ae2a1c 100644 --- a/llpc/test/shaderdb/core/OpVectorShuffle_TestVec4UnspecifiedChannel_lit.spvasm +++ b/llpc/test/shaderdb/core/OpVectorShuffle_TestVec4UnspecifiedChannel_lit.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: %{{.*}} = shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <2 x i32> ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <2 x float> %{{.*}}, <2 x float> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x float> %{{.*}}, <4 x float> [[TEMP_VEC]], <4 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: [[TEMP_VEC:%[0-9]+]] = shufflevector <4 x float> %{{.*}}, <4 x float> {{undef|poison}}, <4 x i32> ; SHADERTEST: %{{.*}} = shufflevector <4 x float> [[TEMP_VEC]], <4 x float> %{{.*}}, <4 x i32> ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OpVectorShuffle_TestVec_lit.frag b/llpc/test/shaderdb/core/OpVectorShuffle_TestVec_lit.frag index 1592379fc8..db0d1b9c51 100644 --- a/llpc/test/shaderdb/core/OpVectorShuffle_TestVec_lit.frag +++ b/llpc/test/shaderdb/core/OpVectorShuffle_TestVec_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{.*}} = extractelement <2 x float> %{{.*}}, i32 0 ; SHADERTEST: %{{.*}} = extractelement <2 x float> %{{.*}}, i32 1 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: [[VEC1:%.*]] = shufflevector <3 x float> %{{.*}}, <3 x float> {{undef|poison}}, <4 x i32> ; SHADERTEST: [[VEC2:%.*]] = shufflevector <4 x float> , <4 x float> [[VEC1]], <4 x i32> ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OverrideThreadGroupSize16X16X1.spvasm b/llpc/test/shaderdb/core/OverrideThreadGroupSize16X16X1.spvasm index 3b8a890243..b841769578 100644 --- a/llpc/test/shaderdb/core/OverrideThreadGroupSize16X16X1.spvasm +++ b/llpc/test/shaderdb/core/OverrideThreadGroupSize16X16X1.spvasm @@ -2,7 +2,7 @@ ; RUN: amdllpc -v %gfxip %s \ ; RUN: --override-threadGroupSizeX=16 --override-threadGroupSizeY=16 --override-threadGroupSizeZ=1 \ ; RUN: | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: !llpc.compute.mode = !{!0} ; SHADERTEST: !0 = !{i32 16, i32 16, i32 1} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/OverrideThreadGroupSize8X8X1.spvasm b/llpc/test/shaderdb/core/OverrideThreadGroupSize8X8X1.spvasm index bb7b4bfc10..da345746bc 100644 --- a/llpc/test/shaderdb/core/OverrideThreadGroupSize8X8X1.spvasm +++ b/llpc/test/shaderdb/core/OverrideThreadGroupSize8X8X1.spvasm @@ -2,7 +2,7 @@ ; RUN: amdllpc -v %gfxip %s \ ; RUN: --override-threadGroupSizeX=8 --override-threadGroupSizeY=8 --override-threadGroupSizeZ=1 \ ; RUN: | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: !llpc.compute.mode = !{!0} ; SHADERTEST: !0 = !{i32 8, i32 8, i32 1} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/TestEnableImplicitInvariantExports.vert b/llpc/test/shaderdb/core/TestEnableImplicitInvariantExports.vert index 60c5e7f1c8..b150529084 100644 --- a/llpc/test/shaderdb/core/TestEnableImplicitInvariantExports.vert +++ b/llpc/test/shaderdb/core/TestEnableImplicitInvariantExports.vert @@ -20,7 +20,7 @@ void main() // BEGIN_WITHOUT_IIE /* ; RUN: amdllpc -v --enable-implicit-invariant-exports=1 %gfxip %s | FileCheck -check-prefix=WITHOUT_IIE %s -; WITHOUT_IIE-LABEL: {{^// LLPC}} pipeline before-patching results +; WITHOUT_IIE-LABEL: {{^// LLPC}} LGC before-lowering results ; WITHOUT_IIE: %[[val:.*]] = extractvalue [4 x <4 x float>] %{{.*}}, 3 ; WITHOUT_IIE: %[[mul:.*]] = fmul nnan nsz afn <4 x float> %[[val]], %{{.*}} ; WITHOUT_IIE: %[[arg:.*]] = fadd nnan nsz afn <4 x float> %{{.*}}, %[[mul]] @@ -32,7 +32,7 @@ void main() // BEGIN_WITH_IIE /* ; RUN: amdllpc -v --enable-implicit-invariant-exports=0 %s | FileCheck -check-prefix=WITH_IIE %s -; WITH_IIE-LABEL: {{^// LLPC}} pipeline before-patching results +; WITH_IIE-LABEL: {{^// LLPC}} LGC before-lowering results ; WITH_IIE: %[[val:.*]] = extractvalue [4 x <4 x float>] %{{.*}}, 3 ; WITH_IIE: %[[mul:.*]] = fmul reassoc nnan nsz arcp contract afn <4 x float> %[[val]], %{{.*}} ; WITH_IIE: %[[arg:.*]] = fadd reassoc nnan nsz arcp contract afn <4 x float> %{{.*}}, %[[mul]] diff --git a/llpc/test/shaderdb/core/TestForceNonUniformResourceIndex.frag b/llpc/test/shaderdb/core/TestForceNonUniformResourceIndex.frag index 316a82ca5a..093ef500b6 100644 --- a/llpc/test/shaderdb/core/TestForceNonUniformResourceIndex.frag +++ b/llpc/test/shaderdb/core/TestForceNonUniformResourceIndex.frag @@ -1,7 +1,7 @@ // Test not forcing NURI // BEGIN_SHADERTEST // RUN: amdllpc -v %gfxip %s --force-non-uniform-resource-index-stage-mask=0x00000000 | FileCheck -check-prefix=NOTFORCENURITEST %s -// NOTFORCENURITEST-LABEL: {{^// LLPC}} pipeline before-patching results +// NOTFORCENURITEST-LABEL: {{^// LLPC}} LGC before-lowering results // When not forcing NURI (Non Uniform Resource Index), there should be a `readfirstlane`. // NOTFORCENURITEST: %{{[0-9]+}} = call i32 @llvm.amdgcn.readfirstlane{{(.i32)?}}(i32 %{{[0-9]+}}) // NOTFORCENURITEST: AMDLLPC SUCCESS @@ -10,7 +10,7 @@ // Test forcing NURI // BEGIN_SHADERTEST // RUN: amdllpc -v %gfxip %s --force-non-uniform-resource-index-stage-mask=0xFFFFFFFF | FileCheck -check-prefix=FORCENURITEST %s -// FORCENURITEST-LABEL: {{^// LLPC}} pipeline before-patching results +// FORCENURITEST-LABEL: {{^// LLPC}} LGC before-lowering results // When forcing NURI (Non Uniform Resource Index), there should not be a `readfirstlane`. // FORCENURITEST-NOT: %{{[0-9]+}} = call i32 @llvm.amdgcn.readfirstlane{{(.i32)?}}(i32 %{{[0-9]+}}) // FORCENURITEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/core/TestReverseThreadGroup.comp b/llpc/test/shaderdb/core/TestReverseThreadGroup.comp index 4882089b5f..f0a5b05fc9 100644 --- a/llpc/test/shaderdb/core/TestReverseThreadGroup.comp +++ b/llpc/test/shaderdb/core/TestReverseThreadGroup.comp @@ -14,7 +14,7 @@ void main() // BEGIN_REVERSETEST // RUN: amdllpc -v %gfxip %s --reverse-thread-group=1 --print-after=lgc-lower-desc 2>&1 | FileCheck -check-prefix=REVERSETEST %s -// REVERSETEST-LABEL: {{^// LLPC}} pipeline before-patching results +// REVERSETEST-LABEL: {{^// LLPC}} LGC before-lowering results // There should be a calls to: // - get the descriptor table containing the buffer descriptor // - get the gl_NumWorkGroups @@ -29,7 +29,7 @@ void main() // END_REVERSETEST // BEGIN_NOTREVERSETEST // RUN: amdllpc -v %gfxip %s --reverse-thread-group=0 | FileCheck -check-prefix=NOTREVERSETEST %s -// NOTREVERSETEST-LABEL: {{^// LLPC}} pipeline before-patching results +// NOTREVERSETEST-LABEL: {{^// LLPC}} LGC before-lowering results // There should not be a call to get the gl_NumWorkGroups // NOTREVERSETEST-NOT: %{{[0-9]+}} = call ptr addrspace(4) @lgc.special.user.data.Workgroup(i32 268435462) // There should not be a call to get the internal buffer descriptor diff --git a/llpc/test/shaderdb/core/TestThreadGroupSwizzle.comp b/llpc/test/shaderdb/core/TestThreadGroupSwizzle.comp index b5b3dad8e6..ed55d67b43 100644 --- a/llpc/test/shaderdb/core/TestThreadGroupSwizzle.comp +++ b/llpc/test/shaderdb/core/TestThreadGroupSwizzle.comp @@ -14,17 +14,17 @@ void main() // BEGIN_SWIZZLETEST // RUN: amdllpc -v %gfxip %s --thread-group-swizzle-mode=4x4 | FileCheck -check-prefix=SWIZZLETEST %s -// SWIZZLETEST-LABEL: {{^// LLPC}} pipeline before-patching results +// SWIZZLETEST-LABEL: {{^// LLPC}} LGC before-lowering results // SWIZZLETEST: %{{[0-9]+}} = call <3 x i32> @lgc.swizzle.workgroup.id(<3 x i32> %{{[0-9]+}}, <3 x i32> %{{[0-9]+}}) -// SWIZZLETEST-LABEL: {{^// LLPC}} pipeline patching results +// SWIZZLETEST-LABEL: {{^// LLPC}} LGC lowering results // SWIZZLETEST: .performSwizzle{{.*}}: // SWIZZLETEST: AMDLLPC SUCCESS // END_SWIZZLETEST // BEGIN_NOTSWIZZLETEST // RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=NOTSWIZZLETEST %s -// NOTSWIZZLETEST-LABEL: {{^// LLPC}} pipeline before-patching results +// NOTSWIZZLETEST-LABEL: {{^// LLPC}} LGC before-lowering results // NOTSWIZZLETEST-NOT: lgc.swizzle.workgroup.id -// NOTSWIZZLETEST-LABEL: {{^// LLPC}} pipeline patching results +// NOTSWIZZLETEST-LABEL: {{^// LLPC}} LGC lowering results // NOTSWIZZLETEST-NOT: .performSwizzle{{.*}}: // NOTSWIZZLETEST: AMDLLPC SUCCESS // END_NOTSWIZZLETEST diff --git a/llpc/test/shaderdb/core/TestXfbStateMetadata.vert b/llpc/test/shaderdb/core/TestXfbStateMetadata.vert index 36cd971cb4..e718a33126 100644 --- a/llpc/test/shaderdb/core/TestXfbStateMetadata.vert +++ b/llpc/test/shaderdb/core/TestXfbStateMetadata.vert @@ -20,8 +20,8 @@ void main() // CHECK-LABEL: define {{[^@]+}}@lgc.shader.VS.main // CHECK-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] !spirv.ExecutionModel !11 !lgc.shaderstage !1 !lgc.xfb.state !12 { // CHECK-NEXT: .entry: -// CHECK-NEXT: [[TMP0:%.*]] = call float @lgc.load.vertex.input__f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison) -// CHECK-NEXT: [[TMP1:%.*]] = call <4 x float> @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) +// CHECK-NEXT: [[TMP0:%.*]] = call float @lgc.load.vertex.input__f32(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) +// CHECK-NEXT: [[TMP1:%.*]] = call <4 x float> @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) // CHECK-NEXT: call void (...) @lgc.create.write.builtin.output(<4 x float> [[TMP1]], i32 0, i32 0, i32 poison, i32 poison) // CHECK-NEXT: call void (...) @lgc.create.write.xfb.output(float [[TMP0]], i1 true, i32 1, i32 0, i32 4, i32 0, i32 0) // CHECK-NEXT: call void (...) @lgc.create.write.builtin.output(float [[TMP0]], i32 1, i32 0, i32 poison, i32 poison) diff --git a/llpc/test/shaderdb/debug_info/PipelineGsTess_TestVsTesGsMergeShader.pipe b/llpc/test/shaderdb/debug_info/PipelineGsTess_TestVsTesGsMergeShader.pipe index b540ae4b1d..3230d03602 100644 --- a/llpc/test/shaderdb/debug_info/PipelineGsTess_TestVsTesGsMergeShader.pipe +++ b/llpc/test/shaderdb/debug_info/PipelineGsTess_TestVsTesGsMergeShader.pipe @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by tool/update_llpc_test_checks.py UTC_ARGS: --check-globals ; BEGIN_SHADERTEST -; RUN: amdllpc --print-after=lgc-patch-prepare-pipeline-abi --enable-implicit-invariant-exports=1 -trim-debug-info=false 2>&1 %s | FileCheck -check-prefix=SHADERTEST %s +; RUN: amdllpc --print-after=lgc-prepare-pipeline-abi --enable-implicit-invariant-exports=1 -trim-debug-info=false 2>&1 %s | FileCheck -check-prefix=SHADERTEST %s [Version] version = 40 diff --git a/llpc/test/shaderdb/debug_info/PipelineGs_TestVsGSMergeShader.pipe b/llpc/test/shaderdb/debug_info/PipelineGs_TestVsGSMergeShader.pipe index 05f228a001..3146e8b871 100644 --- a/llpc/test/shaderdb/debug_info/PipelineGs_TestVsGSMergeShader.pipe +++ b/llpc/test/shaderdb/debug_info/PipelineGs_TestVsGSMergeShader.pipe @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by tool/update_llpc_test_checks.py UTC_ARGS: --check-globals -; RUN: amdllpc --print-after=lgc-patch-prepare-pipeline-abi -trim-debug-info=false 2>&1 %s | FileCheck -check-prefix=SHADERTEST %s +; RUN: amdllpc --print-after=lgc-prepare-pipeline-abi -trim-debug-info=false 2>&1 %s | FileCheck -check-prefix=SHADERTEST %s [Version] version = 53 diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugCompilationUnit.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugCompilationUnit.spvasm index bb2817b188..3a0e09c111 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugCompilationUnit.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugCompilationUnit.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: {{![0-9]*}} = !{i32 {{[0-9]*}}, !"Debug Info Version", i32 3} ; SHADERTEST: {{![0-9]*}} = distinct !DICompileUnit(language: DW_LANG_Cobol74, file: [[D1:![0-9]*]], producer: "spirv", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) ; SHADERTEST: [[D1]] = !DIFile(filename: "simple.hlsl", directory: ".") -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugDeclare.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugDeclare.spvasm index e6503cc62a..5ddceeee37 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugDeclare.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugDeclare.spvasm @@ -12,7 +12,7 @@ ; SHADERTEST: [[D5]] = !{} ; SHADERTEST: [[D6:![0-9]*]] = !{i32 0} ; SHADERTEST: [[D13:![0-9]*]] = !DILocation(line: 1, scope: [[D8]]) -; SHADERTEST: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugExpression.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugExpression.spvasm index 76f0000805..7a3b6e9da9 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugExpression.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugExpression.spvasm @@ -4,7 +4,7 @@ ; SHADERTEST: @llvm.dbg.declare(metadata ptr addrspace(5) %0, metadata [[D1:![0-9]*]], metadata !DIExpression(DW_OP_constu, 1, DW_OP_constu, 1, DW_OP_plus)), !dbg [[D2:![0-9]*]] ; SHADERTEST: [[D1]] = !DILocalVariable(name: "foo", scope: [[D3:![0-9]*]], file: !{{[0-9]*}}, line: 1, type: !{{[0-9]*}}) ; SHADERTEST: [[D2]] = !DILocation(line: 1, scope: [[D3]]) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugFunctionDeclaration.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugFunctionDeclaration.spvasm index d2668126a1..d131cceaeb 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugFunctionDeclaration.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugFunctionDeclaration.spvasm @@ -6,7 +6,7 @@ ; SHADERTEST: [[D5]] = !{null} ; SHADERTEST: [[D4]] = !DISubprogram(name: "main", linkageName: "v4f_main_f", scope: null, file: !{{[0-9]*}}, line: 12, type: [[D3]], flags: DIFlagPublic, spFlags: 0, templateParams: [[D1]]) ; SHADERTEST: [[D1]] = !{} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugLexicalBlock.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugLexicalBlock.spvasm index 8b101afe65..09485101ff 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugLexicalBlock.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugLexicalBlock.spvasm @@ -3,7 +3,7 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [[D1:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "struct VS_OUTPUT", scope: [[D2:![0-9]*]], file: !{{[0-9]*}}, line: 1, size: 32, elements: !{{[0-9]*}}, identifier: "struct VS_OUTPUT") ; SHADERTEST: [[D2]] = !DINamespace(name: "namespace_name", scope: null) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugSourceNoText.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugSourceNoText.spvasm index 1ee6259d57..33d755779e 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugSourceNoText.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugSourceNoText.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: {{![0-9]*}} = !{i32 2, !"Debug Info Version", i32 3} ; SHADERTEST: {{![0-9]*}} = distinct !DICompileUnit(language: DW_LANG_Cobol74, file: [[D1:![0-9]*]], producer: "spirv", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) ; SHADERTEST: [[D1]] = !DIFile(filename: "simple.hlsl", directory: ".") -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeArray.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeArray.spvasm index e69368aab4..23f5691c97 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeArray.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeArray.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: [[D2]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) ; SHADERTEST: [[D3]] = !{[[D4:![0-9]*]]} ; SHADERTEST: [[D4]] = !DISubrange(count: 32, lowerBound: 0) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeEnum.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeEnum.spvasm index 5eea5b7074..d0d6635eb3 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeEnum.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeEnum.spvasm @@ -9,7 +9,7 @@ ; SHADERTEST: [[D6:![0-9]*]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "enum2", file: !{{[0-9]*}}, line: 1, size: 32, elements: [[D3]]) ; SHADERTEST: [[D7:![0-9]*]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "enum3", file: !{{[0-9]*}}, line: 1, size: 32, elements: [[D8:![0-9]*]]) ; SHADERTEST: [[D8]] = !{} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeFunction.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeFunction.spvasm index b513655b18..ab2ca5182e 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeFunction.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeFunction.spvasm @@ -14,7 +14,7 @@ ; SHADERTEST: [[D12:![0-9]*]] = !DILocalVariable(name: "foo4", scope: !{{[0-9*]}}, file: !{{[0-9*]}}, line: 4, type: [[D13:![0-9]*]]) ; SHADERTEST: [[D13]] = !DISubroutineType(types: [[D14:![0-9]*]]) ; SHADERTEST: [[D14]] = !{null, [[D7]], [[D7]]} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeInheritance.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeInheritance.spvasm index 6366b91140..f784ccbfc2 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeInheritance.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeInheritance.spvasm @@ -12,7 +12,7 @@ ; SHADERTEST: [[D7]] = !DICompositeType(tag: DW_TAG_structure_type, name: "struct VS_OUTPUT", file: !{{[0-9]*}}, line: 1, size: 128, elements: [[D8:![0-9]*]], identifier: "VS_OUTPUT") ; SHADERTEST: [[D8]] = !{[[D9:![0-9]*]], [[D10]], [[D1]]} ; SHADERTEST: [[D9]] = !DIDerivedType(tag: DW_TAG_member, name: "pos : SV_POSITION", scope: [[D7]], file: !{{[0-9]*}}, line: 2, baseType: [[D2]], size: 128, flags: DIFlagPublic) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypePointer.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypePointer.spvasm index f0b631c1ef..ec793e6dac 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypePointer.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypePointer.spvasm @@ -3,7 +3,7 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [[D1:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[D2:![0-9]*]], dwarfAddressSpace: 5) ; SHADERTEST: [[D2]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeQualifier.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeQualifier.spvasm index 542e897e0f..0c87341b55 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeQualifier.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeQualifier.spvasm @@ -3,7 +3,7 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [[D1:![0-9]*]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: [[D2:![0-9]*]]) ; SHADERTEST: [[D2]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeVector.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeVector.spvasm index 007b297cae..d4b2589e78 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeVector.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypeVector.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: [[D2]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) ; SHADERTEST: [[D3]] = !{[[D4:![0-9]*]]} ; SHADERTEST: [[D4]] = !DISubrange(count: 4, lowerBound: 0) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypedef.spvasm b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypedef.spvasm index 93ce9f96ca..b481c17e16 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypedef.spvasm +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_DebugTypedef.spvasm @@ -3,7 +3,7 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: [[D2:![0-9]*]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Foo", file: !{{[0-9]*}}, line: 1, baseType: [[D3:![0-9]*]]) ; SHADERTEST: [[D3]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestFsBasic.frag b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestFsBasic.frag index 4ba98f0b37..d2c8fa1284 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestFsBasic.frag +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestFsBasic.frag @@ -40,7 +40,7 @@ void main() ; SHADERTEST: [[D3]] = !{i32 4} ; SHADERTEST: [[D4]] = !DILocation(line: 11, scope: [[D12]]) ; SHADERTEST: [[D15:![0-9]*]] = !DILocation(line: 12, scope: [[D12]]) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestVsBasic.vert b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestVsBasic.vert index a8814f2aba..0458228259 100644 --- a/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestVsBasic.vert +++ b/llpc/test/shaderdb/debug_info/avoid/DebugInfo_TestVsBasic.vert @@ -48,7 +48,7 @@ void main() ; SHADERTEST: [[D6:![0-9]*]] = !DILocation(line: 10, scope: [[D15]]) ; SHADERTEST: [[D7:![0-9]*]] = !DILocation(line: 11, scope: [[D15]]) ; SHADERTEST: [[D8:![0-9]*]] = !DILocation(line: 13, scope: [[D15]]) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestFsInput_lit.frag b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestFsInput_lit.frag index f3e4c205f7..626a842f63 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestFsInput_lit.frag +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestFsInput_lit.frag @@ -25,7 +25,7 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call <3 x i16> (...) @lgc.input.import.interpolated__v3i16{{.*}} ; SHADERTEST-DAG: call <3 x half> (...) @lgc.input.import.interpolated__v3f16{{.*}} ; SHADERTEST-DAG: call i16 (...) @lgc.input.import.interpolated__i16{{.*}} diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsInput_lit.geom b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsInput_lit.geom index 7f42feaa08..679c3de0c1 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsInput_lit.geom +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsInput_lit.geom @@ -35,7 +35,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <3 x i16> @lgc.input.import.generic__v3i16{{.*}} ; SHADERTEST: call i16 @lgc.input.import.generic__i16{{.*}} ; SHADERTEST: call <3 x half> @lgc.input.import.generic__v3f16{{.*}} diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsOutput_lit.geom b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsOutput_lit.geom index 784ac652a6..32d916b252 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsOutput_lit.geom +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestGsOutput_lit.geom @@ -34,7 +34,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}i16 diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsInput_lit.tesc b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsInput_lit.tesc index bd6c07014d..3522e44693 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsInput_lit.tesc +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsInput_lit.tesc @@ -29,7 +29,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 @lgc.input.import.builtin.InvocationId{{.*}} ; SHADERTEST: call half @lgc.input.import.generic__f16{{.*}} ; SHADERTEST: call <3 x half> @lgc.input.import.generic__v3f16{{.*}} diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsOutput_lit.tesc b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsOutput_lit.tesc index c76c3b8003..6c961adab6 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsOutput_lit.tesc +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTcsOutput_lit.tesc @@ -28,7 +28,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}i16 diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesInput_lit.tese b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesInput_lit.tese index 6f7d93869d..5d4f3409e9 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesInput_lit.tese +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesInput_lit.tese @@ -27,7 +27,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call half @lgc.input.import.generic__f16{{.*}} ; SHADERTEST-DAG: call <3 x half> @lgc.input.import.generic__v3f16{{.*}} ; SHADERTEST-DAG: call i16 @lgc.input.import.generic__i16{{.*}} diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesOutput_lit.tese b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesOutput_lit.tese index f5fcfcab35..5fad524b4e 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesOutput_lit.tese +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestTesOutput_lit.tese @@ -26,7 +26,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}i16 diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsInput_lit.vert b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsInput_lit.vert index 0cd181799b..225820996d 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsInput_lit.vert +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsInput_lit.vert @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call i16 @lgc.load.vertex.input__i16{{.*}} ; SHADERTEST-DAG: call <3 x i16> @lgc.load.vertex.input__v3i16{{.*}} ; SHADERTEST-DAG: call half @lgc.load.vertex.input__f16{{.*}} diff --git a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsOutput_lit.vert b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsOutput_lit.vert index 183b420fe3..11b10ba14f 100644 --- a/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsOutput_lit.vert +++ b/llpc/test/shaderdb/extensions/Ext16bitStorage_TestVsOutput_lit.vert @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f16 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}i16 diff --git a/llpc/test/shaderdb/extensions/ExtBufferReference_TestPointerCasting.frag b/llpc/test/shaderdb/extensions/ExtBufferReference_TestPointerCasting.frag index 563527aed5..b7003fc6fa 100644 --- a/llpc/test/shaderdb/extensions/ExtBufferReference_TestPointerCasting.frag +++ b/llpc/test/shaderdb/extensions/ExtBufferReference_TestPointerCasting.frag @@ -44,7 +44,7 @@ void main() ; SHADERTEST: [[ptoi:%[0-9]*]] = ptrtoint ptr addrspace(1) [[ld2]] to i64 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestDemote.frag b/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestDemote.frag index 56d76bb7a3..f2eafbef1f 100644 --- a/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestDemote.frag +++ b/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestDemote.frag @@ -1,9 +1,9 @@ // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call void (...) @lgc.create.demote.to.helper.invocation() -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.wqm.demote(i1 false) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestIsHelperInvocation.frag b/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestIsHelperInvocation.frag index 9e19f325de..4eb2042f13 100644 --- a/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestIsHelperInvocation.frag +++ b/llpc/test/shaderdb/extensions/ExtDemoteToHelper_TestIsHelperInvocation.frag @@ -1,9 +1,9 @@ // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call i1 (...) @lgc.create.is.helper.invocation.i1() -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i1 @llvm.amdgcn.live.mask() ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestComputeShader_lit.comp b/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestComputeShader_lit.comp index af17920d42..c167b9bb76 100644 --- a/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestComputeShader_lit.comp +++ b/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestComputeShader_lit.comp @@ -16,7 +16,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.read.builtin.input.i32(i32 4438, ; SHADERTEST-LABEL: {{^// LLPC}} final ELF info ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestGraphicsShader_lit.vert b/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestGraphicsShader_lit.vert index bbf12c367d..cd95941965 100644 --- a/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestGraphicsShader_lit.vert +++ b/llpc/test/shaderdb/extensions/ExtDeviceGroup_TestGraphicsShader_lit.vert @@ -9,7 +9,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.read.builtin.input.i32(i32 4438, ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestBuiltIn_lit.frag b/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestBuiltIn_lit.frag index 0a8111b6ae..43ac3902ba 100644 --- a/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestBuiltIn_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestBuiltIn_lit.frag @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call <3 x float> @lgc.input.import.builtin.BaryCoordPullModel.v3f32.i32 ; SHADERTEST-DAG: call <2 x float> @lgc.input.import.builtin.BaryCoordSmoothSample.v2f32.i32 ; SHADERTEST-DAG: call <2 x float> @lgc.input.import.builtin.BaryCoordSmoothCentroid.v2f32.i32 diff --git a/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestInterpFunc_lit.frag b/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestInterpFunc_lit.frag index 0fb4bc6e10..9f55fa4d63 100644 --- a/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestInterpFunc_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtExplicitVertexParam_TestInterpFunc_lit.frag @@ -20,7 +20,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <2 x float> @InterpolateAtVertexAMD.v2f32.p64.i32 ; SHADERTEST: call <2 x i32> @InterpolateAtVertexAMD.v2i32.p64.i32 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <2 x float> (...) @lgc.create.read.generic.input.v2f32{{.*}} ; SHADERTEST: call <2 x i32> (...) @lgc.create.read.generic.input.v2i32{{.*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/ExtFragMask_TestFragFetch_lit.frag b/llpc/test/shaderdb/extensions/ExtFragMask_TestFragFetch_lit.frag index dbb43efc23..00373da6d2 100644 --- a/llpc/test/shaderdb/extensions/ExtFragMask_TestFragFetch_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtFragMask_TestFragFetch_lit.frag @@ -32,13 +32,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 6, i32 512, ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 2, i32 512, ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 7, i32 512, ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 1, i32 544, ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 6, i32 544, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.load.2d.i32.i16{{(\.v8i32)?}}(i32 1, i16 2, i16 3, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call {{.*}} <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32{{(\.v8i32)?}}(i32 15, i32 2, i32 3, i32 ; SHADERTEST: call i32 @llvm.amdgcn.image.load.3d.i32.i16{{(\.v8i32)?}}(i32 1, i16 2, i16 3, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/extensions/ExtGcnShader_TestBuiltInFunc_lit.frag b/llpc/test/shaderdb/extensions/ExtGcnShader_TestBuiltInFunc_lit.frag index ef5d99dd3b..916688aa07 100644 --- a/llpc/test/shaderdb/extensions/ExtGcnShader_TestBuiltInFunc_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtGcnShader_TestBuiltInFunc_lit.frag @@ -22,11 +22,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.cube.face.index.f32(<3 x float> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <2 x float> (...) @lgc.create.cube.face.coord.v2f32(<3 x float> ; SHADERTEST: = call i64 (...) @lgc.create.read.clock.i64(i1 false) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} float @llvm.amdgcn.cubeid ; SHADERTEST: call {{.*}} float @llvm.amdgcn.cubema ; SHADERTEST: call {{.*}} float @llvm.amdgcn.cubesc diff --git a/llpc/test/shaderdb/extensions/ExtMultiView_TestSubpassLoad_lit.pipe b/llpc/test/shaderdb/extensions/ExtMultiView_TestSubpassLoad_lit.pipe index 54bf3513dc..0f31a3d6cd 100644 --- a/llpc/test/shaderdb/extensions/ExtMultiView_TestSubpassLoad_lit.pipe +++ b/llpc/test/shaderdb/extensions/ExtMultiView_TestSubpassLoad_lit.pipe @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 608, ptr addrspace(4) ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestArithmeticAMD_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestArithmeticAMD_lit.frag index a608569416..6a7ddaed58 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestArithmeticAMD_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestArithmeticAMD_lit.frag @@ -2,6 +2,8 @@ #extension GL_ARB_gpu_shader_int64: enable #extension GL_AMD_shader_ballot: enable +#extension GL_NV_shader_subgroup_partitioned: enable +#extension GL_EXT_shader_subgroup_extended_types_int64: enable layout(location = 0) out vec4 fv4Out; @@ -179,6 +181,8 @@ void main() fv4.xy += vec2(maxInvocationsExclusiveScanNonUniformAMD(i64v2In)); fv4.xy += vec2(maxInvocationsExclusiveScanNonUniformAMD(u64v2In)); + fv4.xy += vec2(subgroupPartitionedExclusiveXorNV(u64v2In, uvec4(0xff, 0, 0, 0))); + fv4Out = fv4; } // BEGIN_SHADERTEST @@ -454,6 +458,7 @@ void main() ; SHADERTEST: call i64 (...) @lgc.create.subgroup.clustered.exclusive.i64(i32 7, ; SHADERTEST: call i64 (...) @lgc.create.subgroup.clustered.exclusive.i64(i32 8, ; SHADERTEST: call i64 (...) @lgc.create.subgroup.clustered.exclusive.i64(i32 8, +; SHADERTEST: call <2 x i64> (...) @lgc.create.subgroup.clustered.multi.exclusive.v2i64(i32 12, ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestGeneral_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestGeneral_lit.frag index 7ac158236f..6a97175545 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestGeneral_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestGeneral_lit.frag @@ -34,13 +34,13 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <4 x i32> (...) @lgc.create.subgroup.ballot.v4i32( ; SHADERTEST: call i32 (...) @lgc.create.subgroup.broadcast.i32( ; SHADERTEST: call i32 (...) @lgc.create.subgroup.broadcast.first.i32( ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.subgroup.broadcast.f32( ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.subgroup.broadcast.first.f32( -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: mbcnt_lo ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestMiscAMD_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestMiscAMD_lit.frag index 311d82ca6a..a568289145 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestMiscAMD_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestMiscAMD_lit.frag @@ -28,7 +28,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <4 x i32> (...) @lgc.create.subgroup.ballot.v4i32( ; SHADERTEST: call i32 (...) @lgc.create.subgroup.mbcnt.i32( ; SHADERTEST: call <2 x i32> (...) @lgc.create.subgroup.write.invocation.v2i32( diff --git a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestSwizzleAMD_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestSwizzleAMD_lit.frag index 38490f15e6..55635cf5a3 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderBallot_TestSwizzleAMD_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderBallot_TestSwizzleAMD_lit.frag @@ -26,7 +26,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <2 x i32> (...) @lgc.create.subgroup.swizzle.quad.v2i32(<2 x i32> %{{[0-9]*}}, <4 x i32> ) ; SHADERTEST: call <3 x i32> (...) @lgc.create.subgroup.swizzle.quad.v3i32(<3 x i32> %{{[0-9]*}}, <4 x i32> ) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.subgroup.swizzle.quad.v4f32(<4 x float> %{{[0-9]*}}, <4 x i32> ) diff --git a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestArithmeticOp_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestArithmeticOp_lit.frag index 4f57a44a33..cfff330b65 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestArithmeticOp_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestArithmeticOp_lit.frag @@ -27,13 +27,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: fadd reassoc nnan nsz arcp contract afn <4 x half> %{{[0-9]*}}, %{{[0-9]*}} ; SHADERTEST: fmul reassoc nnan nsz arcp contract afn <4 x half> %{{[0-9]*}}, %{{[0-9]*}} ; SHADERTEST: fsub reassoc nnan nsz arcp contract afn <4 x half> %{{[0-9]*}}, %{{[0-9]*}} ; SHADERTEST: fdiv reassoc nnan nsz arcp contract afn <4 x half> {{(splat \(half 0xH3C00\))|()}}, ; SHADERTEST: fmul reassoc nnan nsz arcp contract afn <4 x half> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestCommonFuncs_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestCommonFuncs_lit.frag index fd2cccdbea..f564b06e4d 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestCommonFuncs_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestCommonFuncs_lit.frag @@ -68,9 +68,9 @@ void main() ; SHADERTEST: = call <3 x i16> (...) @lgc.create.extract.exponent.v3i16(<3 x half> ; SHADERTEST: = call reassoc nsz arcp contract afn <3 x half> (...) @lgc.create.ldexp.v3f16(<3 x half> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.fmax.v3f16(<3 x half> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestDerivFuncs_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestDerivFuncs_lit.frag index 3ac374f80d..cb1359dc5c 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestDerivFuncs_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestDerivFuncs_lit.frag @@ -29,7 +29,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.derivative.v3f16(<3 x half> %{{.*}}, i1 false, i1 false) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.derivative.v3f16(<3 x half> %{{.*}}, i1 true, i1 false) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.derivative.v3f16(<3 x half> %{{.*}}, i1 false, i1 true) @@ -51,7 +51,7 @@ void main() ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> @llvm.fabs.v3f16( ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> @llvm.fabs.v3f16( ; SHADERTEST: = fadd reassoc nnan nsz arcp contract afn <3 x half> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestExponentialFuncs_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestExponentialFuncs_lit.frag index e2cc43473f..cf4b34f049 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestExponentialFuncs_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestExponentialFuncs_lit.frag @@ -40,7 +40,7 @@ void main() ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> @llvm.log2.v3f16(<3 x half> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.sqrt.v3f16(<3 x half> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.inverse.sqrt.v3f16(<3 x half> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestInterpFuncs_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestInterpFuncs_lit.frag index a0f8bfaa3f..9153d1dd62 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestInterpFuncs_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestInterpFuncs_lit.frag @@ -19,9 +19,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST-COUNT-3:call reassoc nnan nsz arcp contract afn <4 x half> (...) @lgc.input.import.interpolated__v4f16(i1 false, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-12: = call i32 @llvm.amdgcn.mov.dpp.i32(i32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestMatrixFuncs_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestMatrixFuncs_lit.frag index 9772fe4672..699f089d89 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestMatrixFuncs_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestMatrixFuncs_lit.frag @@ -47,8 +47,8 @@ void main() ; SHADERTEST: = call {{.*}}[2 x <2 x half>] (...) @lgc.create.matrix.inverse.a2v2f16([2 x <2 x half>] % ; SHADERTEST: = call {{.*}}[3 x <3 x half>] (...) @lgc.create.matrix.inverse.a3v3f16([3 x <3 x half>] % ; SHADERTEST: = call {{.*}}[4 x <4 x half>] (...) @lgc.create.matrix.inverse.a4v4f16([4 x <4 x half>] % -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestPackUnpackFuncs_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestPackUnpackFuncs_lit.frag index 5eec5ffa43..12679609db 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestPackUnpackFuncs_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderFloat16_TestPackUnpackFuncs_lit.frag @@ -19,10 +19,10 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = load <2 x half>, ptr addrspace(7) %{{[0-9]*}}, align 4 ; SHADERTEST: store <2 x half> %{{[0-9]*}}, ptr addrspace(7) %{{[0-9]*}}, align 4 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderInt64_TestBuiltInFunc_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderInt64_TestBuiltInFunc_lit.frag index f60fedae5b..113d755e13 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderInt64_TestBuiltInFunc_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderInt64_TestBuiltInFunc_lit.frag @@ -63,8 +63,8 @@ void main() ; SHADERTEST: bitcast <3 x double> %{{[0-9]*}} to <3 x i64> ; SHADERTEST: bitcast <3 x i64> %{{[0-9]*}} to <3 x double> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestSharedVarLoadStore_lit.comp b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestSharedVarLoadStore_lit.comp index 4c43ca83ff..72735bc323 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestSharedVarLoadStore_lit.comp +++ b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestSharedVarLoadStore_lit.comp @@ -43,9 +43,9 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-4: getelementptr {{.*}}[4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }], ptr addrspace(3) @{{.*}}, i32 0, i32 {{%?[0-9]+}}, i32 {{[0-3]}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load i8, ptr addrspace(3) @{{.*}}, align {{1|4}} ; SHADERTEST: store i8 %{{[0-9]*}}, ptr addrspace(3) @{{.*}}, align {{1|4}} ; SHADERTEST-COUNT-3: load <{{[2-4]}} x i8>, ptr addrspace(3) getelementptr inbounds {{(nuw )?}}(i8, ptr addrspace(3) @{{.*}}, i32 {{14|28|44}}), align {{[2|4]}} diff --git a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestShiftOp_lit.comp b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestShiftOp_lit.comp index 690315d4a1..10001377f2 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestShiftOp_lit.comp +++ b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestShiftOp_lit.comp @@ -22,11 +22,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = ashr i8 %{{[0-9]*}}, 3 ; SHADERTEST: %{{[0-9]*}} = lshr i8 %{{[0-9]*}}, 3 ; SHADERTEST: %{{[0-9]*}} = shl i8 %{{[0-9]*}}, 3 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestTypeConvert_lit.comp b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestTypeConvert_lit.comp index 53aa8fdbdd..99e0f51997 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestTypeConvert_lit.comp +++ b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestTypeConvert_lit.comp @@ -81,7 +81,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: fptosi half %{{[0-9]*}} to i8 ; SHADERTEST: fptosi float %{{[0-9]*}} to i8 ; SHADERTEST: fptosi double %{{[0-9]*}} to i8 @@ -94,7 +94,7 @@ void main() ; SHADERTEST: uitofp i8 %{{[0-9]*}} to half ; SHADERTEST: uitofp i8 %{{[0-9]*}} to float ; SHADERTEST: uitofp i8 %{{[0-9]*}} to double -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestVsInOut_lit.vert b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestVsInOut_lit.vert index 4a910de00b..b831ea6c4d 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderInt8_TestVsInOut_lit.vert +++ b/llpc/test/shaderdb/extensions/ExtShaderInt8_TestVsInOut_lit.vert @@ -17,10 +17,10 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic.i32.i32.i8(i32 0, i32 0, i8 %{{[0-9]*}}) ; SHADERTEST: call void @lgc.output.export.generic.i32.i32.v3i8(i32 1, i32 0, <3 x i8> %{{[0-9]*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32(i32 {{.*}}32, i32 {{.*}}1, float %{{[0-9]*}}, float poison, float poison, float poison, i1 {{.*}}false, i1 {{.*}}false) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/ExtShaderVote_TestGeneral_lit.frag b/llpc/test/shaderdb/extensions/ExtShaderVote_TestGeneral_lit.frag index 2c0917fc4a..1e84697ff3 100644 --- a/llpc/test/shaderdb/extensions/ExtShaderVote_TestGeneral_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtShaderVote_TestGeneral_lit.frag @@ -33,7 +33,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i1 @lgc.subgroup.any( ; SHADERTEST: call i1 @lgc.subgroup.all( ; SHADERTEST: call i1 (...) @lgc.subgroup.all.equal( diff --git a/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadBroadcast.frag b/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadBroadcast.frag index 39feccf067..e7b4f405ed 100644 --- a/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadBroadcast.frag +++ b/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadBroadcast.frag @@ -1,12 +1,12 @@ // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.subgroup.quad.broadcast.f32 ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.subgroup.quad.broadcast.f32 ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.subgroup.quad.broadcast.f32 ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.subgroup.quad.broadcast.f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 ; SHADERTEST: call i32 @llvm.amdgcn.wqm ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 diff --git a/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapDiagonal.frag b/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapDiagonal.frag index b5d9c1415a..753cd6ef20 100644 --- a/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapDiagonal.frag +++ b/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapDiagonal.frag @@ -1,9 +1,9 @@ // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.subgroup.quad.swap.diagonal.v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 diff --git a/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapVertical.frag b/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapVertical.frag index 1ac20cd81a..0cabc32750 100644 --- a/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapVertical.frag +++ b/llpc/test/shaderdb/extensions/ExtSubgroupQuad_TestSubgroupQuadSwapVertical.frag @@ -1,9 +1,9 @@ // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.subgroup.quad.swap.vertical.v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 ; SHADERTEST: call i32 @llvm.amdgcn.mov.dpp.i32 diff --git a/llpc/test/shaderdb/extensions/ExtTrinaryMinMax_TestGeneral_lit.frag b/llpc/test/shaderdb/extensions/ExtTrinaryMinMax_TestGeneral_lit.frag index 8a40357ac6..6114d7f0a1 100644 --- a/llpc/test/shaderdb/extensions/ExtTrinaryMinMax_TestGeneral_lit.frag +++ b/llpc/test/shaderdb/extensions/ExtTrinaryMinMax_TestGeneral_lit.frag @@ -43,7 +43,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/ExtXfb_TessGsDoubleOutput_lit.geom b/llpc/test/shaderdb/extensions/ExtXfb_TessGsDoubleOutput_lit.geom index 56fbe730fc..e2690b4086 100644 --- a/llpc/test/shaderdb/extensions/ExtXfb_TessGsDoubleOutput_lit.geom +++ b/llpc/test/shaderdb/extensions/ExtXfb_TessGsDoubleOutput_lit.geom @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<3 x double> ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f64 ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<2 x double> diff --git a/llpc/test/shaderdb/extensions/ExtXfb_TestGsFloatOutput_lit.geom b/llpc/test/shaderdb/extensions/ExtXfb_TestGsFloatOutput_lit.geom index ff4e64d3bd..16d0c2fd3a 100644 --- a/llpc/test/shaderdb/extensions/ExtXfb_TestGsFloatOutput_lit.geom +++ b/llpc/test/shaderdb/extensions/ExtXfb_TestGsFloatOutput_lit.geom @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<3 x float> ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<2 x float> diff --git a/llpc/test/shaderdb/extensions/ExtXfb_TestTesDoubleOutput_lit.tese b/llpc/test/shaderdb/extensions/ExtXfb_TestTesDoubleOutput_lit.tese index 472fcd35a0..9b6e9268ec 100644 --- a/llpc/test/shaderdb/extensions/ExtXfb_TestTesDoubleOutput_lit.tese +++ b/llpc/test/shaderdb/extensions/ExtXfb_TestTesDoubleOutput_lit.tese @@ -15,7 +15,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<3 x double> ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f64 ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<2 x double> diff --git a/llpc/test/shaderdb/extensions/ExtXfb_TestTesFloatOutput_lit.tese b/llpc/test/shaderdb/extensions/ExtXfb_TestTesFloatOutput_lit.tese index 42c1e5447e..5415518acb 100644 --- a/llpc/test/shaderdb/extensions/ExtXfb_TestTesFloatOutput_lit.tese +++ b/llpc/test/shaderdb/extensions/ExtXfb_TestTesFloatOutput_lit.tese @@ -15,7 +15,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<3 x float> ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<2 x float> diff --git a/llpc/test/shaderdb/extensions/ExtXfb_TestVsDoubleOutput_lit.vert b/llpc/test/shaderdb/extensions/ExtXfb_TestVsDoubleOutput_lit.vert index fa02a91e75..a2f18f3e9d 100644 --- a/llpc/test/shaderdb/extensions/ExtXfb_TestVsDoubleOutput_lit.vert +++ b/llpc/test/shaderdb/extensions/ExtXfb_TestVsDoubleOutput_lit.vert @@ -13,7 +13,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<3 x double> ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f64 ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<2 x double> diff --git a/llpc/test/shaderdb/extensions/ExtXfb_TestVsFloatOutput_lit.vert b/llpc/test/shaderdb/extensions/ExtXfb_TestVsFloatOutput_lit.vert index c42087575f..047c985ed4 100644 --- a/llpc/test/shaderdb/extensions/ExtXfb_TestVsFloatOutput_lit.vert +++ b/llpc/test/shaderdb/extensions/ExtXfb_TestVsFloatOutput_lit.vert @@ -13,7 +13,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<3 x float> ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: call void (...) @lgc.write.xfb.output({{.*}}<2 x float> diff --git a/llpc/test/shaderdb/extensions/ObjFloat16_TestTrinaryMinMaxFuncs_lit.frag b/llpc/test/shaderdb/extensions/ObjFloat16_TestTrinaryMinMaxFuncs_lit.frag index 131337cbfe..0dea52a0e3 100644 --- a/llpc/test/shaderdb/extensions/ObjFloat16_TestTrinaryMinMaxFuncs_lit.frag +++ b/llpc/test/shaderdb/extensions/ObjFloat16_TestTrinaryMinMaxFuncs_lit.frag @@ -29,7 +29,7 @@ void main() ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.fmin3.v3f16(<3 x half> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.fmax3.v3f16(<3 x half> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> (...) @lgc.create.fmid3.v3f16(<3 x half> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> @llvm.minnum.v3f16(<3 x half> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> @llvm.minnum.v3f16(<3 x half> ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x half> @llvm.maxnum.v3f16(<3 x half> @@ -37,7 +37,7 @@ void main() ; SHADERTEST: = call reassoc nnan nsz arcp contract afn half @llvm.amdgcn.fmed3.f16(half ; SHADERTEST: = call reassoc nnan nsz arcp contract afn half @llvm.amdgcn.fmed3.f16(half ; SHADERTEST: = call reassoc nnan nsz arcp contract afn half @llvm.amdgcn.fmed3.f16(half -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: AMDLLPC SUCCESS */ // END_SHADERTEST diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFloorDouble_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFloorDouble_lit.frag index d9f239b465..3143c015c2 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFloorDouble_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFloorDouble_lit.frag @@ -19,10 +19,10 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.floor.f64(double %{{[0-9]*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.floor.f64(double %{{[0-9]*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.floor.f64(double %{{[0-9]*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.floor.f64(double ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFloorFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFloorFloat_lit.frag index 170d16a8df..074fa467a1 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFloorFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFloorFloat_lit.frag @@ -19,10 +19,10 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.floor.f32(float %{{[0-9]*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <3 x float> @llvm.floor.v3f32(<3 x float> %{{[0-9]*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.floor.f32(float %{{[0-9]*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.floor.f32(float %{{[0-9]*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFloorVec4Const_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFloorVec4Const_lit.frag index 2228f7ac4e..252ac7e59a 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFloorVec4Const_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFloorVec4Const_lit.frag @@ -14,7 +14,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.floor.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.floor.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.floor.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.floor.f32(float diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFractDouble_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFractDouble_lit.frag index 7881a05e3f..ca88c09324 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFractDouble_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFractDouble_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract double (...) @lgc.create.fract.f64(double ; SHADERTEST: = call reassoc nnan nsz arcp contract <3 x double> (...) @lgc.create.fract.v3f64(<3 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.amdgcn.fract.f64(double %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.amdgcn.fract.f64(double %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFractFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFractFloat_lit.frag index 1cb9eacbae..0579580da3 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFractFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFractFloat_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.fract.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.fract.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fract.f32(float %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fract.f32(float %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFractVec4Const-lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFractVec4Const-lit.frag index b8101038b4..828a76bf45 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFractVec4Const-lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFractVec4Const-lit.frag @@ -14,7 +14,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.fract.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fract.f32(float %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fract.f32(float %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.amdgcn.fract.f32(float %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpDouble_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpDouble_lit.frag index efc5de5998..3f556fecb6 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpDouble_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpDouble_lit.frag @@ -27,7 +27,7 @@ void main() ; SHADERTEST: = call i32 (...) @lgc.create.extract.exponent.i32(double ; SHADERTEST: = call <3 x double> (...) @lgc.create.extract.significand.v3f64(<3 x double> ; SHADERTEST: = call <3 x i32> (...) @lgc.create.extract.exponent.v3i32(<3 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call double @llvm.amdgcn.frexp.mant.f64(double %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call double @llvm.amdgcn.frexp.mant.f64(double %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call i32 @llvm.amdgcn.frexp.exp.i32.f64(double %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpFloat_lit.frag index f0eabd34bc..35be3c7b2e 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpFloat_lit.frag @@ -26,7 +26,7 @@ void main() ; SHADERTEST: = call i32 (...) @lgc.create.extract.exponent.i32(float ; SHADERTEST: = call <3 x float> (...) @lgc.create.extract.significand.v3f32(<3 x float> ; SHADERTEST: = call <3 x i32> (...) @lgc.create.extract.exponent.v3i32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.frexp.mant.f32(float %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.frexp.mant.f32(float %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call i32 @llvm.amdgcn.frexp.exp.i32.f32(float %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructDouble_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructDouble_lit.frag index a5635207d0..4bb58528a7 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructDouble_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructDouble_lit.frag @@ -19,7 +19,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call double (...) @lgc.create.extract.significand.f64(double ; SHADERTEST: = call i32 (...) @lgc.create.extract.exponent.i32(double -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call double @llvm.amdgcn.frexp.mant.f64(double %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call i32 @llvm.amdgcn.frexp.exp.i32.f64(double %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructFloat_lit.frag index 502c1fa5d0..489e15d34b 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructFloat_lit.frag @@ -17,7 +17,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call float (...) @lgc.create.extract.significand.f32(float ; SHADERTEST: = call i32 (...) @lgc.create.extract.exponent.i32(float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.frexp.mant.f32(float %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call i32 @llvm.amdgcn.frexp.exp.i32.f32(float %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructVec4_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructVec4_lit.frag index 2eb7dd66f3..9dd08ba611 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructVec4_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestFrexpStructVec4_lit.frag @@ -17,7 +17,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call <4 x float> (...) @lgc.create.extract.significand.v4f32(<4 x float> ; SHADERTEST: = call <4 x i32> (...) @lgc.create.extract.exponent.v4i32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-DAG: = call float @llvm.amdgcn.frexp.mant.f32(float ; SHADERTEST-DAG: = call i32 @llvm.amdgcn.frexp.exp.i32.f32(float ; SHADERTEST-DAG: = call float @llvm.amdgcn.frexp.mant.f32(float diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestIntBitsToFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestIntBitsToFloat_lit.frag index db7d05ef85..7e3ac1eb30 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestIntBitsToFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestIntBitsToFloat_lit.frag @@ -18,9 +18,9 @@ void main() ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = bitcast <3 x i32> %{{.*}} to <3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <3 x float>, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[a-z]*}} = bitcast <2 x i32> %{{.*}} to <2 x float> ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroidNoPersp_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroidNoPersp_lit.frag index 418249d4ae..fa7d248ce3 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroidNoPersp_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroidNoPersp_lit.frag @@ -4,10 +4,10 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @interpolateAtCentroid.f32.p64(ptr addrspace(64) @{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtCentroid.v4f32.p64(ptr addrspace(64) @{{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[A-Za-z0-9]*}} = call reassoc nnan nsz arcp contract afn <2 x float> @lgc.input.import.builtin.InterpLinearCentroid.v2f32.i32(i32 268435462) ; SHADERTEST: %{{[A-Za-z0-9]*}} = call reassoc nnan nsz arcp contract afn <2 x float> @lgc.input.import.builtin.InterpPerspCentroid.v2f32.i32(i32 268435458) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p1(float %{{.*}}, i32 0, i32 0, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p2(float %{{.*}}, float %{{.*}}, i32 0, i32 0, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p1(float %{{.*}}, i32 1, i32 1, i32 %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroid_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroid_lit.frag index 9548cf3593..fca5cfb18c 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroid_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtCentroid_lit.frag @@ -19,10 +19,10 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @interpolateAtCentroid.f32.p64(ptr addrspace(64) @{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtCentroid.v4f32.p64(ptr addrspace(64) @{{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[A-Za-z0-9]*}} = call reassoc nnan nsz arcp contract afn <2 x float> @lgc.input.import.builtin.InterpPerspCentroid.v2f32.i32(i32 268435458) ; SHADERTEST: %{{[A-Za-z0-9]*}} = call reassoc nnan nsz arcp contract afn <2 x float> @lgc.input.import.builtin.InterpPerspCentroid.v2f32.i32(i32 268435458) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p1(float %{{.*}}, i32 0, i32 0, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p2(float %{{.*}}, float %{{.*}}, i32 0, i32 0, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p1(float %{{.*}}, i32 1, i32 1, i32 %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtOffset_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtOffset_lit.frag index 4788fe0532..502778d411 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtOffset_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtOffset_lit.frag @@ -24,7 +24,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @interpolateAtOffset.f32.p64.v2f32(ptr addrspace(64) @{{.*}}, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtOffset.v4f32.p64.v2f32(ptr addrspace(64) @{{.*}}, <2 x float> %{{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <2 x float> (...) @lgc.eval.Ij.offset.smooth__v2f32(<2 x float> ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.input.import.interpolated__f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 0, <2 x float> ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtSample_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtSample_lit.frag index ba582c3bfd..724ea9dac0 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtSample_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateAtSample_lit.frag @@ -24,12 +24,12 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @interpolateAtSample.f32.p64.i32(ptr addrspace(64) @{{.*}}, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtSample.v4f32.p64.i32(ptr addrspace(64) @{{.*}}, i32 %{{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <2 x float> @lgc.input.import.builtin.SamplePosOffset.v2f32.i32.i32(i32 268435463 ; SHADERTEST: call reassoc nnan nsz arcp contract afn <2 x float> (...) @lgc.eval.Ij.offset.smooth__v2f32(<2 x float> ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.input.import.interpolated__f32(i1 false ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p1(float %{{.*}}, i32 0, i32 0, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.p2(float %{{.*}}, float %{{.*}}, i32 0, i32 0, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call float @llvm.amdgcn.interp.mov(i32 {{.*}}2, i32 1, i32 1, i32 %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArray.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArray.frag index 178c858f48..ec2e380f7d 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArray.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArray.frag @@ -16,7 +16,7 @@ void main() ; RUN: amdllpc -verify-ir -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtOffset.v4f32.p64.v2f32(ptr addrspace(64) %{{.*}}, <2 x float> {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST-COUNT-4: call reassoc nnan nsz arcp contract afn <2 x float> (...) @lgc.eval.Ij.offset.smooth__v2f32(<2 x float> ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArrayInStruct.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArrayInStruct.frag index be8e131210..391b81a616 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArrayInStruct.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DArrayInStruct.frag @@ -27,7 +27,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtOffset.v4f32.p64.v2f32({{<4 x float> addrspace\(64\)\*|ptr addrspace\(64\)}} %{{.*}}, <2 x float> {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST-COUNT-5: call reassoc nnan nsz arcp contract afn <2 x float> (...) @lgc.eval.Ij.offset.smooth__v2f32(<2 x float> zeroinitializer) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DStructArray.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DStructArray.frag index bb16655cd6..d2ea081063 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DStructArray.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx1DStructArray.frag @@ -25,7 +25,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST-DAG: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 3, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST-DAG: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 7, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST-DAG: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 11, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStruct.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStruct.frag index 4981f61cb2..e9dce82017 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStruct.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStruct.frag @@ -27,7 +27,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtOffset.v4f32.p64.v2f32(ptr addrspace(64) %{{.*}}, <2 x float> {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 2, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 3, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 4, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStructInArray.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStructInArray.frag index 64a04043dd..97da0627ac 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStructInArray.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DArrayInStructInArray.frag @@ -29,7 +29,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtOffset.v4f32.p64.v2f32(ptr addrspace(64) %{{.*}}, <2 x float> {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 12, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 13, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 14, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DStructArray.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DStructArray.frag index 5cad2538f1..bb1d764915 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DStructArray.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx2DStructArray.frag @@ -26,7 +26,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtOffset.v4f32.p64.v2f32(ptr addrspace(64) %{{.*}}, <2 x float> {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 2, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 5, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 8, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx3DArray.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx3DArray.frag index f900c0c57a..88770c34c7 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx3DArray.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdx3DArray.frag @@ -15,7 +15,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @interpolateAtOffset.v4f32.p64.v2f32(ptr addrspace(64) %{{.*}}, <2 x float> {{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 3, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 4, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.input.import.interpolated__v4f32(i1 false, i32 5, i32 0, i32 0, i32 poison, i32 0, <2 x float> %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdxVector.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdxVector.frag index 4133e86480..f635160b4f 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdxVector.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestInterpolateDynIdxVector.frag @@ -19,7 +19,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST-COUNT-2: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @interpolateAtSample.f32.p64.i32(ptr addrspace(64) %{{.*}}, i32 %{{.*}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <2 x float> (...) @lgc.input.import.interpolated__v2f32(i1 false, i32 0 ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.input.import.interpolated__f32(i1 false, i32 1 : SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.input.import.interpolated__f32(i1 false, i32 2 diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpDouble_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpDouble_lit.frag index fe470e2f1d..55f7d480dd 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpDouble_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpDouble_lit.frag @@ -25,7 +25,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract double (...) @lgc.create.ldexp.f64(double ; SHADERTEST: = call reassoc nnan nsz arcp contract <3 x double> (...) @lgc.create.ldexp.v3f64(<3 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.ldexp.f64.i32(double %{{.*}}, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract double @llvm.ldexp.f64.i32(double %{{.*}}, i32 %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpFloat_lit.frag index 6e2a5036fc..99fa46a12e 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpFloat_lit.frag @@ -25,7 +25,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.ldexp.f32(float %{{.*}}, i32 ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.ldexp.v3f32(<3 x float> %{{.*}}, <3 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.ldexp.f32.i32(float %{{.*}}, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.ldexp.f32.i32(float %{{.*}}, i32 %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpVec4_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpVec4_lit.frag index 11f315ea36..24e2ed586c 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpVec4_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestLdexpVec4_lit.frag @@ -15,7 +15,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.ldexp.v4f32(<4 x float> %{{.*}}, <4 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.ldexp.f32.i32(float %{{.*}}, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.ldexp.f32.i32(float %{{.*}}, i32 %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.ldexp.f32.i32(float %{{.*}}, i32 %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestLog2Vec4Const_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestLog2Vec4Const_lit.frag index 082869866c..3b583b6e35 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestLog2Vec4Const_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestLog2Vec4Const_lit.frag @@ -15,9 +15,9 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.log2.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.log2.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestLog2_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestLog2_lit.frag index f6faf26c9c..6db3f55901 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestLog2_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestLog2_lit.frag @@ -22,10 +22,10 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> @llvm.log2.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> @llvm.log2.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestLogVec4Const_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestLogVec4Const_lit.frag index 086fe726dc..44dc16de65 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestLogVec4Const_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestLogVec4Const_lit.frag @@ -15,9 +15,9 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ' SHADERTEST-LABEL: = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.log.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ' SHADERTEST-LABEL: = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.log.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestLog_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestLog_lit.frag index 657138c432..45fff82809 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestLog_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestLog_lit.frag @@ -22,10 +22,10 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.log.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.log.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.log.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.log.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.log2.f32(float ; SHADERTEST: = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0x3FE62E4300000000 ; SHADERTEST-NOT: = call{{.*}} @llvm.log2.f32(float diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestMaxBasic_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestMaxBasic_lit.frag index bcca682990..bcce222d7b 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestMaxBasic_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestMaxBasic_lit.frag @@ -17,7 +17,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.maxnum.v4f32(<4 x float> ; SHADERTEST: = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}) ; SHADERTEST: = call <4 x i32> @llvm.umax.v4i32(<4 x i32> %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestPow2_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestPow2_lit.frag index 461af2e7db..c6ce6a8b0a 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestPow2_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestPow2_lit.frag @@ -15,7 +15,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.power.f32(float 2.000000e+00, float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: = call float @llvm.amdgcn.frexp.mant.f32(float ; SHADERTEST: = call i32 @llvm.amdgcn.frexp.exp.i32.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.{{(ldexp.f32.i32\(float 1.000000e\+00, i32)|(exp2.f32\(float)}} diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestPowVec4Const_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestPowVec4Const_lit.frag index 1c5576a406..0c3b1e577b 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestPowVec4Const_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestPowVec4Const_lit.frag @@ -16,9 +16,9 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.power.v4f32(<4 x float> ; SHADERTEST: store float 1.200000e+01, ptr addrspace(5) %{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.pow.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: [[mul1:%.i[0-9]*]] = call reassoc nnan nsz arcp contract afn float @llvm.pow.f32(float ; SHADERTEST: [[mul2:%.i[0-9]*]] = call reassoc nnan nsz arcp contract afn float @llvm.pow.f32(float ; SHADERTEST: [[mul3:%.i[0-9]*]] = call reassoc nnan nsz arcp contract afn float @llvm.pow.f32(float diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestPow_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestPow_lit.frag index 794de19997..336ff43465 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestPow_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestPow_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.power.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.power.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.pow.f32(float %{{.*}}, float %{{.*}}) ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.pow.f32(float %{{.*}}, float %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestRadiansVec4Const_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestRadiansVec4Const_lit.frag index 896e4fb571..601bc0c2bc 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestRadiansVec4Const_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestRadiansVec4Const_lit.frag @@ -15,10 +15,10 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = fmul reassoc nnan nsz arcp contract afn <4 x float> %{{.*}}, {{(splat \(float 0x3F91DF46A0000000\))|()}} ; SHADERTEST: store float 0x3F9ACEEA00000000, ptr addrspace(5) %{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = fmul reassoc nnan nsz arcp contract afn <4 x float> %{{.*}}, ; SHADERTEST: = insertelement <4 x float> %{{.*}}, float 0x3F9ACEEA00000000, i{{32|64}} 0 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: [[mul1:%.i[0-9]*]] = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0x3F91DF46A0000000 ; SHADERTEST: [[mul2:%.i[0-9]*]] = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0x3F91DF46A0000000 ; SHADERTEST: [[mul3:%.i[0-9]*]] = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0x3F91DF46A0000000 diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestRadians_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestRadians_lit.frag index 2b2e3412b7..f7ede7f6da 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestRadians_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestRadians_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0x3F91DF46A0000000 ; SHADERTEST: = fmul reassoc nnan nsz arcp contract afn <3 x float> %{{[0-9]+}}, {{(splat \(float 0x3F91DF46A0000000\))|()}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0x3F91DF46A0000000 ; SHADERTEST: %{{.*}} = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0x3F91DF46A0000000 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestReflectFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestReflectFloat_lit.frag index ae5fdf450d..693b4fdf00 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestReflectFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestReflectFloat_lit.frag @@ -25,7 +25,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.reflect.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.reflect.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: = fmul nnan nsz arcp contract afn float ; SHADERTEST-NEXT: = fmul nnan nsz arcp contract afn float ; SHADERTEST-NEXT: = fmul nnan nsz arcp contract afn float diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestSignDouble_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestSignDouble_lit.frag index 1f1c06e992..960b94c1db 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestSignDouble_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestSignDouble_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract double (...) @lgc.create.fsign.f64(double ; SHADERTEST: = call reassoc nnan nsz arcp contract <3 x double> (...) @lgc.create.fsign.v3f64(<3 x double> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]*}} = fcmp reassoc nnan nsz arcp contract ogt double %{{.*}}, 0.000000e+00 ; SHADERTEST: %{{[0-9]*}} = fcmp reassoc nnan nsz arcp contract ogt double %{{.*}}, 0.000000e+00 ; SHADERTEST: %{{[0-9]*}} = fcmp reassoc nnan nsz arcp contract oge double %{{.*}}, 0.000000e+00 diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestSignFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestSignFloat_lit.frag index 1ef4b55c75..e886c3abed 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestSignFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestSignFloat_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.fsign.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.fsign.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = fcmp reassoc nnan nsz arcp contract afn ogt float %{{.*}}, 0.000000e+00 ; SHADERTEST: %{{[0-9]*}} = fcmp reassoc nnan nsz arcp contract afn ogt float %{{.*}}, 0.000000e+00 ; SHADERTEST: %{{[0-9]*}} = fcmp reassoc nnan nsz arcp contract afn oge float %{{.*}}, 0.000000e+00 diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestSignInt_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestSignInt_lit.frag index 029ced5ea9..8e05c8b5fc 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestSignInt_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestSignInt_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call i32 (...) @lgc.create.ssign.i32(i32 ; SHADERTEST: = call <3 x i32> (...) @lgc.create.ssign.v3i32(<3 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = icmp {{slt i32 %.*, 1|sgt i32 %.*, 0}} ; SHADERTEST: = select i1 %{{.*}}, {{i32 %.*, i32 1|i32 1, i32 %.*}} ; SHADERTEST: = icmp {{sgt i32 %.*, -1|sge i32 %.*, 0}} diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestSignIvec4_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestSignIvec4_lit.frag index 4f6b2dcfee..2609f36521 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestSignIvec4_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestSignIvec4_lit.frag @@ -13,7 +13,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call <4 x i32> (...) @lgc.create.ssign.v4i32(<4 x i32> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: = icmp {{slt i32 %.*, 1|sgt <4 x i32> %.*, zeroinitializer}} ; SHADERTEST-DAG: = select {{i1 %.*, i32 %.*, i32 1|<4 x i1> %.*, <4 x i32> ((splat \(i32 1\))|()), <4 x i32> %.*}} ; SHADERTEST-DAG: = icmp {{sgt i32 %.*, -1|sge <4 x i32> %.*, zeroinitializer}} diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestSinVec4Const_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestSinVec4Const_lit.frag index 717441f1b0..648fbf176c 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestSinVec4Const_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestSinVec4Const_lit.frag @@ -14,9 +14,9 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.sin.v4f32( -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.sin.v4f32( -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.sin.f32(float %{{.*}}) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.sin.f32(float %{{.*}}) ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.sin.f32(float %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestSin_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestSin_lit.frag index 0e63ee5814..9cb059d33f 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestSin_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestSin_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.sin.f32( ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> @llvm.sin.v3f32( -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float @llvm.sin.f32( ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> @llvm.sin.v3f32( ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestTanVec4Const_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestTanVec4Const_lit.frag index e47336ba60..64de8f3491 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestTanVec4Const_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestTanVec4Const_lit.frag @@ -12,9 +12,9 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.tan.v4f32(<4 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.sin.v4f32( ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.cos.v4f32( ; SHADERTEST: = fdiv reassoc nnan nsz arcp contract afn <4 x float> {{(splat \(float 1\.000000e\+00\))|( (...) @lgc.create.tan.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <3 x float> @llvm.sin.v3f32(<3 x float> ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn <3 x float> @llvm.cos.v3f32(<3 x float> ; SHADERTEST: %{{[0-9]*}} = fdiv reassoc nnan nsz arcp contract afn <3 x float> {{(splat \(float 1\.000000e\+00\))|()}}, diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestTanhFloat_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestTanhFloat_lit.frag index f81e8478f0..0752ca2e22 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestTanhFloat_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestTanhFloat_lit.frag @@ -13,7 +13,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.tanh.f32(float -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.fabs.f32(float %{{[0-9]*}}) ; SHADERTEST: %{{[0-9]*}} = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0xC007154760000000 ; SHADERTEST: %{{[0-9]*}} = call reassoc nnan nsz arcp contract afn float @llvm.exp2.f32(float %{{.*}}) diff --git a/llpc/test/shaderdb/extensions/OpExtInst_TestTanh_lit.frag b/llpc/test/shaderdb/extensions/OpExtInst_TestTanh_lit.frag index 4ab214d410..3ea57278da 100644 --- a/llpc/test/shaderdb/extensions/OpExtInst_TestTanh_lit.frag +++ b/llpc/test/shaderdb/extensions/OpExtInst_TestTanh_lit.frag @@ -22,7 +22,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: = call reassoc nnan nsz arcp contract afn float (...) @lgc.create.tanh.f32(float ; SHADERTEST: = call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.tanh.v3f32(<3 x float> -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{.*}} = call reassoc nnan nsz arcp contract afn float @llvm.fabs.f32(float %{{[0-9]*}}) ; SHADERTEST: %{{.*}} = fmul reassoc nnan nsz arcp contract afn float %{{.*}}, 0xC007154760000000 ; SHADERTEST: %{{.*}} = call reassoc nnan nsz arcp contract afn float @llvm.exp2.f32(float %{{.*}}) diff --git a/llpc/test/shaderdb/general/AggressiveInvariantLoads.pipe b/llpc/test/shaderdb/general/AggressiveInvariantLoads.pipe index cfb66fffa4..a46c998b67 100644 --- a/llpc/test/shaderdb/general/AggressiveInvariantLoads.pipe +++ b/llpc/test/shaderdb/general/AggressiveInvariantLoads.pipe @@ -1,6 +1,6 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: load <4 x i32>, ptr addrspace(4) %4, align 16, !invariant.load ; SHADERTEST: load <4 x float>, ptr addrspace(4) %4, align 16, !invariant.load ; SHADERTEST-LABEL: {{^// LLPC}} final pipeline module info diff --git a/llpc/test/shaderdb/general/CallInstAsUserOfGlobalVariable.spvasm b/llpc/test/shaderdb/general/CallInstAsUserOfGlobalVariable.spvasm index e75993c573..29771890c8 100644 --- a/llpc/test/shaderdb/general/CallInstAsUserOfGlobalVariable.spvasm +++ b/llpc/test/shaderdb/general/CallInstAsUserOfGlobalVariable.spvasm @@ -1,7 +1,7 @@ ; This test checks if lowerGlobal is handling properly case with removed zero-index GEPs. ; @_ug_input23 = external addrspace(7) global [2 x <{ [0 x float] }>], !spirv.Resource !2, !spirv.Block !1 -; %2 = call i32 @lgc.buffer.length(ptr addrspace(7) @_ug_input23, i32 0) +; %2 = call i64 @lgc.buffer.length(ptr addrspace(7) @_ug_input23, i64 0) @@ -9,11 +9,11 @@ ; CHECK-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; CHECK: @_ug_input23 = external addrspace(7) global [2 x <{ [0 x float] }>], !spirv.Resource !2, !spirv.Block !1 -; CHECK: call i32 @lgc.buffer.length(ptr addrspace(7) @_ug_input23, i32 0) +; CHECK: call i64 @lgc.buffer.length(ptr addrspace(7) @_ug_input23, i64 0) -; CHECK-LABEL: {{^// LLPC}} SPIR-V lowering results +; CHECK-LABEL: {{^// LLPC}} FE lowering results ; CHECK: %[[global:[0-9]+]] = call ptr addrspace(7) @lgc.load.buffer.desc(i64 2, i32 1, i32 0, i32 2) -; CHECK: call i32 @lgc.buffer.length(ptr addrspace(7) %[[global]], i32 0) +; CHECK: call i64 @lgc.buffer.length(ptr addrspace(7) %[[global]], i64 0) ; CHECK-LABEL: {{^}}===== AMDLLPC SUCCESS ===== diff --git a/llpc/test/shaderdb/general/CoherentArray.frag b/llpc/test/shaderdb/general/CoherentArray.frag index d45ca2f47b..472e487115 100644 --- a/llpc/test/shaderdb/general/CoherentArray.frag +++ b/llpc/test/shaderdb/general/CoherentArray.frag @@ -12,7 +12,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v --verify-ir %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1109917696, <4 x i32> %5, i32 0, i32 0, i32 1) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1109917696, <4 x i32> %5, i32 4, i32 0, i32 1) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1109917696, <4 x i32> %5, i32 8, i32 0, i32 1) diff --git a/llpc/test/shaderdb/general/DisableInvariantLoads.pipe b/llpc/test/shaderdb/general/DisableInvariantLoads.pipe index ea3712db98..6d93eb227a 100644 --- a/llpc/test/shaderdb/general/DisableInvariantLoads.pipe +++ b/llpc/test/shaderdb/general/DisableInvariantLoads.pipe @@ -1,6 +1,6 @@ ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-NOT: !invariant.load [VsGlsl] diff --git a/llpc/test/shaderdb/general/DiscardToDemoteTransformations.frag b/llpc/test/shaderdb/general/DiscardToDemoteTransformations.frag index cca20bbd98..8020c49246 100644 --- a/llpc/test/shaderdb/general/DiscardToDemoteTransformations.frag +++ b/llpc/test/shaderdb/general/DiscardToDemoteTransformations.frag @@ -8,9 +8,9 @@ // DISABLED-LABEL: {{^}}SPIR-V disassembly // DISABLED: {{^}} {{OpKill|OpTerminateInvocation}} // DISABLED: OpImageSampleImplicitLod -// DISABLED-LABEL: {{^}}// LLPC SPIR-V lowering results +// DISABLED-LABEL: {{^}}// LLPC FE lowering results // DISABLED: call void (...) @lgc.create.kill() -// DISABLED-LABEL: {{^}}// LLPC pipeline patching results +// DISABLED-LABEL: {{^}}// LLPC LGC lowering results // DISABLED: call void @llvm.amdgcn.kill(i1 false) // DISABLED-LABEL: {{^}}// LLPC final ELF info // DISABLED: _amdgpu_ps_main: @@ -24,9 +24,9 @@ // ENABLED-LABEL: {{^}}SPIR-V disassembly // ENABLED: {{^}} {{OpKill|OpTerminateInvocation}} // ENABLED: OpImageSampleImplicitLod -// ENABLED-LABEL: {{^}}// LLPC SPIR-V lowering results +// ENABLED-LABEL: {{^}}// LLPC FE lowering results // ENABLED: call void (...) @lgc.create.kill() -// ENABLED-LABEL: {{^}}// LLPC pipeline patching results +// ENABLED-LABEL: {{^}}// LLPC LGC lowering results // ENABLED: call void @llvm.amdgcn.kill(i1 false) // ENABLED-LABEL: {{^}}// LLPC final ELF info // ENABLED: _amdgpu_ps_main: diff --git a/llpc/test/shaderdb/general/DiscardToDemoteTransformationsNotRequired.frag b/llpc/test/shaderdb/general/DiscardToDemoteTransformationsNotRequired.frag index 6fb7bb605f..2e9baeb9b6 100644 --- a/llpc/test/shaderdb/general/DiscardToDemoteTransformationsNotRequired.frag +++ b/llpc/test/shaderdb/general/DiscardToDemoteTransformationsNotRequired.frag @@ -7,9 +7,9 @@ // CHECK: OpImageSampleImplicitLod // CHECK: {{^}} {{OpKill|OpTerminateInvocation}} // CHECK: OpImageRead -// CHECK-LABEL: {{^}}// LLPC SPIR-V lowering results +// CHECK-LABEL: {{^}}// LLPC FE lowering results // CHECK: call void (...) @lgc.create.kill() -// CHECK-LABEL: {{^}}// LLPC pipeline patching results +// CHECK-LABEL: {{^}}// LLPC LGC lowering results // CHECK: call void @llvm.amdgcn.kill(i1 false) // CHECK-NOT: "amdgpu-transform-discard-to-demote" // CHECK-LABEL: {{^}}// LLPC final ELF info diff --git a/llpc/test/shaderdb/general/ImgDescLoad.comp b/llpc/test/shaderdb/general/ImgDescLoad.comp index a4d63080a5..15166a8cf5 100644 --- a/llpc/test/shaderdb/general/ImgDescLoad.comp +++ b/llpc/test/shaderdb/general/ImgDescLoad.comp @@ -4,7 +4,7 @@ /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: [[IMG_DESC:%[0-9]*]] = load <8 x i32>, ptr addrspace(4) %{{[0-9]*}}, align 4, !invariant.load !{{.*}} ; SHADERTEST: [[SMP_DESC:%[0-9]*]] = load <4 x i32>, ptr addrspace(4) %{{[0-9]*}}, align 4, !invariant.load !{{.*}} ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.image.sample.l.2d.v4f32.f32{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 15, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, <8 x i32> [[IMG_DESC]], <4 x i32> [[SMP_DESC]], i1 false, i32 0, i32 0) diff --git a/llpc/test/shaderdb/general/OutputPrimitiveTest.geom b/llpc/test/shaderdb/general/OutputPrimitiveTest.geom index f8d5705bd2..8c193bc038 100644 --- a/llpc/test/shaderdb/general/OutputPrimitiveTest.geom +++ b/llpc/test/shaderdb/general/OutputPrimitiveTest.geom @@ -3,7 +3,7 @@ // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-2: call void (...) @lgc.create.emit.vertex(i32 0) ; SHADERTEST-LABEL: _amdgpu_gs_main: ; SHADERTEST-COUNT-2: s_sendmsg sendmsg(MSG_GS, GS_OP_EMIT, 0) diff --git a/llpc/test/shaderdb/general/PipelineCs_MultipleRootInlineBuffer.pipe b/llpc/test/shaderdb/general/PipelineCs_MultipleRootInlineBuffer.pipe index dea3a8a240..31f471f91b 100644 --- a/llpc/test/shaderdb/general/PipelineCs_MultipleRootInlineBuffer.pipe +++ b/llpc/test/shaderdb/general/PipelineCs_MultipleRootInlineBuffer.pipe @@ -2,12 +2,12 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -o %t.elf %gfxip %s -v --print-after=lgc-lower-desc 2>&1 | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^//}} LLPC SPIR-V lowering result +; SHADERTEST-LABEL: {{^//}} LLPC FE lowering result ; SHADERTEST: define dllexport spir_func void @main() ; SHADERTEST-DAG: call ptr addrspace(7) @lgc.load.buffer.desc(i64 0, i32 0, i32 0, i32 0) ; SHADERTEST-DAG: call ptr addrspace(7) @lgc.load.buffer.desc(i64 0, i32 1, i32 0, i32 0) ; SHADERTEST: ret void -; SHADERTEST-LABEL: {{^//}} LLPC pipeline before-patching results +; SHADERTEST-LABEL: {{^//}} LLPC LGC before-lowering results ; SHADERTEST: define dllexport spir_func void @lgc.shader.CS.main() ; Get a pointer to the second inline buffer. Offset 40 comes from the user data nodes @@ -21,7 +21,7 @@ ; SHADERTEST: [[buf_addr0:%[0-9]*]] = call ptr addrspace(4) @lgc.user.data(i32 4) ; SHADERTEST: ret void -; SHADERTEST-LABEL: {{^//}} LLPC pipeline patching results +; SHADERTEST-LABEL: {{^//}} LLPC LGC lowering results ; END_SHADERTEST ; Test the use of InlineBuffer with relocatable shaders. This is currently not supported, and we diff --git a/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize16X16X1.pipe b/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize16X16X1.pipe index 6674d97a88..9afb3c012e 100644 --- a/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize16X16X1.pipe +++ b/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize16X16X1.pipe @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: !llpc.compute.mode = !{!0} ; SHADERTEST: !0 = !{i32 16, i32 16, i32 1} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize8X8X1.pipe b/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize8X8X1.pipe index 4561c0bd9c..e4f7513075 100644 --- a/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize8X8X1.pipe +++ b/llpc/test/shaderdb/general/PipelineCs_OverrideShaderThreadGroupSize8X8X1.pipe @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: !llpc.compute.mode = !{!0} ; SHADERTEST: !0 = !{i32 8, i32 8, i32 1} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/general/PipelineCs_TestDynDescNoSpill_lit.pipe b/llpc/test/shaderdb/general/PipelineCs_TestDynDescNoSpill_lit.pipe index fb508148bb..e4c14f70d8 100644 --- a/llpc/test/shaderdb/general/PipelineCs_TestDynDescNoSpill_lit.pipe +++ b/llpc/test/shaderdb/general/PipelineCs_TestDynDescNoSpill_lit.pipe @@ -1,9 +1,9 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{.*}} = call {{.*}} {{.*}}@lgc.load.buffer.desc(i64 0, i32 1, i32 0, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/general/PipelineCs_TestFetch2DMSFmaskBased_lit.pipe b/llpc/test/shaderdb/general/PipelineCs_TestFetch2DMSFmaskBased_lit.pipe index a432a873c9..12b581f47c 100644 --- a/llpc/test/shaderdb/general/PipelineCs_TestFetch2DMSFmaskBased_lit.pipe +++ b/llpc/test/shaderdb/general/PipelineCs_TestFetch2DMSFmaskBased_lit.pipe @@ -5,11 +5,11 @@ ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.load.with.fmask.v4f32(i32 6, i32 1536, {{.*}}, {{.*}}, <2 x i32> , i32 4) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.get.desc.ptr.p4(i32 1, i32 1, i64 0, i32 0) ; SHADERTEST: call {{.*}} @lgc.create.image.load.with.fmask.v4f32(i32 6, i32 1536, {{.*}}, {{.*}}, <2 x i32> , i32 4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.image.load.2d.i32.i16{{(\.v8i32)?}}(i32 1, i16 0, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0), !invariant.load !{{.*}} ; SHADERTEST: %{{.*}} = call {{.*}} <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32{{(\.v8i32)?}}(i32 15, i32 0, i32 1, i32 %{{.*}}, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/general/PipelineCs_TestInlineConstDirect_lit.pipe b/llpc/test/shaderdb/general/PipelineCs_TestInlineConstDirect_lit.pipe index aa04a8b238..8b074f0c55 100644 --- a/llpc/test/shaderdb/general/PipelineCs_TestInlineConstDirect_lit.pipe +++ b/llpc/test/shaderdb/general/PipelineCs_TestInlineConstDirect_lit.pipe @@ -3,12 +3,12 @@ ; REQUIRES: do-not-run-me ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{.*}} = call {{.*}} {{.*}}@lgc.load.buffer.desc(i64 0, i32 1, i32 0, ; SHADERTEST: getelementptr inbounds {{.*}}, ptr addrspace(7) %{{.*}}, i64 0, i32 2 ; SHADERTEST: load <2 x double>, ptr addrspace(7) %{{.*}}, align 16 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %{{.*}} = insertelement <4 x i32> , i32 %{{.*}}, i64 0 ; SHADERTEST: %{{.*}} = insertelement <4 x i32> %{{.*}}, i32 %{{.*}}, i64 1 ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{.*}}, i32 64, i32 0) diff --git a/llpc/test/shaderdb/general/PipelineCs_TestMultiEntryPoint_lit.pipe b/llpc/test/shaderdb/general/PipelineCs_TestMultiEntryPoint_lit.pipe index df89f353fb..f3f7d6342b 100644 --- a/llpc/test/shaderdb/general/PipelineCs_TestMultiEntryPoint_lit.pipe +++ b/llpc/test/shaderdb/general/PipelineCs_TestMultiEntryPoint_lit.pipe @@ -2,10 +2,10 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: !llpc.compute.mode = !{![[COMPUTEMODE:[0-9]+]]} ; SHADERTEST: ![[COMPUTEMODE]] = !{i32 1, i32 1, i32 1} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: define {{.*}} void @_amdgpu_cs_main(i32 inreg noundef %globalTable, i32 inreg noundef %userdata0, <3 x i32> inreg noundef %WorkgroupId, i32 inreg noundef %MultiDispatchInfo, <3 x i32> noundef %LocalInvocationId) ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/general/PipelineGsTess_TestInOutPacking.pipe b/llpc/test/shaderdb/general/PipelineGsTess_TestInOutPacking.pipe index 133d0d4913..5a8c212ed1 100644 --- a/llpc/test/shaderdb/general/PipelineGsTess_TestInOutPacking.pipe +++ b/llpc/test/shaderdb/general/PipelineGsTess_TestInOutPacking.pipe @@ -22,7 +22,7 @@ ; SHADERTEST: (GS) Output: stream = 1, [location, component] = [3, 2] => Mapped = [0, 2] ; SHADERTEST: (GS) Output: stream = 1, [location, component] = [3, 3] => Mapped = [0, 3] ; SHADERTEST: (GS) Output: stream = 1, [location, component] = [4, 3] => Mapped = [1, 0] -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32(i32 32, i32 15 ; SHADERTEST: call void @llvm.amdgcn.exp.f32(i32 33, i32 15 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/general/PipelineTcsTes_TestLocMapLoadBuiltInOutput.pipe b/llpc/test/shaderdb/general/PipelineTcsTes_TestLocMapLoadBuiltInOutput.pipe index f39d6a99b7..e3537bdc71 100644 --- a/llpc/test/shaderdb/general/PipelineTcsTes_TestLocMapLoadBuiltInOutput.pipe +++ b/llpc/test/shaderdb/general/PipelineTcsTes_TestLocMapLoadBuiltInOutput.pipe @@ -3,7 +3,7 @@ ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST-LABEL: {{^// LLPC}} HW tessellation configurations ; SHADERTEST: PatchConstants = 0, Size = [0, 0] dwords -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4f32 ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/general/PipelineTess_TestInOutPacking.pipe b/llpc/test/shaderdb/general/PipelineTess_TestInOutPacking.pipe index 19f2530807..c48fb49d82 100644 --- a/llpc/test/shaderdb/general/PipelineTess_TestInOutPacking.pipe +++ b/llpc/test/shaderdb/general/PipelineTess_TestInOutPacking.pipe @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -enable-part-pipeline=0 -v %gfxip %s | FileCheck -check-prefix=SHADERTEST_PP0 %s -; SHADERTEST_PP0-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST_PP0-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST_PP0: [[VERTEX_BASE:%[0-9a-zA-Z.]+]] = mul i32 %{{[0-9]*}}, 196 ; SHADERTEST_PP0: [[P0:%[0-9a-zA-Z.]+]] = getelementptr {{i8|i32}}, ptr addrspace(3) {{.*}}, i32 [[VERTEX_BASE]] @@ -45,7 +45,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -enable-part-pipeline=1 -v %gfxip %s | FileCheck -check-prefix=SHADERTEST_PP1 %s ; Fragment shader part-pipeline: -; SHADERTEST_PP1-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST_PP1-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST_PP1: call float @llvm.amdgcn.interp.p1(float %{{[^,]*}}, i32 1, i32 1, i32 %PrimMask) ; SHADERTEST_PP1: call float @llvm.amdgcn.interp.p1(float %{{[^,]*}}, i32 2, i32 0, i32 %PrimMask) ; SHADERTEST_PP1: call float @llvm.amdgcn.interp.p1(float %{{[^,]*}}, i32 3, i32 0, i32 %PrimMask) @@ -53,7 +53,7 @@ ; SHADERTEST_PP1: call float @llvm.amdgcn.interp.p1(float %{{[^,]*}}, i32 0, i32 0, i32 %PrimMask) ; SHADERTEST_PP1: call float @llvm.amdgcn.interp.p1(float %{{[^,]*}}, i32 1, i32 0, i32 %PrimMask) ; Pre-rasterization part-pipeline: -; SHADERTEST_PP1-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST_PP1-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST_PP1: [[VERTEX_BASE:%[0-9a-zA-Z.]+]] = mul i32 %{{[0-9]*}}, 196 ; SHADERTEST_PP1: [[P0:%[0-9a-zA-Z.]+]] = getelementptr i8, ptr addrspace(3) {{.*}}, i32 [[VERTEX_BASE]] ; SHADERTEST_PP1: %{{[0-9]*}} = getelementptr {{i8}}, ptr addrspace(3) [[P0]], i32 5120 diff --git a/llpc/test/shaderdb/general/PipelineVsFs_GlPositionFMF.pipe b/llpc/test/shaderdb/general/PipelineVsFs_GlPositionFMF.pipe index 6c4ca8f77b..9eec0abd6e 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_GlPositionFMF.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_GlPositionFMF.pipe @@ -4,7 +4,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc --gfxip=10.3.0 -v %s | FileCheck -check-prefixes=SHADERTEST,OPT %s ; RUN: amdllpc --gfxip=10.3.0 --disable-gl-position-opt=1 -v %s | FileCheck -check-prefixes=SHADERTEST,NOOPT %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; OPT: fsub nnan nsz afn float 1.000000e+00, %__llpc_input_proxy_in_Pos.0.vec.extract ; OPT: call nnan nsz afn <4 x float> (...) @lgc.create.sqrt.v4f32 ; NOOPT: fsub float 1.000000e+00, %__llpc_input_proxy_in_Pos.0.vec.extract diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestIgnoreDynamicDualSourceBlendEnable.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestIgnoreDynamicDualSourceBlendEnable.pipe index 24db0f94cf..7dda10a4b2 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestIgnoreDynamicDualSourceBlendEnable.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestIgnoreDynamicDualSourceBlendEnable.pipe @@ -1,7 +1,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32(i32 0 ; SHADERTEST-NEXT: call void @llvm.amdgcn.exp.f32(i32 1 ; SHADERTEST-NEXT: call void @llvm.amdgcn.exp.f32(i32 2 diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestInOutPacking.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestInOutPacking.pipe index 38dd6a2f9c..868e3c8e8a 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestInOutPacking.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestInOutPacking.pipe @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -enable-part-pipeline=0 -v %gfxip %s | FileCheck -check-prefix=SHADERTEST_PP0 %s -; SHADERTEST_PP0-LABEL: LLPC pipeline before-patching results +; SHADERTEST_PP0-LABEL: LLPC LGC before-lowering results ; SHADERTEST_PP0-LABEL: LLPC location input/output mapping results (FS) ; SHADERTEST_PP0: (FS) Input: [location, component] = [7, 0] => Mapped = [0, 0] ; SHADERTEST_PP0: (FS) Input: [location, component] = [7, 1] => Mapped = [0, 1] @@ -83,7 +83,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -enable-part-pipeline=1 -v %gfxip %s | FileCheck -check-prefix=SHADERTEST_PP1 %s ; Fragment shader part-pipeline: -; SHADERTEST_PP1-LABEL: LLPC pipeline before-patching results +; SHADERTEST_PP1-LABEL: LLPC LGC before-lowering results ; SHADERTEST_PP1-LABEL: LLPC location input/output mapping results (FS) ; SHADERTEST_PP1: (FS) Input: [location, component] = [7, 0] => Mapped = [0, 0] ; SHADERTEST_PP1: (FS) Input: [location, component] = [7, 1] => Mapped = [0, 1] @@ -116,7 +116,7 @@ ; SHADERTEST_PP1: (FS) Input: [location, component] = [17, 1] => Mapped = [5, 1] ; SHADERTEST_PP1: (FS) Input: [location, component] = [17, 2] => Mapped = [5, 2] ; Pre-rasterization part-pipeline: -; SHADERTEST_PP1-LABEL: LLPC pipeline before-patching results +; SHADERTEST_PP1-LABEL: LLPC LGC before-lowering results ; SHADERTEST_PP1-LABEL: LLPC location input/output mapping results (VS) ; SHADERTEST_PP1: (VS) Output: [location, component] = [0, 0] => Mapped = [6, 0] ; SHADERTEST_PP1: (VS) Output: [location, component] = [0, 1] => Mapped = [6, 1] diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestIndirectResourceLayout.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestIndirectResourceLayout.pipe index 129666d422..53901a975c 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestIndirectResourceLayout.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestIndirectResourceLayout.pipe @@ -2,12 +2,12 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: [[Desc:%[0-9]*]] = call ptr addrspace(4) (...) @lgc.create.load.push.constants.ptr.p4() ; SHADERTEST: [[Value:%[0-9]*]] = load <4 x float>, ptr addrspace(4) [[Desc]], align 16 ; SHADERTEST: call void (...) @lgc.create.write.generic.output(<4 x float> [[Value]], i32 0, i32 0, i32 0, i32 0, i32 0, i32 poison) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: [[DescLo:%[0-9]*]] = call i32 @lgc.load.user.data__i32(i32 4) ; SHADERTEST: [[DescVec:%[0-9]*]] = insertelement <2 x i32> %{{[^,]*}}, i32 [[DescLo]], i64 0 ; SHADERTEST: [[Desc64:%[0-9]*]] = bitcast <2 x i32> [[DescVec]] to i64 @@ -15,7 +15,7 @@ ; SHADERTEST: [[Value:%[0-9]*]] = load <4 x float>, ptr addrspace(4) [[Desc]], align 16 ; SHADERTEST: call void @lgc.output.export.generic.i32.i32.v4f32(i32 0, i32 0, <4 x float> [[Value]]) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: define dllexport amdgpu_ps void @_amdgpu_ps_main(i32 inreg noundef %{{[^,]*}}, i32 inreg noundef %userdata1, ; SHADERTEST: [[Addr0:%[0-9]*]] = zext i32 %userdata1 to i64 ; SHADERTEST: [[Addr1:%[0-9]*]] = or {{(disjoint )?}}i64 %{{[0-9]*}}, [[Addr0]] diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestInterpAtCentriodBarycentric.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestInterpAtCentriodBarycentric.pipe index 771409b369..fdfcc0df9d 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestInterpAtCentriodBarycentric.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestInterpAtCentriodBarycentric.pipe @@ -7,11 +7,11 @@ ; SHADERTEST: @[[BaryCoord:[^ ]*]] = external addrspace(64) global <3 x float> ; SHADERTEST: call reassoc nnan nsz arcp contract afn <3 x float> @interpolateAtCentroid.v3f32.p64(ptr addrspace(64) @[[BaryCoord]]) -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; The second argument (i32 32) respects that interpLoc is InterpLocCentroid. ; SHADERTEST: call reassoc nnan nsz arcp contract afn <3 x float> (...) @lgc.create.read.bary.coord.v3f32(i32 5287, i32 35, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: %[[InterpCenter0:[^ ]*]] = extractelement <2 x float> %LinearInterpCenter, i64 0 ; SHADERTEST: %[[InterpCentroid0:[^ ]*]] = extractelement <2 x float> %LinearInterpCentroid, i64 0 ; SHADERTEST: %[[InterpCenter1:[^ ]*]] = extractelement <2 x float> %LinearInterpCenter, i64 1 diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestPervertexVariable.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestPervertexVariable.pipe index 52651561c8..97c5cc1b2f 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestPervertexVariable.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestPervertexVariable.pipe @@ -3,7 +3,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v -gfxip=10.3 %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = call float {{.*}} @lgc.create.read.per.vertex.input.f32(i32 0, i32 0, i32 0, i32 0, i32 195, i32 0) ; SHADERTEST: %{{[0-9]*}} = call float {{.*}} @lgc.create.read.per.vertex.input.f32(i32 0, i32 1, i32 0, i32 0, i32 195, i32 0) ; SHADERTEST: %{{[0-9]*}} = call float {{.*}} @lgc.create.read.per.vertex.input.f32(i32 0, i32 0, i32 0, i32 0, i32 195, i32 1) diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestPointerInOut.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestPointerInOut.pipe index 4d6165eaa3..15ccb98681 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestPointerInOut.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestPointerInOut.pipe @@ -1,8 +1,8 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -enable-part-pipeline=0 -v %gfxip %s | FileCheck -check-prefix=SHADERTEST_PP0 %s -; SHADERTEST_PP0-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST_PP0: %{{[0-9]*}} = call i64 @lgc.load.vertex.input__i64(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison) +; SHADERTEST_PP0-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST_PP0: %{{[0-9]*}} = call i64 @lgc.load.vertex.input__i64(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; SHADERTEST_PP0: call void (...) @lgc.create.write.generic.output(i64 %{{[0-9]*}}, i32 1, i32 0, i32 0, i32 0, i32 0, i32 poison) ; SHADERTEST_PP0: %{{[0-9]*}} = call i64 (...) @lgc.create.read.generic.input.i64(i32 1, i32 0, i32 0, i32 0, i32 17, i32 poison) ; SHADERTEST_PP0: inttoptr i64 %{{[0-9]*}} to ptr addrspace(1) @@ -12,12 +12,12 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -enable-part-pipeline=1 -v %gfxip %s | FileCheck -check-prefix=SHADERTEST_PP1 %s ; Fragment shader part-pipeline: -; SHADERTEST_PP1-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST_PP1-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST_PP1: %{{[0-9]*}} = call i64 (...) @lgc.create.read.generic.input.i64(i32 1, i32 0, i32 0, i32 0, i32 17, i32 poison) ; SHADERTEST_PP1: inttoptr i64 %{{[0-9]*}} to ptr addrspace(1) ; Pre-rasterization part-pipeline: -; SHADERTEST_PP1-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST_PP1: %{{[0-9]*}} = call i64 @lgc.load.vertex.input__i64(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison) +; SHADERTEST_PP1-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST_PP1: %{{[0-9]*}} = call i64 @lgc.load.vertex.input__i64(i1 false, i32 1, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; SHADERTEST_PP1: call void (...) @lgc.create.write.generic.output(i64 %{{[0-9]*}}, i32 1, i32 0, i32 0, i32 0, i32 0, i32 poison) ; SHADERTEST_PP1: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_First.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_First.pipe index 0ec61475ed..2d4bff3d51 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_First.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_First.pipe @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v --gfxip=10.1.0 %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: @[[LDS:[^ ]*]] = external addrspace(3) global [{{[0-9]*}} x i32], align 4 ; SHADERTEST: define dllexport amdgpu_gs void @_amdgpu_gs_main({{.*}}, i32 noundef %esGsOffsets01, i32 noundef %esGsOffsets23, i32 noundef %primitiveId, ; Extract bits 0 to 8 from %esGsOffsets01. These bit encode the thread ID in sub-group which will be used to diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_Last.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_Last.pipe index 5efb58af40..56b121d9cb 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_Last.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestPrimitiveID_Last.pipe @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v --gfxip=10.1.0 %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: @[[LDS:[^ ]*]] = external addrspace(3) global [{{[0-9]*}} x i32], align 4 ; SHADERTEST: define dllexport amdgpu_gs void @_amdgpu_gs_main({{.*}}, i32 noundef %esGsOffsets01, i32 noundef %esGsOffsets23, i32 noundef %primitiveId, ; Extract bits 20 to 28 from %esGsOffsets01. These bit encode the thread ID in sub-group which will be used to diff --git a/llpc/test/shaderdb/general/PipelineVsFs_TestUberShader.pipe b/llpc/test/shaderdb/general/PipelineVsFs_TestUberShader.pipe index a2bbde6e2c..fce4081e0d 100644 --- a/llpc/test/shaderdb/general/PipelineVsFs_TestUberShader.pipe +++ b/llpc/test/shaderdb/general/PipelineVsFs_TestUberShader.pipe @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v -gfxip=10.3 %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; Load input descriptor ; SHADERTEST: [[PTR0:%[.a-z0-9]+]] = insertelement <2 x i32> poison, i32 %userdata2, i64 0 diff --git a/llpc/test/shaderdb/general/TestCombineOfMultipleStoreInstructions.frag b/llpc/test/shaderdb/general/TestCombineOfMultipleStoreInstructions.frag index 749a3d27a2..7036a95122 100644 --- a/llpc/test/shaderdb/general/TestCombineOfMultipleStoreInstructions.frag +++ b/llpc/test/shaderdb/general/TestCombineOfMultipleStoreInstructions.frag @@ -3,7 +3,7 @@ // BEGIN_SHADERTEST // RUN: amdllpc -verify-ir -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -// SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +// SHADERTEST-LABEL: {{^// LLPC}} FE lowering results // SHADERTEST: @{{.*}} = internal unnamed_addr addrspace(4) constant [54 x float] [float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float -1.000000e+00] // SHADERTEST: AMDLLPC SUCCESS // END_SHADERTEST diff --git a/llpc/test/shaderdb/general/TestConstantImmStore_FunctionInline.frag b/llpc/test/shaderdb/general/TestConstantImmStore_FunctionInline.frag index 8d2a1eea2d..d4278fcd82 100644 --- a/llpc/test/shaderdb/general/TestConstantImmStore_FunctionInline.frag +++ b/llpc/test/shaderdb/general/TestConstantImmStore_FunctionInline.frag @@ -5,7 +5,7 @@ // RUN: amdllpc -verify-ir -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -// SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +// SHADERTEST-LABEL: {{^// LLPC}} FE lowering results // SHADERTEST: @{{.*}} = internal unnamed_addr addrspace(4) constant [16 x <2 x float>] [<2 x float> {{(splat \(float 6\.250000e\-02\))|()}}, <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> ] // SHADERTEST: @{{.*}} = internal unnamed_addr addrspace(4) constant [8 x <2 x float>] [<2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> , <2 x float> ] diff --git a/llpc/test/shaderdb/general/TestDeduplicateConstTables.frag b/llpc/test/shaderdb/general/TestDeduplicateConstTables.frag index 10c4a6ee33..c58fdff4b7 100644 --- a/llpc/test/shaderdb/general/TestDeduplicateConstTables.frag +++ b/llpc/test/shaderdb/general/TestDeduplicateConstTables.frag @@ -14,7 +14,7 @@ // SHADERTEST: getelementptr [28 x <4 x i32>], ptr addrspace(5) [[VAR5]], i32 // SHADERTEST: getelementptr [28 x <4 x i32>], ptr addrspace(5) [[VAR6]], i32 // -// SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +// SHADERTEST-LABEL: {{^// LLPC}} FE lowering results // SHADERTEST: [[VAR:@.*]] = internal unnamed_addr addrspace(4) constant [28 x <4 x i32>] [<4 x i32> ], ptr addrspace(4) [[VAR]], i64 // SHADERTEST: getelementptr [28 x <4 x i32>], ptr addrspace(4) [[VAR]], i64 diff --git a/llpc/test/shaderdb/general/TestDeduplicateConstTables.spvasm b/llpc/test/shaderdb/general/TestDeduplicateConstTables.spvasm index 0a68a5a288..778ba2a295 100644 --- a/llpc/test/shaderdb/general/TestDeduplicateConstTables.spvasm +++ b/llpc/test/shaderdb/general/TestDeduplicateConstTables.spvasm @@ -5,7 +5,7 @@ ; SHADERTEST: store [2 x <4 x i32>] [<4 x i32> ] [<4 x i32> ] [<4 x i32> ], ptr addrspace(4) [[VAR]] ; SHADERTEST: getelementptr [2 x <4 x i32>], ptr addrspace(4) [[VAR]] diff --git a/llpc/test/shaderdb/general/TestWorkgroupMemoryLayout.spvasm b/llpc/test/shaderdb/general/TestWorkgroupMemoryLayout.spvasm index 804a467c3f..6552854d0a 100644 --- a/llpc/test/shaderdb/general/TestWorkgroupMemoryLayout.spvasm +++ b/llpc/test/shaderdb/general/TestWorkgroupMemoryLayout.spvasm @@ -25,7 +25,7 @@ ; SHADERTEST: load i32, ptr addrspace(3) getelementptr {{.*}}([8 x i32], ptr addrspace(3) @[[LDS0]], i32 0, i32 6), align 4 ; SHADERTEST: load i32, ptr addrspace(3) getelementptr {{.*}}([8 x i32], ptr addrspace(3) @[[LDS0]], i32 0, i32 7), align 4 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: @[[LDS:[^ ]*]] = local_unnamed_addr addrspace(3) global <{ [8 x i32] }> poison, align 4 ; SHADERTEST: store i32 %{{[0-9]*}}, ptr addrspace(3) @[[LDS]], align 4 ; SHADERTEST: store i32 %{{[0-9]*}}, ptr addrspace(3) getelementptr {{.*}}(i8, ptr addrspace(3) @[[LDS]], i32 4), align 4 diff --git a/llpc/test/shaderdb/general/WorkgroupSizeLiteral.spvasm b/llpc/test/shaderdb/general/WorkgroupSizeLiteral.spvasm index 984514c015..88dc7e53af 100644 --- a/llpc/test/shaderdb/general/WorkgroupSizeLiteral.spvasm +++ b/llpc/test/shaderdb/general/WorkgroupSizeLiteral.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: call <3 x i32> @lgc.shader.input.WorkgroupId(i32 0) #{{[0-9]*}} ; SHADERTEST: %{{[0-9]*}} = mul <3 x i32> %{{[0-9]*}}, {{(splat \(i32 1\))|()}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVs.pipe b/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVs.pipe index 21246bafc4..24b2e80f36 100644 --- a/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVs.pipe +++ b/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVs.pipe @@ -1,7 +1,7 @@ ; RUN: amdllpc -v --gfxip=10.3.0 %s | FileCheck -check-prefix=SHADERTEST %s ; Check the merged GS has acquired GS amdgpu-num-vgpr, VS amdgpu-nsa-threshold. -; SHADERTEST: {{^//}} LLPC pipeline patching results +; SHADERTEST: {{^//}} LLPC LGC lowering results ; SHADERTEST: amdgpu_gs void @_amdgpu_gs_main{{.*}} #0 ; SHADERTEST: attributes #0 = {{.*}} "amdgpu-nsa-threshold"="16"{{.*}} "amdgpu-num-vgpr"="42" ; SHADERTEST: {{^//}} LLPC final pipeline module info diff --git a/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVsNgg.pipe b/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVsNgg.pipe index 0ea5ec8f65..4eccf1e0bc 100644 --- a/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVsNgg.pipe +++ b/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_GsVsNgg.pipe @@ -1,7 +1,7 @@ ; RUN: amdllpc -v --gfxip=10.3.0 %s | FileCheck -check-prefix=SHADERTEST %s ; Check the merged GS has acquired GS amdgpu-num-vgpr, VS amdgpu-nsa-threshold. -; SHADERTEST: {{^//}} LLPC pipeline patching results +; SHADERTEST: {{^//}} LLPC LGC lowering results ; SHADERTEST: amdgpu_gs void @_amdgpu_gs_main{{.*}} #0 ; SHADERTEST: attributes #0 = {{.*}} "amdgpu-nsa-threshold"="16"{{.*}} "amdgpu-num-vgpr"="42" ; SHADERTEST: {{^//}} LLPC final pipeline module info diff --git a/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_HsLs.pipe b/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_HsLs.pipe index a53f4b6a62..c5d0210708 100644 --- a/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_HsLs.pipe +++ b/llpc/test/shaderdb/gfx10/PipelineMergeAttributes_HsLs.pipe @@ -1,7 +1,7 @@ ; RUN: amdllpc -v --gfxip=10.3.0 %s | FileCheck -check-prefix=SHADERTEST %s ; Check the merged HS has acquired HS amdgpu-nsa-threshold, LS amdgpu-num-vgpr. -; SHADERTEST-LABEL: {{^//}} LLPC pipeline patching results +; SHADERTEST-LABEL: {{^//}} LLPC LGC lowering results ; SHADERTEST: amdgpu_hs void @_amdgpu_hs_main{{.*}} #0 ; SHADERTEST: attributes #0 = {{.*}} "amdgpu-nsa-threshold"="16"{{.*}} "amdgpu-num-vgpr"="42" ; SHADERTEST: {{^//}} LLPC final pipeline module info diff --git a/llpc/test/shaderdb/gfx11/FlatParamDpp.frag b/llpc/test/shaderdb/gfx11/FlatParamDpp.frag index 19d2d24c67..87608e2865 100644 --- a/llpc/test/shaderdb/gfx11/FlatParamDpp.frag +++ b/llpc/test/shaderdb/gfx11/FlatParamDpp.frag @@ -3,7 +3,7 @@ // RUN: amdllpc %gfxip --v %s |\ // RUN: FileCheck %s --check-prefix=CHECK // -// CHECK-LABEL: {{^}}// LLPC pipeline patching results +// CHECK-LABEL: {{^}}// LLPC LGC lowering results // CHECK: call void @llvm.amdgcn.kill(i1 false) // CHECK: [[P0:%.*]] = call float @llvm.amdgcn.lds.param.load(i32 2, i32 2, i32 %PrimMask) // CHECK: [[P1:%.*]] = bitcast float [[P0]] to i32 diff --git a/llpc/test/shaderdb/gfx11/HalfAttribute.frag b/llpc/test/shaderdb/gfx11/HalfAttribute.frag index 69c9dfbadd..9476c58328 100644 --- a/llpc/test/shaderdb/gfx11/HalfAttribute.frag +++ b/llpc/test/shaderdb/gfx11/HalfAttribute.frag @@ -3,7 +3,7 @@ // RUN: amdllpc %gfxip --v %s |\ // RUN: FileCheck %s --check-prefix=CHECK // -// CHECK-LABEL: {{^}}// LLPC pipeline patching results +// CHECK-LABEL: {{^}}// LLPC LGC lowering results // CHECK: [[P:%.*]] = call float @llvm.amdgcn.lds.param.load(i32 0, i32 0, i32 %PrimMask) // CHECK: [[P1:%.*]] = call float @llvm.amdgcn.interp.p10.rtz.f16(float [[P]], float %PerspInterpCenter.i0, float [[P]], i1 false) // CHECK: [[P2:%.*]] = call half @llvm.amdgcn.interp.p2.rtz.f16(float [[P]], float %PerspInterpCenter.i1, float [[P1]], i1 false) diff --git a/llpc/test/shaderdb/gfx11/ray_tracing/PipelineRays_TestStaticCompile.pipe b/llpc/test/shaderdb/gfx11/ray_tracing/PipelineRays_TestStaticCompile.pipe index 630f67b453..ca66ef5c61 100644 --- a/llpc/test/shaderdb/gfx11/ray_tracing/PipelineRays_TestStaticCompile.pipe +++ b/llpc/test/shaderdb/gfx11/ray_tracing/PipelineRays_TestStaticCompile.pipe @@ -11,8 +11,28 @@ [Version] version = 53 -[rgenSpvFile] -fileName = Shader_0xF10BE264545A9F4B.spv +[rgenGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable + +layout(binding = 0, set = 0) uniform accelerationStructureEXT g_bvh; +layout(binding = 1, set = 0, rgba32f) uniform image2D g_dst; + +layout(location = 0) rayPayloadEXT vec3 g_ray; + +void main() { + vec3 origin; + origin.x = gl_LaunchIDEXT.x; + origin.y = gl_LaunchIDEXT.y; + origin.z = 0; + + traceRayEXT(g_bvh, /* ray flags */ 0, /* cull mask */ 0xff, + /* sbt offset */ 0, /* sbt stride */ 1, /* miss index */ 0, + origin.xyz, /* tmin */ 0.0, /* direction */ vec3(1, 0, 0), + /* tmax */ 48.0, /* payload location */ 0); + + imageStore(g_dst, ivec2(gl_LaunchIDEXT.xy), vec4(g_ray, 0)); +} [rgenInfo] entryPoint = main @@ -41,8 +61,14 @@ options.disableLicmThreshold = 0 options.unrollHintThreshold = 0 options.dontUnrollHintThreshold = 0 -[missSpvFile] -fileName = Shader_0xE7D0EF376FDDEA56.spv +[missGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable + +void main() +{ +} + [missInfo] entryPoint = main @@ -71,38 +97,16 @@ options.disableLicmThreshold = 0 options.unrollHintThreshold = 0 options.dontUnrollHintThreshold = 0 -[chitSpvFile] -fileName = Shader_0x04BDF3B158225AFA.spv +[chitGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable -[chitInfo] -entryPoint = main -options.trapPresent = 0 -options.debugMode = 0 -options.enablePerformanceData = 0 -options.allowReZ = 0 -options.vgprLimit = 0 -options.sgprLimit = 0 -options.maxThreadGroupsPerComputeUnit = 0 -options.waveSize = 0 -options.wgpMode = 0 -options.waveBreakSize = None -options.forceLoopUnrollCount = 0 -options.useSiScheduler = 0 -options.updateDescInElf = 0 -options.allowVaryWaveSize = 0 -options.enableLoadScalarizer = 0 -options.disableLicm = 0 -options.unrollThreshold = 0 -options.scalarThreshold = 0 -options.disableLoopUnroll = 0 -options.fp32DenormalMode = Auto -options.adjustDepthImportVrs = 0 -options.disableLicmThreshold = 0 -options.unrollHintThreshold = 0 -options.dontUnrollHintThreshold = 0 +layout(location = 0) rayPayloadInEXT vec3 hitValue; -[chitSpvFile] -fileName = Shader_0x89ABD17F2942EFC4.spv +void main() +{ + hitValue = vec3(3, 4, 5); +} [chitInfo] entryPoint = main @@ -131,8 +135,14 @@ options.disableLicmThreshold = 0 options.unrollHintThreshold = 0 options.dontUnrollHintThreshold = 0 -[sectSpvFile] -fileName = Shader_0xAD98DA756C353EFE.spv +[sectGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable + +void main() +{ + reportIntersectionEXT(0.5, 0u); +} [sectInfo] entryPoint = main diff --git a/llpc/test/shaderdb/gfx11/ray_tracing/Shader_0x04BDF3B158225AFA.spv b/llpc/test/shaderdb/gfx11/ray_tracing/Shader_0x04BDF3B158225AFA.spv deleted file mode 100644 index a613112bcc6b4432d73d24ffafb27abf432484ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16872 zcmbW72bf(|wZ~7Gl7OLy5`mC}79ar7oE$`>^fuN%C1`X#;$s; zyQey^rg#DR7&3G$?p%D>P`&rCqmDkpggX>1WnO(d7CRN6B1bEDU3Yar$NkuQaqhzS z6R`cU1F@CZdDyks_1Mi=3;&}jzCe6yu`OeDoqG1FuAaexdTp@3tFM3X(ys1$y;i+& zxLz4DW?aM!3=RwrRQm>N>$)x(?(VPlRVy|8?cvX-g1()4$FgM|i%;$9S--w(sJ^kk z($!xbsC4yKYn7gQbwgz&e~POP^z;w+<^gSF%IDg~c-v9`%I<;Q!F7uU>eGg2&Vd`Z zE$vXH(n|wxXRRXcwEn^FMx=2&Y!x@IU^z$ftsbb>JJ+wR)GCd{#_zgSe0wnw-r2LZ zzuI&0w7!{h_^&bk9_T%TL(H%-{+{q!rH{K?uMQ3@8tAQDMqO>iKIluj>y=uyyB|oU z4NbhD+SfNcR6!e8#(B?^wyJVjeYjRxRL-xR2=jO^PaD4cat0mZcA<_fb$86lrm@54 zddB!m274lm-UZd6diOvNGaU6>V`mS$rcztb zxU+-hzO+XBTVvyXb(VLhjTJv=w9n%1br)7@^=kLPw4r)!xTiiNikq>a@2DBonKSyz z|AuGIoU@_t$Yirz_qg{h#T4?b!<@%d+O);WLcE9jp$)KgU2$Xfhu15Y%^w`BmFwBY zb8&zgX8eJ)qkC!B;&6DH!E0Qt<&Mnwa!q(to1P3 z(OM@I$HGVMN2R~Q)BNuhTjp;mX3|Ezv%t;u9*LIMdlbC6-lNqp>pg~cwBDVI6X7HE zmfL@EbrSLq6u})|j>(tS){&oK6*=>$>^2k_i#awXnddx%1 z*W(m;^Lorz!(5LAw4>|MT6DnA@7|EI%0j^R%LtJ z=iXS)gm|}_ly=>ZszF9noVMn^; z_*;r)wA~3Wr@b)Y6|_AiZZB4qm7XdC{P;!Hr~J_{VV z&jv^CbJYJKcWdci-(BmDJyIiXJ?8p*A4Ywx1$G<^AT!1fsN;?`ZCc2Y6@qy7m2)+7SBK;=}lRp66_}u1E0=HO^IHTZ_-aN9$}W zz76O7($BlJeCav%chH*ac@k~wdd3#NMEhssK8-IQ_gVPpxGlvFY`WgTdO5G1z=Ol} zOS@~mu?^ANiizk0)nywhwWTgEN^5Zd+UWbSt(XN*@5hn)k7;PmX?bn%!ZOzaw5{uJ zEmok7)-<-*2!H{JLuN^V_X~`8MID(??@%jde01g*W;8;u*rQYW#DZ7KFu zPy2l;xJ=b3r#y$$ywJ;OS&!eKUgq^%lzNues_QtvHdGdI;JN-sppV|emSPrs11}qW zCpP&`*2l|7-|1WV+KMIcb=min^IM7*XPtF;UaEQJ-&krc|3CZ2(r>rsZ!C4s)93rf z($|VF#vlF0YA=@K3q36%wKa6QjQHFfuA|@ZUasRg;D0>Z+RJbJh1L4J?6aNt)?zL3 zqwk^Cq6!~f@7AKfi4QjM+E%=+*Z?n|!;x>M*5cBwVp@yKoA{MYeA8CErTp21Z%*nR zSN@E`J~?Z!*58XZ^0>Ndy{G>Cf}g3bDmSuoyd}%m0l%NMnp&>3;F+e{`V|-dszM@_^xDuvIhQC-pIKdeWD&D>S`_5!!=Q#0{4E4)pn=nc-qOBzU^t{`u2eH zYlxDYU;i$&YWkbI+B2YrhC9icM$emzOX8qL>?e zbHjh~1a`v>VC&sN>s*YFxHp1};y>r=zXPP-`0(Ea_R@bht$x>Czw2}_HYVfufxRa3 zo0E6bI+p(Y3ceTn>^(S)+Xwt!TDfDrkJd|VPU4=!Uiu$wz%qV1Raw&`nDfpp>U;*> z{S$m&ig5o1wWn+%r4wp?U9zdl~;g^5y;ypc!Ia#(xA7Ya#zM z+&PB-F?e40<8aT@@P89-zu-^6olEc^!pFg_=c(j#uehe;8Q8v#uYY@hebrqD-#=p4 z!S{;XxSiFBQ*#~UzH8Ls*bzk7;}apJw>IKEHh#_gBl)XXFIo#Hr= z*LOPR%jpz7y2+uTI#$ z@^fjQ;OzJ8F<$QPXw~$epK$cQ2L3&K?qlQS*Cx&Q>%e31`CRCi`_56*e^bKd(=Wd{ z^KSv0-+3Ox&VdruxZG!dMsYvc*ZaQ%=9=```e$Wazu)~4 zuix+f;I@AI2lxK@?H}B;+Hd5X`wg6Pzkze!-^2%-crD|L$?rFC^q2enn{&T^bME(V zaO>NYarIjgKaurx-|YtXS(wKi@j2K7^V#vN)@R&!+C4FSC$S&BC-QmRDRaIMtmau` zy!Uo5xVrJ)GkL`C12*2XC*mi;)s6R_%ELDqtQPzLusP+<;UKWj-L=#sp9WU*9KRyf zb1+=cumV^FqzN?fa|~?7g*S$8bNc zf~#B0YT7fgm6&@ z-<R^A5Y)y`1Ut`9n`3{5G3Wa|MFxDJvY1OUAGyO8K^YuH_F@0BW zgsU5WDXl!>UjlZ%dHfY{b>lCml}G$b!Ol02zY4By{FSuwnD5o#nC~XA-1%D9W^gC1 zH93xbjWN##TK(qn8|P(U_ig080epSNUk-LHV$L^$%^`PRz5;wR<~+90-ilp|#XLO6 zZ%ex4-vXA;<}bE>zuXRX-L1p19nUe$Ypmm#-?*#CVSdAy zV>`^tZ`)&u^S$Wzyx%ka{2gPxDCxed?Dt~qd`vygpbNn2{+#ES=D7g-JGpFQT-Rtv z%xilr#@zwzxc*+&O;va@Hyg>u)O?zLCj-Uu=CiB)_Hg~)G+4}^Qt%T%bNHVi9bW0 z0kHXO|3tp^w3lFB`Uh$C+s3?y!Peot9ZT*yIVXSj?)s}o{H2K-Z$EkXHi9FUb;={x zbpYble4Q&0!UY+K8d#1(n@k%sf^|^lLQFBg?`zlN=_^T6tS<3kuxSDa%UoGNa z3(ot$F7c@I^>FJ{5A6*}bI#+Lm36!c^L^%=^}i8|8r}>xk1;XVw}2g6pZ7x^&%I~# zL73NM%r)MJc1prK(@xFsehE*a-9KS#Iv`=!{XoonGL6=IatH05m_GU4wD&aecQo-2 zH}OX^Zl2F39((t#aOG#pP-`_>+ z<$l-qPV9r2^Aks|_k$x>C$Z*#08{s!_8{#;*!`Hgd*VH`4`b?QvpW7B;sZ%@ZMVUq zcGpLr&xU(KUY`$ragV+Zc0GcB18hvp z^_yVl=sU$T;9Hn|jML{ip_ZQ$hr_)lV{uL#oUm(jNQMth*mGif!mh=PgvZhzhPjWA zp!Hl>Li=q@Uz{7?$@tyiC!6?>n)ol9_|q9T@3V<}mRj=@m}}mFS-*9=p4Oqy^)l|e zm|C1S-%FbDA7qcXAHI*N$1`i~YTje_#}6>q%kkp8`C-!CFP=9)q4n~-(f4EQ|1j4{ z9Jzi9j$CoxJcXtn=grT+o;T{w!}I3nn0lNy|C==Lk^3xacU|>)-dL04TZe0-?~x{- zF|pTv0XD|iCu!x@y%+7TFzfb;^W)cGbX?vcp#7qD}UxwM1-in;IY z|7_xMCjAXQ0aG`p@qbU;c>BrY+weKCeHMJk z0Jo2E`aGx9@^k7~;=LwgaZb%l*k^fGhL22m675k5drlpl@L1YoF!%p)w4O^_X#Mw4 z`r_R3-$dnn*NhuKv5D{9#1ClV(=xt<{{FkE$ZtOX%~Z}$$oSp(7c}vXjN5NT#{Ik5 z*@?&bwj~E}n9ABStxz8BuG0&c0V~q7)$fMR5g7aGUf~!TXlfYiqs&5}`3g-CY*yoeM z?xPmWalD6W)?^Oj?HBP=!4V%nW9)~vng04BhgzP)Tv7Y}V8=1mJtPm`f#7^z2f@{1 zUWb6aoR_|XvBNOy6i1zhf}_sJJsr*5@pHutuyN|v;{H^#ZpSgFxugH#VEcQY-7iOg z)uOLF?`w|eI}>bvV|^~<`n=Cag1x^HdlcAp8K1sgj|TH!`ELWt{R=V1Ts}kkBiFHD zwTE~&&89sbQ}b`lZ(uyn&N)eUPoD(#ay`{g#7@DSyEtk(8EoCLzH`B`zOy;iU5|Na z6KRdrZ+$+)>aL4pnb-W`bKm4XV`9wtVEY^E*&ug(zdKF^J3h_GcgJZE_4w{sq?60J z>05{`!>mCZxlRX1uK4aa15G`?I~IfQCzrbQ`Q72aky4NEj-_BV&s^Ud@!jD$rO$a< zljB>5^U@dJ9pSTe48JXwgN-rP^G~kN_vlKn=eWKVV0rwmrW3p)KJ|!S1(uiViBGQ2 zd$$_w8pqF>XM)Y4?mjt}*2}fjcMi4|b1vej_dKw5#&^y6U^UIl#^>ZC#{i@)6{Vsy5X(AG$4$s$Y7;atm z(HCo`p0Al}XRZ4(_6D%)>UWbk|86?bg1Kg6@!fQM!tVPy3H$wU0_OcVsni?4)7ePA z^4lVP>t7DHzgO(>m!PR@UN-qXx&px%uUMxmlcpTnOOuwb-BoDzH(tN>x+d18FZRtQ zu$tVnVKdnI#9q7xZp_t~KG#YuU#nAz_nM5wTAiG*dtz>e=Oyen<|zrgp7RrS%@$y; z=V`R@O?e$->XX~v+QeVe#NX7!??^oU4t719|H{9|%%yd097El8buC^Fb{?&mXW1=w z;Chz7py&&JBUsl>{Ga#WW?K8ag4TKHkLP0x*l}XLZv#7D$9GQhk-ry#55i{+_M1oR znz>fSMvhm4<>oM#-1~Gpt>ar)jQ?tIKK^UrF}`akkMUmzKAe1xZ@+o8F}|@e{_DZ= z7+>!A_IG^OBgTItI3NGb@EG5FCXeyo0`}(@$G6|SYpZp!*cP1XSybW%@_?z9^;cE9`)@OgUh<_hgE&iVOez4m8nEwXg z0on(#_hNnn>9?=X!OTKOX`{_b%Ju)bKE zuYs-AG4#dSd>!oC_`46+Ms94>@C|)f?3-_a)xL>E4gU>}8uUjE{{z++xxNj~bA1P{ z_5>EWz6*|A`Xkr(!1|VRPknEEA8dYg=du{>Nw9NyCe1}|T#Ww%a6bNz;A%g_V*DS2 zV|@KF{!hUA{I^^F4DnO2nqxmj`!me3_r+XCxiR+lx&Jv>zvqQG&IISuiFqx>JQJMD zvJ5ZJ@QQ@p*DEp4ja9UcW3FG2+rHMdh4z844(sbUC*Pn9&`Pb-1d!{{{}ZMU)R5*sgL|V z5^O*9$V1w~aU;(dxOwt*-3CoP^0a{Mr|#UXrxpAhdG$r^Hn8)E-0g64=j%EaO+9jt T1KUqMa&HSZzdqMh?z;XzFQ_K- diff --git a/llpc/test/shaderdb/gfx11/ray_tracing/Shader_0x89ABD17F2942EFC4.spv b/llpc/test/shaderdb/gfx11/ray_tracing/Shader_0x89ABD17F2942EFC4.spv deleted file mode 100644 index 257274f45dd29439f9e62dd305955f7f64cb9a61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15600 zcmbW72b5i9wZ~7$%p`h6Cgai_bqRty;?j%*%S}sy*FpUEMt=wzb!4 z)$(zDwNkG>L&K-iQ|YUeyLzfC+fL|f?=E+hOI7SGVJ{8`ewcjg;>E2C=eBjMTGiHD zJGr~m)?KcY+B(bCQb(=4y3`*(`IRdj-F=-!hh`!b$JP`lMp)0k6?(PQ#R}KTJ(UHO&eBQL)tqe$zo@-ds+QZk zfmB-O#B<7BU46YJxS_cp%M{$Q(n+~IvC-A-5Qs6uxm=y zIrWw8$@iu;+TR-M>$Nmron~fyr-42T+gBb}s@BTwm5IHzYF|ffauhdtb=O{#%Tp(J z<$wC7PMxv3YtJNmIPbCcgR}9(TZuT13AAa8<%PJ0+rd@Xy3V*h+oRV?C(Z8Zspj+9 z%(>V>4$*%{+JU{aS+*N`8snl;t-YJY|F^0&&(6e(T6Y0A*19WPvDQiGjkQjeL#%ZQ z?Le&~vuWu4>rv`1ahm_VV)OWev#GRE?;haBdiR7Y*1H#aW4(LJA=bMO?LfUFvIEfj z>&>_S!t(MJwSPUoX$Lr``w^pFBkZbNhu74f>19qFa4(iXejAy8NOlPPk(E{L9mm(RrYkkCZ2`7&esk$NG&>BvwUn;NNHWohs*hz6 z_EkOQN{sDj_4aCetj%(D#BrC`u{GuEH{jcpov@C5aCR1YmA9hj_d;;FH|-j(e7Q^D z@_FW}0>ZT9??=k?;#}Ika#eS!+6zAr@#<3bFqZ(PDcc%u;JwtG?S!7*Oa1llTIU?ol4{R!d93Mh>(<|t&4U}L zX-HN<|KRboWT#^D9Ly=a6s+g0bz(GS=QQZ&H|Q5M=$E4RbanNX7@_C!O7zwFSevu2 zf$O_?R+SHu{QSuI$d^0(s;T$$yD9Js;8iQi`Fy#h0u!Y2WrUwIySaB%apRu4i9PBa{g z$ucA|_Z^(AFQ3lBaBv=~UQT{D$oatML$)5j4SigLk>G)KY|gesUs?DjahzMh#eHEv z?;JUw;&+N1QxaS{ZUf&b+U?f(og)9wzEiX{(I@f`e5bTzTVo484LM(Dd7rSk(2m>h zVIRl69k@6DzEf|`c0jLx?+vV_oKKyvuchD9KE{{??kH9G+^Orkp;y~G%Y7u&z6bii z9XK@q4rlF;?x}Wn@_n_qT3%kR)R#T4!Ebcz^UJkmIqN;^H+!K^{}Ix`90y=8zGLQ~ z=V!I>J>xe&`Evimzys^ul>Zi}kB|GDc>a!p;#kzj zV>6y(eH-2Qj?MUj@9(e;z>nwi)s$^O$KrV6Y(~D& zi}~atpXYW0@qCQ0ZoX#3`S7gxME~F@Bj+}u4Nh16D6O9xoVchb&YphTAm$uJN5?P@ zan9nbMW4{42G>N+eD?PYP5}Fa?ih@zzCCtvz1F7uT%z``Nu0@Id^!H){XL%(?7(9@ zb>sV+P~G3cuF1n`O+0hzKT5jiP5lw{&4`Lhe}664b8JqG7(W#A(3G#YYc4+?-Tfq% z+k&3MX~!YjHl$V8wk0}$MUd;p*S;yOoc8go=@zv5huCLy(%r|_F+^( z4)`@2kErC$H~c`SM3Sc?+<>UFhb)8WD=#xsTptqpyw!Ew!})mHD{ zlr01s)7ZOWH}?``!>&>N`cm|^*DL#n{aEz(-+w>1oAYBxmaRF|HRu8vJK||yf$+?< zzxs)}y5^vftm^4t`>mz5pZ4%O51eI}&(wYaNW1=FzXlpx?IOt7+BE^>tbwxfw~nCTHsQ>l4<05>;8#Er{bTO4RuZ zy!#;Zkrd%RoWyE4kCV|IYl!=23Y>GHpEWH+cl_>!$hjKMe9_M~a-5FMeXH)8Uxx14 zG}aYhW3?iV-TU9U8UyxTSJ&^V#LGDk>fY_KhQ_@H-ADiHlC5aJ2~L-&<2IC-3;W-L z?ij=V0D7_R2hqKE!~Q6`{X%~N-LaVesf69{VSgIVdqVqj$?o3KZk;c|J+twGnW4X& z>ks$quh#X0T$4Az=C*$0y@_sadFRphoY;Bv{iUwoyR_z#a~{=whskMw56qu@Pit5A zohGN=^Xl0^RzzMZC{^54o2c?=#2d`$)Sv zeb1;HV>GSt<;yC-svP1wH1@x5aXTvvb1s)qhX)L1531 z{_4JSG~G`wr3`{=S34zZLvE?;_8ac6Gn!DXJbZw~hFc;vOac5>G39keZ2&i8;hoWC*X z^48*+8Had|tVNrCo}uxGw(|xx<>z)n;>_b7P>+}s!LcTupIwlh5Myf7&;7e=vKhmD zqaL=&V7bNIqMo%WU^&HyA-LT6INf8~9jAM2cd&iEG%_6&#b zzF^O6*!Kf_X3r&le(u3?`kk4${lUhWftbU6Ef+Bk1j~hf5ZJmunflKJ>mwg^%mQ2M z64u7N2ZQB8&Q5)2!`WZExjjR2k!!9Pai92(ng{mp_vH2WjLGTmoxA|-nnwRaz>Yuk zL&Zrq-a@c3v^&>}z|NoRv6yxVG9U4KL?8F^;fXiDXIgza|Kc+i+Y#WowANv6^O?iA z`bLbUNsm0s&?Ap=)%6j}8}~hS&c29urF9HLe0*0=!_WJ`?-lP&ef4UzL(+;OPKINX!GcJjyHH8GCO zz>Z^cTF22vyBu*GF|Klh?%x|1?I$GtZQ>jUHlFPp#OtIjAwJqWXtmqMxIYfI4##aS zb?3=39gjHw^5Nf|bp7q89<~ZNVp*qp#OeVXOFsNpB|T!Phph^ZSdLLWV)cTJB_IB^ zq(?0ExDWckj>Q`68~2lcN2<-=N8x)C*l+fbxOYy5(_gzeTqim6yS}F&a-pA^^e?8l zJT3Xi-wk&m-MLfTy*P{5AMGc=a`2xD(g5O@tx_I zwV#JX4W9=aN1qt$7r^G$=6a~dxgQJO3Go?+ILE#>#wYB)nNYynCG5Lm`-H7&hlHK? z9TC@LBCTuU@A3-~ZR!`(Uecgn(V*Yjpx;-}jdOp}WAAwG?0DUxPP?A= z2ILw<-aT;@?Tv{1G0e_r+M5#R+^&a2?aq%j&x%EUwTddK;VCN(BN5J~TSRVyDM&Bu8X&*!Eqn|eK3Ay4uu^YP2I3(_gofCGB zb}8Up6COi5DPiYga>AbBDTw=ccUtd-F51TtZEZ=-JrkFpub$ujr&^C zy-Th63B);XMXcYtolon~=6vb*V?-|Qo1Y|3|9jXY?uVZu@^NOZUCuRjfBXz_zRVZ* z&Ce6>e(}EfC9RM5jkaGPzeb!Vam0EC9I@iQc@|DS?wjYp-Z%1&!~5oWL_Y4DUnR~p za-T)*&Z{=>8*4KEuW6kdZMPsrn?AAE{uiu|zOI+Lb&sa~4PxCsaew?4EU)-DKh_fQ zeg`&A_`e92Q+&cd?wjAk8B@PFUw;70`vmt#u$=vadns|nGxsMr`|GdWJ?z-rYuaLu z{2A;XiCC|K9czrG1^gGpeQ$sFqI%p(e+7Fd$s1Gu*ORWl{nX>z@c+Q}F;Co6{|~kf zZN_k4zJa(G~C=P*I&D_9fRjl zTdeJSVCOOPzk~IO@xKpt+;LBt*gpDc^PZ9`-c!@yea0biPfbmD1nnLLyl2ARQ+p*m zoObVohtTeWxc~R1^wnjwE$*%627PEj*MFl1eME!4b%VZbLGPl!|NTegGoJtL zM^T?z&@aaBe+LqF_5BOF{JethzY8o%dfabK=+2Y#CsC6^2kF{#s6xjkXzc}{(=3w{HV8lGGp`0}tLx1~)|CZqJkKY(u!JSBdZ4pDR z7{gdm`zWw^^mPxZhix>tIIeBbl+Zbd!#5%=M=QwcG8L`L189RPgOaSXA zZ!PXmIqNo$F^wJlw+Gwbb#}k(0G5ls>czgsh`u|5jjylgLS38dJQ3{rhVRZ`=Vf^M zyTx6={K@|f)BUTzKF0D4X^&Wwz;bu-Zkj^78zSewrG1%v-krNA-aWl1*vI*l-vgP3 zICgQ=v=`XAV}ADr$NWy`R(C%3fg44uuXgM649hz&<}$AF!{)vz+VqK>`-1JSuXlsG z`M06Ze%feh`oBA7pvZgwJGKKg@;Eka2Ox70YY<1QgTN6hzB^{Z$;WrcEU@1l^48~f z$HCf>`0khumh;Z_z2Tm)m{q3i&&9yrO>>S7M%tOJ(kasQ@)A~4<+73fLiZ~W=)Vl<1 zo$+0BI9N{cv2ku<9~}Xqk56z*6DJ+qvc%apelr~jXMg>*`+kdW;G@v_lYaxpogcA| z#-QCNxMLD09o&Z!SIqfgIQ#3b-TfQ$dn~&18t?Uwpj)GTv^np-ljPkC&Z+a~JjVQe z3|ySQHgq|~$EG-c{{f+oPt@I>IO*VyOI&d*9dP#7U%T^X9o|Wu=-wmIzXX=^39c(~ z(!niHTrtlIIQ#3by*OuO^x~X-9NoI?qb=r4zBp&jowbf7_wiuo)$b;8@w@2&3+9=Q zOk@7HrQI)K_x+57{eIXVaXk*q`TF1KREVd|@p&G5(CzONdwdm~yy9b1T%!{p^zn&# zswPf4xZcDS=dK24fBm&vuXAEu+G5}If#uY_8%_i}p4f{gq3g36(dJyq73XR${yyW7 zn5%;lc2CSK;8_X#jd^gw&gbleowGTJ^Er<;z9~;7r#5xlvl{es8uarU^b3+coKafS zY3TgP|2<|Vt#e}zdFR!+_ypK-G$Gz)pR@zdyZj4^w$RT2Yg)tqxdvy_+UGxM9f$Tf zA8WzpiTVB%*zua*F{#JD7kwJM6EDxVw??DH-@p)T_^jS-?}3IXTZh$ zpGA-S&Y^nb{~UNX;+fxmvuGo~zLEc2uzKWIH^2SO?|el5^T5UYpGS}Uu9nBfq-&?Qee9A$%_cM?Uw2`gC^GSYm%E_p6WBIo2NiE&{7Z4s~Q{iTOnTJv6?FT>zu8@m zE_WGXefF0N|F47P;@|VG1Sja)`t?e_It-jHk&>qhiqtees0ZbBl~ zE#QcyJz{+WtSw^Q3NFUF9bN7=Bx2nGj#%0w)}3H&-cz3EyTI0J4sCvab-~{az7la< z&W*ahQNuUE#TxEKm%9gv8twx}4ceoI`@z~G*0;dLSl>pMdjN@8-vLJ~?Gfv{U~LiW zd*EWM@1x5-h(xR(fFqXni1iRyTg=T5!PaUHZ80|wgRev`O>?8JZ`AOJHYE1VV_>;Q zk*MK+z)^$tsNqLoZ4v8na52`C=yFdW5$ng`h^0MZ{RFIS32W+mx?Yxlko$DQC<4nuqvBHjt^Y4>6oyaeG_xQwIf02N4j_s$DFQ}_NhBB~$l%m8-EC-1x?^_-i4&7n`2fCy z`UYNDUU;YFaOaKBVL4P;<@cT5%Q|wXmHq!~+H0@1cT-xjZCO?x$W~^{vrn@Aw=P?f zU0s)?P-YOUFt$yT8sz;$eLdU98{SKqZ~?-NF@$x3+wZELgD z*>@YVY!EzGZMHPrhLASfhHOV3MIJ*gBPISVVf~TdLGq7HRz}aA{@=FfSE?VIni`uN zt<>h{E8X7WY@;&UY&9zNW~Wi>H7_@eUtaKQwraBr^`b)=k78Z&73|%eztrduU*_K` z_;k)kI-H$~`a0A}-$hf(&!nzQ2G2G#TbXEed(~F0ade^EYtK!z>WwQLCHEQ3?qsbs zTD?Zcn8EB`c&A!#E_C~R7~bwQXY5#+bJ#0#o^5w#>!+%VQ@N?14tqI!5PLd$+a?=h zZwoQU`kiUF40F$ivG-2&XHw>5&H;bYpPp;xUj15j=6=;HEW|C%XBB?c|ISp(9>?CU z=~K#{0#|eYQnsJWvw^6wN8`ms;wS0kA0c7x4Vzei=Pw^=J%sN3+^0z zCAOu=?Z`OXS^3%9aUz1-JHIjNQs@0L-g|gI;uqY$dk5ssQU71KzjE`)zfau$%6~}Q z{>gtz+&eA*Ip?LkZyVv(p=~p=o@%UT7+r}~yb0vFhLFwdyNp%tT^-`@a#nT97JTi4 zcq`cb4UGv2;x)6aOhJyEB9J*&Cg+d4O~TBqmG z?)kK-m*11PKJLFI*Yk(Z{pDMch<7&bWxV^#oq@XG+Y>kcBMF;dyWE+Czudmd-A}(s z#BT$gKf!9A1=in~nYEio?r)R2sPhKgZy)!}nK>IjYyT5XnblZl<$a1=_Qd-c+@ARM zgKHnYh5NR{uD|cL$afaF@xH^N-M3ie`)}dC$)f$}E!_85wEHIIhd7^i;||1oF+xYZ z6SOIRTizvY`swf8*LIjL*%Nu#?gFcuqGQhcZbY5p=gjQ0vGz~<2wk=x_aVl5cg*Kp zhY=|xSzxD9*mg%G3c;}}s{P%#ZCHUUNKPTR^?nCrZZ@lwX7ybvp<_!Kc*nAQH3|Jra z#(O{1h5xhQV*H`RBmOX4AN9sq(-FkJ2Y)W{PgBh!aDCL<2V)>K7Z@{A#ZP(L2Z-R~09itOQU68K&4A6N?Mr6hEH5GI zo#WfAe$G*S6H(_J#j)2r;9|YAaL*L=&Vlt&A2BVkKEd1IV!iWlebh(2?}E*x?JsJG zT3mnU7uNbai1mBV^tVpW(qr}WEc$d2b)H3R9m`nXLslTp<#OUt;}v-EoQv?{T;7N4 zqdsCjNItkUW41euhQGN4mM7|Ysjw~`fu|lSlbQ6 Sp2eA6h{#MjVa+ diff --git a/llpc/test/shaderdb/gfx11/ray_tracing/Shader_0xE7D0EF376FDDEA56.spv b/llpc/test/shaderdb/gfx11/ray_tracing/Shader_0xE7D0EF376FDDEA56.spv deleted file mode 100644 index 2d8e25cc9055f6a838c74688f1a1288b0f2664b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2512 zcmZvd+j10D6oz*)naKnq2MG`r;{;GtVmt&8MT`OBj72nK2GP5&W~PHJJ>65?Jy3IH zyzps!2)*&f@)>*$4^>w2f8D*4O^Tgb(`)_fu-Bt`lFGT<&!AzqA(7;L6`>p zJbWDB-*oK4xF3xNu0dTEZXR_rtH{QD6NkG=I=nUB-3`+12R|sDGHDb#sm+(kAc*dV z!4vTor?zgIU>hc?s-e4yMJ@aGU&N1tG*e~=dOCC9cVJ-SlHbNCNb_-8`IR}=g@2y( z$Jw1Q%l){IvQg#V5Z?*>eCUsQeLt%F=8Ak~rMs8pe)QFN_(0X|_Wa=}3Npd_{!Q_R z)i(B=qq~)ib#b=e1M1!J<3Td)1;K!L_2SN>!aIJ}do%$n`#3MG_kHrD%2Sqe+Mnn4 zzL%$CO`wd24d=E$3{v07uU70282rn6Vp~`L*{O$-_id6!gB^czr`(Jr)j!q&kDYb> zkn#IXWc|Pn{K|URW$gG!SUci?%{UnQ3)XZnVu8&&7<&qK!ok>2umuOBmtczy#vXy4 zb1-%itW{xl*T6V!%?ym5v^6unTjxa_D=&+$RWkdB{U7??ost)R%hIBUKO>G>TcWdy zM~%qzX;Ht_2ZnrFztq+eahCKYr7mn-!rv11&!Z*XOJ4Z56qmZm2kb^AQyUof9@DcW zni5^EoER|rh5f5~ zk^?w-BGY3q{E5Hp$oQ7C+gr!~4awYx|B52>d{cytC7Z`v!q(Q-)~(&!lF1Dm+a<=Uxv-d0ZA67bISpCPSbygG^{Duh368_h8Kl5QX zI5p8fLU^CJm)`O%Ed9&cFIDn}YG+0-ikLIAWPUg0M;)g`=zdW&W_PB-nBCvHX;Dwk zf3in+R`ijG`{9X0Z(kEJpZTiSE%D51Q-tno#b-w6MJ*A!pDOI4cyN0CbA`Pwo*AI~ zRC!Pz821t9vIwkO-M3O<;LyC@6!LmU#9hpY`7>K=iAj&p+Zx^%4`y>+6A#9**cI_$ z#I)Ge3S&myYL3^$N$+F}knI_R%kBL`6MXt4^$U+_IDGD+hGJoLL#bG3Y-wKx-?xYFT3%>s zE;cl_b~K)3vMq?|MLTDH{rvG=rKa%{_uof;tE9>%wQZdYOdc4PB-Q9`g_d^tF$7IU z4naDQbx3dOI|QlXA4`1-uA08*%x|b$G^1fzXLm!^eM@_3(nM^1!nR3S)k%N(S;sAI zXzXY&6+2oRmbP}RY$%jU#g--ArRFa4rm_0uhYCNy*f|Rp%$Yx{p|P{Gp{umIwYj0S zrMy}86Q;ma(OZ&~ zkQ(w0p`F*>Qd(4KZ|Z2PZ*Fedy?eqG{!Q)G$spPlh1PU_&Ck-QPoN>bPqHm-Id)!q z$9ySCvwH7W9kF7cxSfP(Xj~k?h{ks!7^S894*fyhk>C)!nf+Z)ik65ujsg1PB5gkptDF zz|Zbz?CxTrONI7EjeWBE`+(<`_ilY-A)S6~{nL8-Vq4r%DzqNi-L{0$Ev+xKb+&q! zZH(^+t~5vP{yE!>j&3^cB6oRiygxSH59X^$`}F*pTj;7kX|-J0cOYE-@{W~Rop|<7 zcHaEl*O!XjtUx)RK3<0w+M0`n^1kqV^76jg58TJ6b!6b?r^LsqC@q!X%bT&BdAJ6UEgnkHdJ^H`f(CRi$SoeWmqyW-e=Om|tM3 zmd~5X8CKqxQ{nUbaz=$dr$V2*iC&W&sqQ$_;>+`}5UzYrS0|qjJN0>wG;9)Ioh;i# zuS(j`yI1JjH$CHfYOZfNxjC)6oM#n&9ZQ#XHM1b*J#CXb)yZ1z#g=70IkcaTUMduq zmHjyv(6ggCok-W_dN>aDY$V22B{#w?$!hm`Q{UL!?jG0warEUarA_>wfpd>&e*xUm zm8}{_soa0y3XP53ZQZSf5{Vq=$D43XxqN-o=UZL)b4Sl>D=drtN3iIe0Hwm>mbNn2 zC#i+Yo)JpdlRirqbeB52OXZ&CFbAHY!x6D(XW*+cJeNG4 zFcyS&MCVo=e<8D^()62nvYXAZaNaVQBsXvzK-VgbB_0ib9 z%pvRZxs=my z8}uz{YZ0$n^sQ*M$&Y47Y@K0w#T*PZwTJHBw-0su9FgheTC0;C(dD#{#jbC8{%h;3 zVGMdL(kpGNlU-@8L0*5`JrQdk#;C{U_(@>n!fz_rEBZMC{Pa`vr-i;awXT`wSUFPD zew+{Oj+w_``Yt&F{baB=pW{;4{}G2Zw$d`p@pVYw9>gY3%8UG5To>zcawE zy!`Ui(AS`U^6@FtBJNCd*@DvnV)>#@9XGqzOkfdUA}>S z>n*n&65~G~T_5>;+y&_C?w{5ZcOm*US6|)J-$m&97^5x5c`^9niw5_^eG~ocv(D;? zyF@!;oVIc72G{>m#5Ht1oNMRNIdc4t%{uMVc=yz|Y2CZV+P8b^I>amVo4~PWwcm#H z&eE7!*f~TiydA>$w{_>t3wY0`KzTy0LG`gJnNKPZ4p>lcAKg9YrCnGrlJ?D+L z&RuAobGa#*?%5yf;5_e&?(;+c-7=fGW1hytd9IFSwyl2x5|=*amj;~;eFa(S^od9!Kr+HVSi(MD>bI{X1Y1PlA)$Te*{tLj4 zE9$rbeKC5-Yr}dc_rV!|KdqO#^{B7QIP+P{gXkM*)ve=U^o}8C9~Amy`cEG*+k8)e zorhXl^=C6Z>i;#m_51AE-X{^oYlGh8a!hjO=%wOCYmMqY@4Z~hK48~FY8=^X2^@eD z^B!%~J6gwGO7ql>+X>wotY=DwH&>7Mj`bXDJeR)d8q)fH;Wdf z#`{eay8W-u>8_98K4G`5txIG450KI>s}Nb~@sj>3G7wF5~rgAFGG|po<)%lwR9zts#ZTh(P<)iL-;Hca4IqEnJtj!qj5B11?Kqdul<3y`LPj^L!N8HL!h;d9J5jjCg53InSUeL{KiF1P2kG)Z-$ePnwEm)qL1a^sL69lJ!)zJTa$eFp9ofu zn$)AFlfdRTZXtF0uGI>*R&B<3Hp-b#dplT8eG2WDkPc)4CqO4{G2`UDY#fWRU77v7 ztgjNf`Q*>fxNfj~UnFW;0gh+)*_q!;IDNHQXB(}Yd&qZ&labg%zUNx6>vl?Jvj+83 z(dF#Vb#dRHj>Nu?c|0TI?dvqKy7TV1)`0zOUOxQK1gl5Rv%rzl9P0YSxX%Wg$9lB; zOp$Xu=hA)|iSc+p+Rtd(^D>*dwR{EL*rT%XeHAR{72MY{PI@8hRtxw#qOUgJ7o6{l z$f4~Ui2dkeZEG_wYP%3UYP$d&wOs_(<{bEZxESm@#rf#`e-m9kd@jj+;!M=%QaJgj z^;=-$1>TUwy3gd|J7v^*i9GH9wEvh1X{7j`@3tu?u)p^$!(%Va zyBg&ONaTGH-aOWRd1iB+&GSQabIHe={Ro_2vmc|&dBvLjB;%wPlG$8Wpy;d3HS^w( zzY^Vkv=7XDuLARLGApx3-m4+Cc?EY(#z_ZvZN@p~Scjj&8Lz)~Yq*FSYQfhb&Z$1G z!(|yKz8-u-#@{GUoX>`vz@FQ-K09uqy%q7&ep_a@b?$s7-VQd0>$@B69Z0Ohp4h|h z&dhcj_4)2`7rL?XK0DNJM(ooX#1Z>5aK4Y9qi?Q{yWzE6m-TTE*jRbrZ+=1RWq;c4 zMda*H9CNb(?0BOVeXQj^+6RzzneIIQ3R#Q9K7A*7{&YWL0Z=+#6BKIjC~B5jClV(LHlH;`|cNgK9%v&=hNtNikFRjI{wE|w7Z_q z(mscn-+bd~&FOvhd}cG|8L)c9ya+aCQbo*f;I!S7t|80+!P+)=n;Jd=+eMKhOI69azr(^l=~l9^HPg&Ggs6a#v?DuY-+~cMtuM z*2_Jl?GK2Ydq|w$H}dvVOZx`mK8f1i1Y29!{{(hlcuwj679ywLnHl$Iuz9pOUh~Pt z+W!R{^B#Hs3MU_H|2MFl;$`F7$2s$N2z|VQ`$xt}2lvm6Gd9kn|AsSOf9 zGoLm&^DU+|pKa9hE_fjl_53ebF6z-HXZ%sL#@Exv8TcM}4B|a=EN$d{AFM6>J^+W` z?3~|+U~Tc8_7T`vdF%fVt(hIcaiIQLIt;3j9B zu5q3pgkrq@+MSO^`mtX7)o#C2Xs3!pC-F2fZH!?$x}4%=-!X#|Ju zZ(;u5cK(g)^38BpGdt)cWIf(mlmyFw));;cA$c6vzV7YeU{f&DMMDBL_^_ev; ztXcIAUYgYdZuw2ajEU=gLYnzG8MeJW3d1iyn<9m_y z&q3s(e)p@KHJa0S^H{&OnE$ZZM(%lFee|79s~)z)!S>rheeT8ih@9Ws>PKeW5wsDr z0Gy9mh%V;EEp)NjAW=o7UxfPKE{7x(oEV8^Y^ zwK$CS1SH111e~AOMs&Hz*#wr0x*T6Kl8;%MaWR%<=yDO`Se7ICv9zGaSnR_XeWKqJ z!Hz{g>n_mBMcu7nYlyXK1Iy*-xE)yW7BhK!H<{zi1yVl1NV6vVw1 zIc^4<<0d3>+ya)59JhiahqlTbx5Js^HY9S~0hW&(cY-5_w#X6RAa}u8t9|MFDd(+R zyvu9}9)fsnjrcCJ744uL9t`%J9!l$bjP|<`=PLAjEA(Gh==Wv1n~vQX^UKc1v`&1_P>GU^mXjoQHKg@LfjZ=R# z^ZyuZ%tuIk+kXOCqtbF0VSjt799Z~5@w0<5mTaq3~)5*)d# zOFeRJ1vZy__-_qXk6h~U_uWBY`!~*Kt8+FOEZ-Lizaiko*c9K9^cxDNuQqc#hjR9- zeHd6S^ldWz65`!s+oJ0uAHUOY2bQ;=_uUgUmUr20Na;)K&)Lq*Tc0@ Qx6QAg>$ZWXiTmaM07pW#_W%F@ diff --git a/llpc/test/shaderdb/graphics_library/PipelineVsFs_TestGraphicsLibrary.pipe b/llpc/test/shaderdb/graphics_library/PipelineVsFs_TestGraphicsLibrary.pipe index b9dacc3e36..49dca41847 100644 --- a/llpc/test/shaderdb/graphics_library/PipelineVsFs_TestGraphicsLibrary.pipe +++ b/llpc/test/shaderdb/graphics_library/PipelineVsFs_TestGraphicsLibrary.pipe @@ -22,7 +22,7 @@ colorExport=PipelineLibCes_TestColorExport.pipe ; SHADERTEST-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr addrspace(7) [[TMP0]], i32 4 ; SHADERTEST-NEXT: [[DOT0_IN:%.*]] = select i1 [[TMP4]], ptr addrspace(7) [[TMP0]], ptr addrspace(7) [[TMP5]] ; SHADERTEST-NEXT: [[DOT0:%.*]] = load float, ptr addrspace(7) [[DOT0_IN]], align 4 -; SHADERTEST-NEXT: [[TMP6:%.*]] = call <4 x float> @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) +; SHADERTEST-NEXT: [[TMP6:%.*]] = call <4 x float> @lgc.load.vertex.input__v4f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; SHADERTEST-NEXT: [[TMP7:%.*]] = insertelement <4 x float> [[TMP6]], float 1.000000e+00, i64 3 ; SHADERTEST-NEXT: [[TMP8:%.*]] = insertelement <4 x float> [[TMP7]], float [[DOT0]], i64 2 ; SHADERTEST-NEXT: call void @lgc.output.export.builtin.Position.i32.v4f32(i32 0, <4 x float> [[TMP8]]) #[[ATTR5:[0-9]+]] diff --git a/llpc/test/shaderdb/hlsl/Hlsl_TestLoadRowMajorMatrixInStruct.spvasm b/llpc/test/shaderdb/hlsl/Hlsl_TestLoadRowMajorMatrixInStruct.spvasm index f12f0a1183..dd0e8d9b5e 100644 --- a/llpc/test/shaderdb/hlsl/Hlsl_TestLoadRowMajorMatrixInStruct.spvasm +++ b/llpc/test/shaderdb/hlsl/Hlsl_TestLoadRowMajorMatrixInStruct.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s --validate-spirv=false | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 4, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 20, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 36, i32 0) diff --git a/llpc/test/shaderdb/hlsl/Hlsl_TestStoreRowMajorMatrixInStruct.spvasm b/llpc/test/shaderdb/hlsl/Hlsl_TestStoreRowMajorMatrixInStruct.spvasm index 0888a944e0..3a368ee3a4 100644 --- a/llpc/test/shaderdb/hlsl/Hlsl_TestStoreRowMajorMatrixInStruct.spvasm +++ b/llpc/test/shaderdb/hlsl/Hlsl_TestStoreRowMajorMatrixInStruct.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s --validate-spirv=false | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 0, <4 x i32> %{{[0-9]*}}, i32 64, i32 0, i32 0) ; SHADERTEST : AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/hlsl/Hlsl_TestStructuredBuffers.spvasm b/llpc/test/shaderdb/hlsl/Hlsl_TestStructuredBuffers.spvasm index 3cac157d45..f0702ea139 100644 --- a/llpc/test/shaderdb/hlsl/Hlsl_TestStructuredBuffers.spvasm +++ b/llpc/test/shaderdb/hlsl/Hlsl_TestStructuredBuffers.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s -validate-spirv=false | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.struct.buffer.load.i32{{(\.v4i32)?}}(<4 x i32> [[descriptor:%[0-9]+]], i32 [[index:%[0-9]+]], i32 32, i32 0, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.struct.buffer.load.v4i32{{(\.v4i32)?}}(<4 x i32> [[descriptor]], i32 [[index]], i32 [[sink_idx:%.*]], i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.struct.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[0-9]+}}, <4 x i32> {{%[0-9]+}}, i32 [[index]], i32 0, i32 0, i32 0) diff --git a/llpc/test/shaderdb/multiple_inputs/SpirvTwoEntryPoints.spvasm b/llpc/test/shaderdb/multiple_inputs/SpirvTwoEntryPoints.spvasm index 503b574b72..7548f4f251 100644 --- a/llpc/test/shaderdb/multiple_inputs/SpirvTwoEntryPoints.spvasm +++ b/llpc/test/shaderdb/multiple_inputs/SpirvTwoEntryPoints.spvasm @@ -5,7 +5,7 @@ ; RUN: amdllpc -v %gfxip %s,main_vs \ ; RUN: | FileCheck --check-prefix=SHADERTEST_VS %s ; -; SHADERTEST_VS-LABEL: {{^//}} LLPC pipeline before-patching results +; SHADERTEST_VS-LABEL: {{^//}} LLPC LGC before-lowering results ; SHADERTEST_VS-LABEL: define dllexport spir_func void @lgc.shader.VS.main() ; SHADERTEST_VS-NOT: define dllexport spir_func void @lgc.shader.FS.main() ; SHADERTEST_VS-LABEL: {{^=====}} AMDLLPC SUCCESS ===== @@ -15,7 +15,7 @@ ; RUN: amdllpc -v %gfxip %s,main_fs \ ; RUN: | FileCheck --check-prefix=SHADERTEST_FS %s ; -; SHADERTEST_FS-LABEL: {{^//}} LLPC pipeline before-patching results +; SHADERTEST_FS-LABEL: {{^//}} LLPC LGC before-lowering results ; SHADERTEST_FS-LABEL: define dllexport spir_func void @lgc.shader.FS.main() ; SHADERTEST_FS-NOT: define dllexport spir_func void @lgc.shader.VS.main() ; SHADERTEST_FS-LABEL: {{^=====}} AMDLLPC SUCCESS ===== diff --git a/llpc/test/shaderdb/object/ObjConstant_TestArray_lit.frag b/llpc/test/shaderdb/object/ObjConstant_TestArray_lit.frag index 746b516961..8091133898 100644 --- a/llpc/test/shaderdb/object/ObjConstant_TestArray_lit.frag +++ b/llpc/test/shaderdb/object/ObjConstant_TestArray_lit.frag @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: @{{.*}} = {{.*}} addrspace(4) constant [4 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00] ; SHADERTEST: @{{.*}} = {{.*}} addrspace(4) constant [4 x float] [float 7.000000e+00, float 8.000000e+00, float 9.000000e+00, float 0.000000e+00] ; SHADERTEST: getelementptr [4 x float], ptr addrspace(4) @{{.*}}, i64 0, i64 %{{[0-9]*}} diff --git a/llpc/test/shaderdb/object/ObjConstant_TestMatrix_lit.frag b/llpc/test/shaderdb/object/ObjConstant_TestMatrix_lit.frag index 3aa6c568cd..f50c5f5b37 100644 --- a/llpc/test/shaderdb/object/ObjConstant_TestMatrix_lit.frag +++ b/llpc/test/shaderdb/object/ObjConstant_TestMatrix_lit.frag @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: @{{.*}} = {{.*}} addrspace(4) constant [4 x <4 x float>] [<4 x float> zeroinitializer, ; SHADERTEST: getelementptr [4 x <4 x float>], ptr addrspace(4) @{{.*}}, i64 0, i64 %{{[0-9]*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantArraySize_lit.vert b/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantArraySize_lit.vert index 1e079dfc16..8b88a9d9b2 100644 --- a/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantArraySize_lit.vert +++ b/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantArraySize_lit.vert @@ -19,7 +19,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call i32 (...) @lgc.create.smod.i32(i32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: srem i32 %{{.*}}, 6 ; SHADERTEST-DAG: icmp slt i32 %{{[0-9]*}}, 0 ; SHADERTEST-DAG: icmp ne i32 %{{[0-9]*}}, 0 diff --git a/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantOp_lit.vert b/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantOp_lit.vert index 20b260badb..e8b04ee082 100644 --- a/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantOp_lit.vert +++ b/llpc/test/shaderdb/object/ObjConstant_TestSpecConstantOp_lit.vert @@ -28,7 +28,7 @@ void main() ; SHADERTEST: fadd reassoc nnan nsz arcp contract afn float %{{[0-9]*}}, %{{[0-9]*}} ; SHADERTEST: fadd reassoc nnan nsz arcp contract afn <4 x float> %{{[0-9]*}}, %{{[0-9]*}} ; SHADERTEST: fadd reassoc nnan nsz arcp contract afn <2 x float> %{{[0-9]*}}, %{{[0-9]*}} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.builtin.Position{{.*}}v4f32(i32 0, <4 x float> ) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjConstant_TestSpecialSourceSwizzle_lit.frag b/llpc/test/shaderdb/object/ObjConstant_TestSpecialSourceSwizzle_lit.frag index 9bfcc950a9..44f723c277 100644 --- a/llpc/test/shaderdb/object/ObjConstant_TestSpecialSourceSwizzle_lit.frag +++ b/llpc/test/shaderdb/object/ObjConstant_TestSpecialSourceSwizzle_lit.frag @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic.i32.i32.v4f32(i32 0, i32 0, <4 x float> ) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjConstant_TestStruct_lit.frag b/llpc/test/shaderdb/object/ObjConstant_TestStruct_lit.frag index b253a2bb0b..6c69ef0a68 100644 --- a/llpc/test/shaderdb/object/ObjConstant_TestStruct_lit.frag +++ b/llpc/test/shaderdb/object/ObjConstant_TestStruct_lit.frag @@ -34,7 +34,7 @@ void main() ; SHADERTEST: store { [3 x <3 x float>], [3 x <3 x float>], i32, <2 x i32> } { [3 x <3 x float>] [<3 x float> {{(splat \(float 0x3FB99999A0000000\))|()}}, <3 x float> {{(splat \(float 5\.000000e\-01\))|()}}, <3 x float> {{(splat \(float 1\.000000e\+00\))|()}}], [3 x <3 x float>] [<3 x float> , <3 x float> , <3 x float> ], i32 1, <2 x i32> {{(splat \(i32 5\))|()}} }, ptr addrspace(5) %{{[0-9]*}} ; SHADERTEST: load i32, ptr addrspace(5) %{{[0-9]*}} ; SHADERTEST: trunc i32 %{{[0-9]*}} to i1 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjFragMask_TestFragFetch_lit.frag b/llpc/test/shaderdb/object/ObjFragMask_TestFragFetch_lit.frag index 2c030c2c71..d3414c42ce 100644 --- a/llpc/test/shaderdb/object/ObjFragMask_TestFragFetch_lit.frag +++ b/llpc/test/shaderdb/object/ObjFragMask_TestFragFetch_lit.frag @@ -31,13 +31,13 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 6, i32 512, ptr addrspace(4) ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 2, i32 512, ptr addrspace(4) ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 7, i32 512, ptr addrspace(4) ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 1, i32 544, ptr addrspace(4) ; SHADERTEST: call <4 x i32> (...) @lgc.create.image.load.v4i32(i32 6, i32 544, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16 ; SHADERTEST: call i32 @llvm.amdgcn.image.load.3d.i32.i16{{(\.v8i32)?}}(i32 1, i16 2, i16 3, i16 1, <8 x i32> %{{.*}}, i32 0, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.image.load.2darraymsaa.v4i32.i32{{(\.v8i32)?}}(i32 15, i32 2, i32 3, i32 1, i32 %{{[-0-9A-Za0z_.]+}}, <8 x i32> %{{[-0-9A-Za0z_.]+}}, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjImage_TestCubeAtomicAdd_lit.comp b/llpc/test/shaderdb/object/ObjImage_TestCubeAtomicAdd_lit.comp index 3563dbf489..4dfc678e43 100644 --- a/llpc/test/shaderdb/object/ObjImage_TestCubeAtomicAdd_lit.comp +++ b/llpc/test/shaderdb/object/ObjImage_TestCubeAtomicAdd_lit.comp @@ -18,7 +18,7 @@ void main (void) ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 8, i32 513, i32 0, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.image.atomic.i32(i32 2, i32 8, i32 513, i32 0, ptr addrspace(4) ; SHADERTEST-LABEL: {{^// LLPC}} final pipeline module info diff --git a/llpc/test/shaderdb/object/ObjImage_TestMemoryQualifier_lit.frag b/llpc/test/shaderdb/object/ObjImage_TestMemoryQualifier_lit.frag index 921561a6de..c785eb1568 100644 --- a/llpc/test/shaderdb/object/ObjImage_TestMemoryQualifier_lit.frag +++ b/llpc/test/shaderdb/object/ObjImage_TestMemoryQualifier_lit.frag @@ -19,7 +19,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 0, i32 513, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 512, ptr addrspace(4) ; SHADERTEST: call void (...) @lgc.create.image.store(<4 x float> %{{[^,]*}}, i32 9, i32 515, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 0, i32 513, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 512, ptr addrspace(4) ; SHADERTEST: call void (...) @lgc.create.image.store(<4 x float> %{{[^,]*}}, i32 9, i32 515, ptr addrspace(4) diff --git a/llpc/test/shaderdb/object/ObjInput_TestCsBuiltIn_lit.comp b/llpc/test/shaderdb/object/ObjInput_TestCsBuiltIn_lit.comp index 005d530722..ca6accd956 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestCsBuiltIn_lit.comp +++ b/llpc/test/shaderdb/object/ObjInput_TestCsBuiltIn_lit.comp @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 (...) @lgc.create.read.builtin.input.i32(i32 29, ; SHADERTEST: call <3 x i32> (...) @lgc.create.read.builtin.input.v3i32(i32 27, ; SHADERTEST: call <3 x i32> (...) @lgc.create.read.builtin.input.v3i32(i32 26, diff --git a/llpc/test/shaderdb/object/ObjInput_TestDrawParams_lit.vert b/llpc/test/shaderdb/object/ObjInput_TestDrawParams_lit.vert index c6621939e5..878bb35ec9 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestDrawParams_lit.vert +++ b/llpc/test/shaderdb/object/ObjInput_TestDrawParams_lit.vert @@ -17,7 +17,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST-DAG: [[BASEINSTANCE:%.*]] = call i32 @lgc.special.user.data.BaseInstance( ; SHADERTEST-DAG: [[INSTANCEID:%.*]] = call i32 @lgc.shader.input.InstanceId( diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsBasic_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsBasic_lit.frag index f9af92c4c7..20f3645f88 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsBasic_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsBasic_lit.frag @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call <2 x i32> (...) @lgc.input.import.interpolated__v2i32{{.*}} ; SHADERTEST-DAG: call i32 (...) @lgc.input.import.interpolated__{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsBuiltIn_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsBuiltIn_lit.frag index f01a44e886..0685031f7d 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsBuiltIn_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsBuiltIn_lit.frag @@ -27,7 +27,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call i32 @lgc.input.import.builtin.ViewIndex{{.*}} ; SHADERTEST-DAG: call i1 (...) @lgc.create.is.helper.invocation.i1{{.*}} ; SHADERTEST-DAG: call i32 @lgc.input.import.builtin.ViewportIndex{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsCompSpecifier_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsCompSpecifier_lit.frag index bf40a879ee..c1e25e8e31 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsCompSpecifier_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsCompSpecifier_lit.frag @@ -14,10 +14,10 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <2 x float> (...) @lgc.input.import.interpolated__v2f32{{.*}} ; SHADERTEST: call float (...) @lgc.input.import.interpolated__f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call float @llvm.amdgcn.interp.p1(float %{{[^,]*}}, i32 1, i32 0, i32 %PrimMask) ; SHADERTEST: call float @llvm.amdgcn.interp.p2(float %{{[^,]*}}, float %{{[^,]*}}, i32 1, i32 0, i32 %PrimMask) ; SHADERTEST: call float @llvm.amdgcn.interp.p1(float %{{[^,]*}}, i32 3, i32 0, i32 %PrimMask) diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsDouble_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsDouble_lit.frag index 914956eddf..45ac7423ec 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsDouble_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsDouble_lit.frag @@ -23,12 +23,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call <4 x double> (...) @lgc.input.import.interpolated__v4f64 ; SHADERTEST-DAG: call <4 x double> (...) @lgc.input.import.interpolated__v4f64 ; SHADERTEST-DAG: call <3 x double> (...) @lgc.input.import.interpolated__v3f64 ; SHADERTEST-DAG: call <3 x double> (...) @lgc.input.import.interpolated__v3f64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-28: call float @llvm.amdgcn.interp.mov ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsInBlock_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsInBlock_lit.frag index e03faaf867..d3ded8d6aa 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsInBlock_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsInBlock_lit.frag @@ -28,14 +28,14 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call i32 (...) @lgc.input.import.interpolated__{{.*}} ; SHADERTEST-DAG: call <3 x float> (...) @lgc.input.import.interpolated__v3f32{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.mov ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.p1 ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.p2 diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierInBlock_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierInBlock_lit.frag index c9fce2119c..32850f194b 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierInBlock_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierInBlock_lit.frag @@ -21,11 +21,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call i32 (...) @lgc.input.import.interpolated{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.mov ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.p1 ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.p2 diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierOnStruct_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierOnStruct_lit.frag index c8e91574e7..9ad6580c38 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierOnStruct_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifierOnStruct_lit.frag @@ -21,10 +21,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} ; SHADERTEST: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.p1 ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.p2 ; SHADERTEST-DAG: call float @llvm.amdgcn.interp.p1 diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifier_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifier_lit.frag index d5dd5b613e..a07fbf5cfe 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifier_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsInterpQualifier_lit.frag @@ -26,9 +26,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-7: call float (...) @lgc.input.import.interpolated__f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call float @llvm.amdgcn.interp.p1 ; SHADERTEST: call float @llvm.amdgcn.interp.p2 ; SHADERTEST: call float @llvm.amdgcn.interp.p1 diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsMatrixArray_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsMatrixArray_lit.frag index 1be22c2a5b..9186c2da12 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsMatrixArray_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsMatrixArray_lit.frag @@ -17,9 +17,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-8: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-32: call float @llvm.amdgcn.interp.mov ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsMatrix_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsMatrix_lit.frag index fa4fd55558..91f6eeabb7 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsMatrix_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsMatrix_lit.frag @@ -17,9 +17,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-4: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-16: call float @llvm.amdgcn.interp.mov ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsNonVolatileHelperInvocation.spvasm b/llpc/test/shaderdb/object/ObjInput_TestFsNonVolatileHelperInvocation.spvasm index 1f4ace81b9..971095bdb8 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsNonVolatileHelperInvocation.spvasm +++ b/llpc/test/shaderdb/object/ObjInput_TestFsNonVolatileHelperInvocation.spvasm @@ -4,7 +4,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-1: call i1 @lgc.input.import.builtin.HelperInvocation{{.*}} ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsStruct_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsStruct_lit.frag index 2e984447dd..8fc0904485 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsStruct_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsStruct_lit.frag @@ -28,12 +28,12 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call i32 (...) @lgc.input.import.interpolated{{.*}} ; SHADERTEST-DAG: call <3 x float> (...) @lgc.input.import.interpolated__v3f32{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} ; SHADERTEST-DAG: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-20: call float @llvm.amdgcn.interp.mov ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsVectorArray_lit.frag b/llpc/test/shaderdb/object/ObjInput_TestFsVectorArray_lit.frag index 2c51efffd8..8fbb8e2834 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsVectorArray_lit.frag +++ b/llpc/test/shaderdb/object/ObjInput_TestFsVectorArray_lit.frag @@ -17,9 +17,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-2: call <4 x float> (...) @lgc.input.import.interpolated__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-8: call float @llvm.amdgcn.interp.mov ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestFsVolatileHelperInvocation.spvasm b/llpc/test/shaderdb/object/ObjInput_TestFsVolatileHelperInvocation.spvasm index 22932237a0..b23f91cf08 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestFsVolatileHelperInvocation.spvasm +++ b/llpc/test/shaderdb/object/ObjInput_TestFsVolatileHelperInvocation.spvasm @@ -4,7 +4,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-1: call i1 (...) @lgc.create.is.helper.invocation{{.*}} ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/object/ObjInput_TestGsBasic_lit.geom b/llpc/test/shaderdb/object/ObjInput_TestGsBasic_lit.geom index f202bc005b..edef171228 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestGsBasic_lit.geom +++ b/llpc/test/shaderdb/object/ObjInput_TestGsBasic_lit.geom @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-3: call float @lgc.input.import.generic__f32{{.*}} ; SHADERTEST-COUNT-3: call <4 x double> @lgc.input.import.generic__v4f64{{.*}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjInput_TestGsBuiltIn_lit.geom b/llpc/test/shaderdb/object/ObjInput_TestGsBuiltIn_lit.geom index 29438a3b8b..34bf02692e 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestGsBuiltIn_lit.geom +++ b/llpc/test/shaderdb/object/ObjInput_TestGsBuiltIn_lit.geom @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call [3 x float] @lgc.input.import.builtin.CullDistance.a3f32{{.*}} ; SHADERTEST: call [3 x float] @lgc.input.import.builtin.CullDistance.a3f32{{.*}} ; SHADERTEST: call [3 x float] @lgc.input.import.builtin.CullDistance.a3f32{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestGsCompSpecifier_lit.geom b/llpc/test/shaderdb/object/ObjInput_TestGsCompSpecifier_lit.geom index 84097bdf3a..94f104869e 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestGsCompSpecifier_lit.geom +++ b/llpc/test/shaderdb/object/ObjInput_TestGsCompSpecifier_lit.geom @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call float @lgc.input.import.generic__f32(i1 false, i32 0, i32 0, i32 0, i32 0) ; SHADERTEST: call float @lgc.input.import.generic__f32(i1 false, i32 0, i32 0, i32 0, i32 1) ; SHADERTEST: call float @lgc.input.import.generic__f32(i1 false, i32 0, i32 0, i32 0, i32 2) diff --git a/llpc/test/shaderdb/object/ObjInput_TestTcsBasic_lit.tesc b/llpc/test/shaderdb/object/ObjInput_TestTcsBasic_lit.tesc index a957e6757f..c9cb5db6c0 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTcsBasic_lit.tesc +++ b/llpc/test/shaderdb/object/ObjInput_TestTcsBasic_lit.tesc @@ -15,7 +15,7 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 @lgc.input.import.builtin.InvocationId{{.*}} ; SHADERTEST: call float @lgc.input.import.generic__f32{{.*}} ; SHADERTEST: call i32 @lgc.input.import.builtin.InvocationId{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestTcsBuiltIn_lit.tesc b/llpc/test/shaderdb/object/ObjInput_TestTcsBuiltIn_lit.tesc index 7a1b49078b..60fd1a805d 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTcsBuiltIn_lit.tesc +++ b/llpc/test/shaderdb/object/ObjInput_TestTcsBuiltIn_lit.tesc @@ -20,7 +20,7 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call i32 @lgc.input.import.builtin.InvocationId{{.*}} ; SHADERTEST: call <4 x float> @lgc.input.import.builtin.Position.v4f32{{.*}} ; SHADERTEST: call i32 @lgc.input.import.builtin.InvocationId{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestTcsCompSpecifier_lit.tesc b/llpc/test/shaderdb/object/ObjInput_TestTcsCompSpecifier_lit.tesc index bf39f8e45b..950ea50b9f 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTcsCompSpecifier_lit.tesc +++ b/llpc/test/shaderdb/object/ObjInput_TestTcsCompSpecifier_lit.tesc @@ -14,7 +14,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call float @lgc.input.import.generic__f32(i1 false, i32 0, i32 0, i32 2, i32 % ; SHADERTEST: call <2 x float> @lgc.input.import.generic__v2f32(i1 false, i32 0, i32 0, i32 0, i32 % ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjInput_TestTcsLoadEntireInputArray_lit.spvasm b/llpc/test/shaderdb/object/ObjInput_TestTcsLoadEntireInputArray_lit.spvasm index 2d33266762..f76d860e66 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTcsLoadEntireInputArray_lit.spvasm +++ b/llpc/test/shaderdb/object/ObjInput_TestTcsLoadEntireInputArray_lit.spvasm @@ -2,7 +2,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-6: call <3 x float> @lgc.input.import.generic__v3f32{{.*}} ; SHADERTEST: AMDLLPC SUCCESS ; END_SHADERTEST diff --git a/llpc/test/shaderdb/object/ObjInput_TestTcsViewIndex.spvasm b/llpc/test/shaderdb/object/ObjInput_TestTcsViewIndex.spvasm index 4562da5465..fead961269 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTcsViewIndex.spvasm +++ b/llpc/test/shaderdb/object/ObjInput_TestTcsViewIndex.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC before-lowering results ; SHADERTEST: call i32 @lgc.input.import.builtin.ViewIndex.i32.i32.i32.i32(i32 4440, i32 -1, i32 -1) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjInput_TestTesBasic_lit.tese b/llpc/test/shaderdb/object/ObjInput_TestTesBasic_lit.tese index b5bd89a05b..2e14480abf 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTesBasic_lit.tese +++ b/llpc/test/shaderdb/object/ObjInput_TestTesBasic_lit.tese @@ -13,7 +13,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <4 x float> @lgc.input.import.generic__v4f32{{.*}} ; SHADERTEST: call i32 @lgc.input.import.builtin.PrimitiveId{{.*}} ; SHADERTEST: call double @lgc.input.import.generic__f64{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestTesBuiltIn_lit.tese b/llpc/test/shaderdb/object/ObjInput_TestTesBuiltIn_lit.tese index 10015ee71d..95d6eaed45 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTesBuiltIn_lit.tese +++ b/llpc/test/shaderdb/object/ObjInput_TestTesBuiltIn_lit.tese @@ -26,7 +26,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <3 x float> @lgc.input.import.builtin.TessCoord.v3f32{{.*}} ; SHADERTEST: call <4 x float> @lgc.input.import.builtin.Position.v4f32{{.*}} ; SHADERTEST: call float @lgc.input.import.builtin.PointSize.f32{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestTesCompSpecifier_lit.tese b/llpc/test/shaderdb/object/ObjInput_TestTesCompSpecifier_lit.tese index 92c4356219..00913c5eda 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTesCompSpecifier_lit.tese +++ b/llpc/test/shaderdb/object/ObjInput_TestTesCompSpecifier_lit.tese @@ -15,7 +15,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call <2 x float> @lgc.input.import.generic__v2f32(i1 true, i32 0, i32 0, i32 0, i32 poison) ; SHADERTEST: call float @lgc.input.import.generic__f32(i1 true, i32 0, i32 0, i32 2, i32 poison) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjInput_TestTesComplexInBlock_lit.tese b/llpc/test/shaderdb/object/ObjInput_TestTesComplexInBlock_lit.tese index 4dce2bd4a8..2e1320f9ce 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTesComplexInBlock_lit.tese +++ b/llpc/test/shaderdb/object/ObjInput_TestTesComplexInBlock_lit.tese @@ -36,7 +36,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call float @lgc.input.import.generic__f32{{.*}} ; SHADERTEST-DAG: call float @lgc.input.import.generic{{.*}} ; SHADERTEST-DAG: call <4 x float> @lgc.input.import.generic__v4f32{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestTesComplexPatchInBlock_lit.tese b/llpc/test/shaderdb/object/ObjInput_TestTesComplexPatchInBlock_lit.tese index f71f93b716..ebd07b33e2 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTesComplexPatchInBlock_lit.tese +++ b/llpc/test/shaderdb/object/ObjInput_TestTesComplexPatchInBlock_lit.tese @@ -54,7 +54,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-1: call float @lgc.input.import.generic__f32{{.*}} ; SHADERTEST-COUNT-1: call i32 @lgc.input.import.generic{{.*}} ; SHADERTEST-COUNT-4: call float @lgc.input.import.generic__f32{{.*}} diff --git a/llpc/test/shaderdb/object/ObjInput_TestTesConstExpr_lit.tese b/llpc/test/shaderdb/object/ObjInput_TestTesConstExpr_lit.tese index a653e7c9c6..d7fa9c6056 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestTesConstExpr_lit.tese +++ b/llpc/test/shaderdb/object/ObjInput_TestTesConstExpr_lit.tese @@ -22,7 +22,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-3: call float @lgc.input.import.builtin.TessCoord.f32{{.*}} ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestVsBasic_lit.vert b/llpc/test/shaderdb/object/ObjInput_TestVsBasic_lit.vert index ff3931a4a2..b230d1ec5b 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestVsBasic_lit.vert +++ b/llpc/test/shaderdb/object/ObjInput_TestVsBasic_lit.vert @@ -16,11 +16,11 @@ void main() /* ; RUN: amdllpc -auto-layout-desc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call <2 x i32> @lgc.load.vertex.input__v2i32{{.*}} ; SHADERTEST-DAG: call i32 @lgc.load.vertex.input{{.*}} ; SHADERTEST-DAG: call <4 x float> @lgc.load.vertex.input__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-3: call {{.*}} @llvm.amdgcn.struct.tbuffer.load ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestVsBuiltIn_lit.vert b/llpc/test/shaderdb/object/ObjInput_TestVsBuiltIn_lit.vert index d91a9080a3..4be495798b 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestVsBuiltIn_lit.vert +++ b/llpc/test/shaderdb/object/ObjInput_TestVsBuiltIn_lit.vert @@ -9,7 +9,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST-DAG: call i32 @lgc.special.user.data.BaseInstance(i32 268435460) ; SHADERTEST-DAG: call i32 @lgc.shader.input.VertexId(i32 1{{[0-9]*}}) ; SHADERTEST-DAG: call i32 @lgc.special.user.data.BaseVertex(i32 268435459) diff --git a/llpc/test/shaderdb/object/ObjInput_TestVsCompSpecifier_lit.vert b/llpc/test/shaderdb/object/ObjInput_TestVsCompSpecifier_lit.vert index 016d4a14ce..7ba7cb4e66 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestVsCompSpecifier_lit.vert +++ b/llpc/test/shaderdb/object/ObjInput_TestVsCompSpecifier_lit.vert @@ -14,10 +14,10 @@ void main() /* ; RUN: amdllpc -auto-layout-desc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST: call <2 x float> @lgc.load.vertex.input__v2f32(i1 false, i32 0, i32 0, i32 1, i32 poison, i32 poison, i32 poison) -; SHADERTEST: call float @lgc.load.vertex.input__f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST: call <2 x float> @lgc.load.vertex.input__v2f32(i1 false, i32 0, i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) +; SHADERTEST: call float @lgc.load.vertex.input__f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} @llvm.amdgcn.struct.tbuffer.load ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestVsDouble_lit.vert b/llpc/test/shaderdb/object/ObjInput_TestVsDouble_lit.vert index 39b8c55ba7..ec7546f841 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestVsDouble_lit.vert +++ b/llpc/test/shaderdb/object/ObjInput_TestVsDouble_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -auto-layout-desc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-DAG: call <4 x double> @lgc.load.vertex.input__v4f64{{.*}} ; SHADERTEST-DAG: call <4 x double> @lgc.load.vertex.input__v4f64{{.*}} ; SHADERTEST-DAG: call <4 x double> @lgc.load.vertex.input__v4f64{{.*}} @@ -29,7 +29,7 @@ void main() ; SHADERTEST-DAG: call <4 x double> @lgc.load.vertex.input__v4f64{{.*}} ; SHADERTEST-DAG: call <3 x double> @lgc.load.vertex.input__v3f64{{.*}} ; SHADERTEST-DAG: call <3 x double> @lgc.load.vertex.input__v3f64{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-12: call i32 @llvm.amdgcn.struct.tbuffer.load.i32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjInput_TestVsVectorArray_lit.vert b/llpc/test/shaderdb/object/ObjInput_TestVsVectorArray_lit.vert index 7456d3e753..7493a50e18 100644 --- a/llpc/test/shaderdb/object/ObjInput_TestVsVectorArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjInput_TestVsVectorArray_lit.vert @@ -15,9 +15,9 @@ void main() /* ; RUN: amdllpc -auto-layout-desc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-2: call <4 x float> @lgc.load.vertex.input__v4f32{{.*}} -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-4: call i32 @llvm.amdgcn.struct.tbuffer.load.i32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjNonUniform_TestImageSample.frag b/llpc/test/shaderdb/object/ObjNonUniform_TestImageSample.frag index 09afc6ec30..78f0ae2433 100644 --- a/llpc/test/shaderdb/object/ObjNonUniform_TestImageSample.frag +++ b/llpc/test/shaderdb/object/ObjNonUniform_TestImageSample.frag @@ -27,16 +27,16 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 512, ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 896, ; SHADERTEST: call {{.*}} @lgc.create.image.sample.v4f32(i32 1, i32 536, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline before-patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC before-lowering results ; SHADERTEST: call <8 x i32> @llvm.amdgcn.readfirstlane.v8i32 ; SHADERTEST: call <4 x i32> @llvm.amdgcn.readfirstlane.v4i32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: {{%[0-9]*}} = call float @llvm.amdgcn.interp.mov ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjNonUniform_TestMinNonUniform.spvasm b/llpc/test/shaderdb/object/ObjNonUniform_TestMinNonUniform.spvasm index 735df1edb9..b5a032473f 100644 --- a/llpc/test/shaderdb/object/ObjNonUniform_TestMinNonUniform.spvasm +++ b/llpc/test/shaderdb/object/ObjNonUniform_TestMinNonUniform.spvasm @@ -1,6 +1,6 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call ptr addrspace(7) @lgc.load.buffer.desc(i64 0, i32 2, i32 {{.*}}, i32 3) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestFsBasic_lit.frag b/llpc/test/shaderdb/object/ObjOutput_TestFsBasic_lit.frag index 20dd43eece..421d75d255 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestFsBasic_lit.frag +++ b/llpc/test/shaderdb/object/ObjOutput_TestFsBasic_lit.frag @@ -15,7 +15,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}i32 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestFsBuiltIn_lit.frag b/llpc/test/shaderdb/object/ObjOutput_TestFsBuiltIn_lit.frag index e4c0d7c216..59b768c19f 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestFsBuiltIn_lit.frag +++ b/llpc/test/shaderdb/object/ObjOutput_TestFsBuiltIn_lit.frag @@ -14,11 +14,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.builtin.FragDepth{{.*}}f32 ; SHADERTEST: call void @lgc.output.export.builtin.SampleMask.i32.a1i32 ; SHADERTEST: call void @lgc.output.export.builtin.FragStencilRef -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: ret { <4 x float>, i32 } ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestFsCompSpecifier_lit.frag b/llpc/test/shaderdb/object/ObjOutput_TestFsCompSpecifier_lit.frag index 61fa985404..1b95487d4f 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestFsCompSpecifier_lit.frag +++ b/llpc/test/shaderdb/object/ObjOutput_TestFsCompSpecifier_lit.frag @@ -15,7 +15,7 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v2f32(i32 0, i32 1, <2 x float> %{{[0-9]*}}) ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32(i32 0, i32 3, float %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestFsVector_lit.frag b/llpc/test/shaderdb/object/ObjOutput_TestFsVector_lit.frag index 9730af9283..942189bae5 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestFsVector_lit.frag +++ b/llpc/test/shaderdb/object/ObjOutput_TestFsVector_lit.frag @@ -15,7 +15,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3i32 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestGsBasic_lit.geom b/llpc/test/shaderdb/object/ObjOutput_TestGsBasic_lit.geom index 41c27417f9..b26fcbe1f7 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestGsBasic_lit.geom +++ b/llpc/test/shaderdb/object/ObjOutput_TestGsBasic_lit.geom @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f64 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestGsBuiltIn_lit.geom b/llpc/test/shaderdb/object/ObjOutput_TestGsBuiltIn_lit.geom index a1959278ed..45990561aa 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestGsBuiltIn_lit.geom +++ b/llpc/test/shaderdb/object/ObjOutput_TestGsBuiltIn_lit.geom @@ -28,7 +28,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.builtin.PrimitiveId{{.*}} ; SHADERTEST: call void @lgc.output.export.builtin.Layer{{.*}} ; SHADERTEST: call void @lgc.output.export.builtin.ViewportIndex{{.*}} diff --git a/llpc/test/shaderdb/object/ObjOutput_TestGsCompSpecifier_lit.geom b/llpc/test/shaderdb/object/ObjOutput_TestGsCompSpecifier_lit.geom index 3fe2eb065b..38d4e9cf71 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestGsCompSpecifier_lit.geom +++ b/llpc/test/shaderdb/object/ObjOutput_TestGsCompSpecifier_lit.geom @@ -22,7 +22,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32(i32 0, i32 1, i32 0, <3 x float> {{(splat \(float 3\.000000e\+00\))|()}}) ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32(i32 0, i32 0, i32 0, float 1.500000e+00) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTcsBasic_lit.tesc b/llpc/test/shaderdb/object/ObjOutput_TestTcsBasic_lit.tesc index 97fc92daa1..07380a86a4 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTcsBasic_lit.tesc +++ b/llpc/test/shaderdb/object/ObjOutput_TestTcsBasic_lit.tesc @@ -22,7 +22,7 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f64 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32 ; SHADERTEST: call double @lgc.output.import.generic__f64{{.*}} diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTcsBuiltIn_lit.tesc b/llpc/test/shaderdb/object/ObjOutput_TestTcsBuiltIn_lit.tesc index 42c0cb721a..411a37a678 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTcsBuiltIn_lit.tesc +++ b/llpc/test/shaderdb/object/ObjOutput_TestTcsBuiltIn_lit.tesc @@ -22,7 +22,7 @@ void main (void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.builtin.Position{{.*}}v4f32 ; SHADERTEST: call void @lgc.output.export.builtin.PointSize{{.*}}f32 ; SHADERTEST: call void @lgc.output.export.builtin.ClipDistance{{.*}}f32 diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTcsCompSpecifier_lit.tesc b/llpc/test/shaderdb/object/ObjOutput_TestTcsCompSpecifier_lit.tesc index 7bdf565c9d..ef9a35f460 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTcsCompSpecifier_lit.tesc +++ b/llpc/test/shaderdb/object/ObjOutput_TestTcsCompSpecifier_lit.tesc @@ -15,7 +15,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v2f32(i32 0, i32 0, i32 0, i32 %{{[^,]*}}, <2 x float> % ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32(i32 0, i32 0, i32 2, i32 %{{[^,]*}}, float % ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexOutBlock_lit.tesc b/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexOutBlock_lit.tesc index b3b8156b4a..61a9aa5ece 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexOutBlock_lit.tesc +++ b/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexOutBlock_lit.tesc @@ -32,7 +32,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}} ; SHADERTEST: call void @lgc.output.export.generic{{.*}}.v4f32 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}.f32 diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexPatchOutBlock_lit.tesc b/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexPatchOutBlock_lit.tesc index b4f29e5e6d..2925ac0944 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexPatchOutBlock_lit.tesc +++ b/llpc/test/shaderdb/object/ObjOutput_TestTcsComplexPatchOutBlock_lit.tesc @@ -54,7 +54,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32 ; SHADERTEST: void @lgc.output.export.generic{{.*}} ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f32 diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTcsConstExpr_lit.tesc b/llpc/test/shaderdb/object/ObjOutput_TestTcsConstExpr_lit.tesc index 14aaaf49c7..bf67f2bf39 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTcsConstExpr_lit.tesc +++ b/llpc/test/shaderdb/object/ObjOutput_TestTcsConstExpr_lit.tesc @@ -19,7 +19,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32(i32 0, i32 0, i32 0, i32 -1, float 0x3FE6666660000000) ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32(i32 0, i32 0, i32 1, i32 -1, float 4.500000e+00) ; SHADERTEST: call float @lgc.output.import.generic__f32{{.*}}(i1 true, i32 0, i32 0, i32 1, i32 poison) diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTesBasic_lit.tese b/llpc/test/shaderdb/object/ObjOutput_TestTesBasic_lit.tese index f25ec290ad..5ccb4c8091 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTesBasic_lit.tese +++ b/llpc/test/shaderdb/object/ObjOutput_TestTesBasic_lit.tese @@ -14,7 +14,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f64 ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTesBuiltIn_lit.tese b/llpc/test/shaderdb/object/ObjOutput_TestTesBuiltIn_lit.tese index 5d08ec5f9e..9ce5e3ef65 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTesBuiltIn_lit.tese +++ b/llpc/test/shaderdb/object/ObjOutput_TestTesBuiltIn_lit.tese @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.builtin.Layer{{.*}} ; SHADERTEST: call void @lgc.output.export.builtin.ViewportIndex{{.*}} ; SHADERTEST: call void @lgc.output.export.builtin.Position{{.*}}v4f32 diff --git a/llpc/test/shaderdb/object/ObjOutput_TestTesCompSpecifier_lit.tese b/llpc/test/shaderdb/object/ObjOutput_TestTesCompSpecifier_lit.tese index f62ad77635..369eccd404 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestTesCompSpecifier_lit.tese +++ b/llpc/test/shaderdb/object/ObjOutput_TestTesCompSpecifier_lit.tese @@ -16,7 +16,7 @@ void main(void) /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v2f32(i32 0, i32 0, <2 x float> %{{[0-9]*}}) ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32(i32 0, i32 2, float %{{.*}}) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsBasic_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsBasic_lit.vert index d00ec9909d..f96d14f954 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsBasic_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsBasic_lit.vert @@ -19,11 +19,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: call void @lgc.output.export.generic{{.*}} ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v2i32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsBuiltIn_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsBuiltIn_lit.vert index f2f8d2eaca..6b5684005c 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsBuiltIn_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsBuiltIn_lit.vert @@ -16,14 +16,14 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.builtin.Layer{{.*}} ; SHADERTEST: call void @lgc.output.export.builtin.ViewportIndex{{.*}} ; SHADERTEST: call void @lgc.output.export.builtin.Position{{.*}}v4f32 ; SHADERTEST: call void @lgc.output.export.builtin.PointSize{{.*}}f32 ; SHADERTEST: call void @lgc.output.export.builtin.ClipDistance{{.*}}a4f32 ; SHADERTEST: call void @lgc.output.export.builtin.CullDistance{{.*}}a2f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsCompSpecifier_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsCompSpecifier_lit.vert index fb23e94c0b..6c64f48e5a 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsCompSpecifier_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsCompSpecifier_lit.vert @@ -12,10 +12,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32(i32 0, i32 0, float 2.000000e+00) ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v2f32(i32 0, i32 2, <2 x float> ) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsDouble_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsDouble_lit.vert index 80a8a5fdf5..61d01df9fe 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsDouble_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsDouble_lit.vert @@ -19,10 +19,10 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f64 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v2f64 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsMatrix.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsMatrix.vert index 9ec052a67d..0c8274ea8a 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsMatrix.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsMatrix.vert @@ -15,8 +15,8 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-5: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsMatrixArray.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsMatrixArray.vert index 2ee9da8969..31b9f6c074 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsMatrixArray.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsMatrixArray.vert @@ -17,8 +17,8 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-9: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsNoBuiltIn_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsNoBuiltIn_lit.vert index 47791f2ca7..cf1d90ae8b 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsNoBuiltIn_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsNoBuiltIn_lit.vert @@ -11,9 +11,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsNoGeneric_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsNoGeneric_lit.vert index ef435c8b3e..35171f0dd1 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsNoGeneric_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsNoGeneric_lit.vert @@ -8,9 +8,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.builtin.Position.i32.v4f32(i32 0, <4 x float> {{(splat \(float 5\.000000e\-01\))|()}}) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsOutBlock_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsOutBlock_lit.vert index 09b9fbc7e7..7f2300c7d9 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsOutBlock_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsOutBlock_lit.vert @@ -25,7 +25,7 @@ void main() ; SHADERTEST: call void @lgc.output.export.generic{{.*}} ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsStruct_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsStruct_lit.vert index 3187d5f099..b3be3b6f9d 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsStruct_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsStruct_lit.vert @@ -24,11 +24,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}} ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v3f32 ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjOutput_TestVsVectorArray_lit.vert b/llpc/test/shaderdb/object/ObjOutput_TestVsVectorArray_lit.vert index fdb541f0b9..616db685f3 100644 --- a/llpc/test/shaderdb/object/ObjOutput_TestVsVectorArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjOutput_TestVsVectorArray_lit.vert @@ -16,9 +16,9 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void @lgc.output.export.generic{{.*}}v4f32 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.exp.f32 ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjPushConst_TestBasic_lit.vert b/llpc/test/shaderdb/object/ObjPushConst_TestBasic_lit.vert index fcb866b11b..65dd382178 100644 --- a/llpc/test/shaderdb/object/ObjPushConst_TestBasic_lit.vert +++ b/llpc/test/shaderdb/object/ObjPushConst_TestBasic_lit.vert @@ -14,7 +14,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: [[V0:%.*]] = call {{.*}} @lgc.create.load.push.constants.ptr ; SHADERTEST: load <4 x float>, ptr addrspace(4) [[V0]], align 16 diff --git a/llpc/test/shaderdb/object/ObjPushConst_TestNestedStruct_lit.vert b/llpc/test/shaderdb/object/ObjPushConst_TestNestedStruct_lit.vert index bf94763ca2..2039876a88 100644 --- a/llpc/test/shaderdb/object/ObjPushConst_TestNestedStruct_lit.vert +++ b/llpc/test/shaderdb/object/ObjPushConst_TestNestedStruct_lit.vert @@ -20,7 +20,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: [[V0:%.*]] = call {{.*}} @lgc.create.load.push.constants.ptr ; SHADERTEST: [[V1:%.*]] = getelementptr {{.*}} addrspace(4) [[V0]], i64 {{8|0, i32 1, i32 1}} ; SHADERTEST: load float, ptr addrspace(4) [[V1]], align 4 diff --git a/llpc/test/shaderdb/object/ObjPushConst_TestSpillToMemory_lit.vert b/llpc/test/shaderdb/object/ObjPushConst_TestSpillToMemory_lit.vert index 71fb771f2d..f42bf0d371 100644 --- a/llpc/test/shaderdb/object/ObjPushConst_TestSpillToMemory_lit.vert +++ b/llpc/test/shaderdb/object/ObjPushConst_TestSpillToMemory_lit.vert @@ -15,7 +15,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: [[V0:%.*]] = call {{.*}} @lgc.create.load.push.constants.ptr ; SHADERTEST: [[V1:%.*]] = getelementptr {{.*}} addrspace(4) [[V0]], i64 {{144|0, i32 1, i64 8}} ; SHADERTEST: load <4 x float>, ptr addrspace(4) [[V1]], align 16 diff --git a/llpc/test/shaderdb/object/ObjPushConstant_TestBasic_lit.frag b/llpc/test/shaderdb/object/ObjPushConstant_TestBasic_lit.frag index 21f3f3c362..290851a55a 100644 --- a/llpc/test/shaderdb/object/ObjPushConstant_TestBasic_lit.frag +++ b/llpc/test/shaderdb/object/ObjPushConstant_TestBasic_lit.frag @@ -33,7 +33,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: [[V0:%.*]] = call {{.*}} @lgc.create.load.push.constants.ptr ; SHADERTEST: [[V1:%.*]] = getelementptr {{.*}} addrspace(4) [[V0]], i64 {{64|0, i32 4}} ; SHADERTEST: load <4 x float>, ptr addrspace(4) [[V1]], align 16 diff --git a/llpc/test/shaderdb/object/ObjPushConstant_TestMultiPushConstant_lit.spvasm b/llpc/test/shaderdb/object/ObjPushConstant_TestMultiPushConstant_lit.spvasm index 93b1adc6cc..4e7e077bea 100644 --- a/llpc/test/shaderdb/object/ObjPushConstant_TestMultiPushConstant_lit.spvasm +++ b/llpc/test/shaderdb/object/ObjPushConstant_TestMultiPushConstant_lit.spvasm @@ -1,7 +1,7 @@ ; BEGIN_SHADERTEST ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: [[V0:%.*]] = call {{.*}} @lgc.create.load.push.constants.ptr ; SHADERTEST: load <4 x float>, ptr addrspace(4) [[V0]], align 16 diff --git a/llpc/test/shaderdb/object/ObjResource_TestAlias_lit.frag b/llpc/test/shaderdb/object/ObjResource_TestAlias_lit.frag index 37f246212a..bedeefb8b3 100644 --- a/llpc/test/shaderdb/object/ObjResource_TestAlias_lit.frag +++ b/llpc/test/shaderdb/object/ObjResource_TestAlias_lit.frag @@ -44,7 +44,7 @@ void main() ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 512, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 512, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call {{.*}} {{.*}}@lgc.load.buffer.desc{{.*}}(i64 0, i32 1,{{.*}} ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.load.v4f32(i32 1, i32 512, ptr addrspace(4) diff --git a/llpc/test/shaderdb/object/ObjSampler_TestLargeId_lit.frag b/llpc/test/shaderdb/object/ObjSampler_TestLargeId_lit.frag index d04cd7195d..1520c02b44 100644 --- a/llpc/test/shaderdb/object/ObjSampler_TestLargeId_lit.frag +++ b/llpc/test/shaderdb/object/ObjSampler_TestLargeId_lit.frag @@ -45,7 +45,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> zeroinitializer) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> zeroinitializer) ; SHADERTEST: call reassoc nnan nsz arcp contract afn <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 512, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, ptr addrspace(4) %{{[-0-9A-Za0z_.]+}}, i32 1, <2 x float> zeroinitializer) diff --git a/llpc/test/shaderdb/object/ObjSampler_TestSeparateSamplerShadow_lit.frag b/llpc/test/shaderdb/object/ObjSampler_TestSeparateSamplerShadow_lit.frag index ec7abe4d3c..4900dc339b 100644 --- a/llpc/test/shaderdb/object/ObjSampler_TestSeparateSamplerShadow_lit.frag +++ b/llpc/test/shaderdb/object/ObjSampler_TestSeparateSamplerShadow_lit.frag @@ -16,7 +16,7 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: call reassoc nnan nsz arcp contract afn float (...) @lgc.create.image.sample.f32(i32 1, i32 512, ptr addrspace(4) -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call {{.*}} float @llvm.amdgcn.image.sample.c.lz.2d.f32.f16{{(\.v8i32)?}}{{(\.v4i32)?}}(i32 1, float 0.000000e+00, half 0xH0000, half 0xH0000, <8 x i32> %{{.*}}, <4 x i32> %{{.*}}, i1 false, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjShaderBallot_TestGeneral_lit.comp b/llpc/test/shaderdb/object/ObjShaderBallot_TestGeneral_lit.comp index 901c075912..9108068f81 100644 --- a/llpc/test/shaderdb/object/ObjShaderBallot_TestGeneral_lit.comp +++ b/llpc/test/shaderdb/object/ObjShaderBallot_TestGeneral_lit.comp @@ -38,7 +38,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC.*}} FE lowering results ; SHADERTEST: call <4 x i32> (...) @lgc.create.subgroup.ballot.v4i32( ; SHADERTEST: call i32 (...) @lgc.create.subgroup.broadcast.i32( ; SHADERTEST: call i32 (...) @lgc.create.subgroup.broadcast.i32( @@ -52,7 +52,7 @@ void main() ; SHADERTEST: call i32 (...) @lgc.create.subgroup.broadcast.first.i32( ; SHADERTEST: call i32 (...) @lgc.create.subgroup.broadcast.first.i32( -; SHADERTEST-LABEL: {{^// LLPC.*}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.readlane{{(.i32)?}}(i32 %{{.*}}, i32 %{{.*}}) ; SHADERTEST: call i32 @llvm.amdgcn.readfirstlane{{(.i32)?}}(i32 %{{.*}}) ; SHADERTEST-COUNT-5: call i32 @llvm.amdgcn.readlane{{(.i32)?}}(i32 %{{.*}}, i32 %{{.*}}) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestAlign_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestAlign_lit.frag index e4f780bdf9..cdb2575c49 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestAlign_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestAlign_lit.frag @@ -38,7 +38,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} pipeline patching +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> {{%[^,]+}}, i32 16, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 64, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestDirectIndex_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestDirectIndex_lit.frag index f9735af23a..b18ccf05a1 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestDirectIndex_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestDirectIndex_lit.frag @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 0, <4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1077936128, <4 x i32> {{%[^,]+}}, i32 16, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1077936128, <4 x i32> {{%[^,]+}}, i32 20, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestDouble_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestDouble_lit.frag index edbccc11fb..9357c6cfce 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestDouble_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestDouble_lit.frag @@ -25,7 +25,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.raw.buffer.load.v4i32{{(\.v4i32)?}}(<4 x i32> %{{[0-9]*}}, i32 32 ; SHADERTEST: call <4 x i32> @llvm.amdgcn.raw.buffer.load.v4i32{{(\.v4i32)?}}(<4 x i32> %{{[0-9]*}}, i32 48 ; SHADERTEST: call <2 x i32> @llvm.amdgcn.raw.buffer.load.v2i32{{(\.v4i32)?}}(<4 x i32> %{{[0-9]*}}, i32 8 diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestIndirectIndex_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestIndirectIndex_lit.frag index d4cacc188d..301e47b4ae 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestIndirectIndex_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestIndirectIndex_lit.frag @@ -34,7 +34,7 @@ void main() ; SHADERTEST: %{{[0-9]*}} = getelementptr [2 x <{ i32, [12 x i8], [4 x float], [2 x [4 x float]] }>], ptr addrspace(7) @{{[a-z0-9]+}}, i32 0, i32 %{{[0-9]*}}, i32 2 ; SHADERTEST: %{{[0-9]*}} = getelementptr [2 x <{ i32, [12 x i8], [4 x float], [2 x [4 x float]] }>], ptr addrspace(7) @{{[a-z0-9]+}}, i32 0, i32 %{{[0-9]*}}, i32 3, i32 %{{[0-9]*}} -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST-COUNT-3: call ptr addrspace(7) @lgc.load.buffer.desc(i64 0, i32 0, i32 %{{[0-9]*}}, ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMatrixInStruct_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestMatrixInStruct_lit.vert index 9a89c0cb7d..9e5219fb51 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMatrixInStruct_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMatrixInStruct_lit.vert @@ -21,7 +21,7 @@ void main() // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> {{%[^,]+}}, i32 64, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt16.comp b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt16.comp index 68ccb7b578..b45c8aa596 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt16.comp +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt16.comp @@ -18,7 +18,7 @@ void main() { // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i16 @llvm.amdgcn.raw.buffer.load.i16{{(\.v4i32)?}}( ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i16{{(\.v4i32)?}}( ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt32.comp b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt32.comp index 913015b8cc..b88d64b72e 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt32.comp +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt32.comp @@ -16,7 +16,7 @@ void main() { // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.load.i32{{(\.v4i32)?}}( ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}} ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.load.i32{{(\.v4i32)?}}( diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt8.comp b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt8.comp index 284ed7ea75..6d3cd23ffa 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt8.comp +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemCpyInt8.comp @@ -18,7 +18,7 @@ void main() { // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i8 @llvm.amdgcn.raw.buffer.load.i8{{(\.v4i32)?}}( ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i8{{(\.v4i32)?}}( ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt16.comp b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt16.comp index 514d56199d..8558704ab3 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt16.comp +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt16.comp @@ -17,7 +17,7 @@ void main() { // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i16{{(\.v4i32)?}}(i16 0, <4 x i32> {{%[^,]+}}, i32 {{%[^,]+}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt32.comp b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt32.comp index 035f9a4b9f..b4c3a0f408 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt32.comp +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt32.comp @@ -15,7 +15,7 @@ void main() { // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-COUNT-32: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 0, ; SHADERTEST-LABEL: {{^// LLPC}} final pipeline module info ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt8.comp b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt8.comp index 6d57dc1899..d3edfd2970 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt8.comp +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemSetInt8.comp @@ -17,7 +17,7 @@ void main() { // BEGIN_SHADERTEST /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i8{{(\.v4i32)?}}(i8 0, <4 x i32> {{%[^,]+}}, i32 {{%[^,]+}}, i32 0, i32 0) ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemoryQualifier_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemoryQualifier_lit.frag index f630d5d615..79c71df2f0 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMemoryQualifier_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMemoryQualifier_lit.frag @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = call ptr addrspace(7) @lgc.load.buffer.desc(i64 1, i32 0, i32 0, ; SHADERTEST: %{{[0-9]*}} = load atomic float, ptr addrspace(7) %{{[0-9]*}} unordered, align 4 ; SHADERTEST: store atomic float %{{[0-9a-z.]*}}, ptr addrspace(7) %{{[0-9]*}} unordered, align 4 diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestMultiLevelAccessChain_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestMultiLevelAccessChain_lit.vert index fc3aa10870..9cdbf97e20 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestMultiLevelAccessChain_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestMultiLevelAccessChain_lit.vert @@ -28,7 +28,7 @@ void main() ; SHADERTEST: getelementptr { <4 x float> }, ptr addrspace({{.*}}) %{{[a-z0-9]*}}, i32 0, i32 0 ; SHADERTEST: getelementptr {{(inbounds )?}}(<{ [3 x float], [4 x i8], <{ [4 x float] }> }>, ptr addrspace({{.*}}) @{{.*}}, i32 0, i32 2 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: store <4 x float> {{(splat \(float 1\.000000e\+00\))|()}}, ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestOffset_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestOffset_lit.frag index 1087e08244..3113847140 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestOffset_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestOffset_lit.frag @@ -38,7 +38,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> %{{.*}}, <4 x i32> %{{[0-9]*}}, i32 128 ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 256 ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v2i32{{(\.v4i32)?}}(<2 x i32> %{{.*}}, <4 x i32> %{{[0-9]*}}, i32 512 diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicDouble_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicDouble_lit.vert index 9636a79cd4..2182dda624 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicDouble_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicDouble_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <2 x i32> @llvm.amdgcn.raw.buffer.load.v2i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v2i32{{(\.v4i32)?}}(<2 x i32> {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.raw.buffer.load.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 16, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicFloat_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicFloat_lit.vert index 3654ad56b8..84501c040f 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicFloat_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicFloat_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.load.i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call <2 x i32> @llvm.amdgcn.raw.buffer.load.v2i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 8, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicInt_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicInt_lit.vert index 642ec27303..9d287f3fe2 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicInt_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicInt_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.load.i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call <2 x i32> @llvm.amdgcn.raw.buffer.load.v2i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 8, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicUint_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicUint_lit.vert index ea07102131..278933a082 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicUint_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreBasicUint_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.raw.buffer.load.i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 0, i32 0, i32 0) ; SHADERTEST: call <2 x i32> @llvm.amdgcn.raw.buffer.load.v2i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, i32 8, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrixArray_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrixArray_lit.vert index 73e4c32284..6ee39dd6d1 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrixArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrixArray_lit.vert @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{(splat \(i32 1065353216\))|()}}, <4 x i32> %{{[0-9]*}}, i32 16, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{(splat \(i32 1065353216\))|()}}, <4 x i32> %{{[0-9]*}}, i32 32, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 48, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrix_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrix_lit.vert index d6b4a03ef9..ea1c923268 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrix_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMatrix_lit.vert @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 16, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 32, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 48, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMixedMatrixStyle_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMixedMatrixStyle_lit.frag index 3680489041..6ec89741ef 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMixedMatrixStyle_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreMixedMatrixStyle_lit.frag @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 20, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 28, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 36, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreRowMajorMatrix_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreRowMajorMatrix_lit.frag index f98931778b..632fcefea6 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreRowMajorMatrix_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreRowMajorMatrix_lit.frag @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1036831949, <4 x i32> {{%[^,]+}}, i32 16, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1045220557, <4 x i32> {{%[^,]+}}, i32 24, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1050253722, <4 x i32> {{%[^,]+}}, i32 32, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreScalarArray_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreScalarArray_lit.vert index ce52f6fdde..94ac80c6c9 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreScalarArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreScalarArray_lit.vert @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 4, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> %{{[0-9]*}}, i32 8, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreStruct_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreStruct_lit.vert index d123f39b0b..32af0321bd 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreStruct_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreStruct_lit.vert @@ -23,7 +23,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 96, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 112, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 128, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrixArray_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrixArray_lit.vert index 8ec88a46fb..efcae99365 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrixArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrixArray_lit.vert @@ -19,7 +19,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> {{%[^,]+}}, i32 256, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> {{%[^,]+}}, i32 260, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> {{%[^,]+}}, i32 264, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrix_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrix_lit.vert index 4466c39700..0714115f0f 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrix_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToMatrix_lit.vert @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> {{%[^,]+}}, i32 32, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> {{%[^,]+}}, i32 36, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> {{%[^,]+}}, i32 40, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToRowMajorMatrix_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToRowMajorMatrix_lit.frag index e7a46b8605..613ce955c8 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToRowMajorMatrix_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToRowMajorMatrix_lit.frag @@ -16,7 +16,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 20, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 28, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 {{%[^,]+}}, <4 x i32> {{%[^,]+}}, i32 36, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToScalarVectorArray_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToScalarVectorArray_lit.vert index 4e6c59c0c7..73ff4a56bc 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToScalarVectorArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreToScalarVectorArray_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 23, <4 x i32> {{%[^,]+}}, i32 28, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 45, <4 x i32> {{%[^,]+}}, i32 {{%[^,]+}}, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.i32{{(\.v4i32)?}}(i32 1073741824, <4 x i32> {{%[^,]+}}, i32 96, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreVectorArray_lit.vert b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreVectorArray_lit.vert index c29f47a8b2..de7cde28aa 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreVectorArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestStoreVectorArray_lit.vert @@ -20,7 +20,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> %{{[0-9]*}}, <4 x i32> %{{[0-9]*}}, i32 16, i32 0, i32 0) ; SHADERTEST: call void @llvm.amdgcn.raw.buffer.store.v4i32{{(\.v4i32)?}}(<4 x i32> {{(splat \(i32 1065353216\))|()}}, <4 x i32> %{{[0-9]*}}, i32 32, i32 0, i32 0) diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestUseStorageBuffer_lit.frag b/llpc/test/shaderdb/object/ObjStorageBlock_TestUseStorageBuffer_lit.frag index 5e44808b01..05bdf14bfd 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestUseStorageBuffer_lit.frag +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestUseStorageBuffer_lit.frag @@ -18,8 +18,8 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results -; SHADERTEST: call i32 {{.*}}@lgc.buffer.length( +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results +; SHADERTEST: call i64 {{.*}}@lgc.buffer.length( ; SHADERTEST: AMDLLPC SUCCESS */ diff --git a/llpc/test/shaderdb/object/ObjStorageBlock_TestVectorComponentStore_lit.comp b/llpc/test/shaderdb/object/ObjStorageBlock_TestVectorComponentStore_lit.comp index 8166c511b5..5d011113a3 100644 --- a/llpc/test/shaderdb/object/ObjStorageBlock_TestVectorComponentStore_lit.comp +++ b/llpc/test/shaderdb/object/ObjStorageBlock_TestVectorComponentStore_lit.comp @@ -15,7 +15,7 @@ void main() ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s ; REQUIRES: do-not-run-me -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: %{{[0-9]*}} = call ptr addrspace(7) @lgc.load.buffer.desc(i64 0, i32 0, i32 0, ; SHADERTEST: %{{[0-9]*}} = load float, ptr addrspace(7) %{{[0-9]*}}, align 4 ; SHADERTEST: %{{[0-9]*}} = getelementptr inbounds <{ [4 x float] }>, ptr addrspace(7) %{{[0-9]*}}, i64 0, i32 0, i64 1 diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestAlign_lit.frag b/llpc/test/shaderdb/object/ObjUniformBlock_TestAlign_lit.frag index 00493e92d8..4c3d87dcde 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestAlign_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestAlign_lit.frag @@ -27,7 +27,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC.*}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC.*}} LGC lowering results ; SHADERTEST-DAG: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 64, i32 0) ; SHADERTEST-DAG: call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32> %{{[0-9]*}}, i32 256, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestDirectIndex_lit.frag b/llpc/test/shaderdb/object/ObjUniformBlock_TestDirectIndex_lit.frag index 3b21275d95..cfddbcec6d 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestDirectIndex_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestDirectIndex_lit.frag @@ -19,11 +19,11 @@ void main() ; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results ; SHADERTEST: getelementptr {{(inbounds )?}}([4 x <{ [4 x float], [10 x [4 x float]] }>], ptr addrspace({{.*}}) @{{.*}}, i32 0, i32 3, i32 1, i32 5 -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call {{.*}} {{.*}}@lgc.load.buffer.desc(i64 1, i32 0, i32 0 ; SHADERTEST: call {{.*}} {{.*}}@lgc.load.buffer.desc(i64 1, i32 0, i32 3 -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 96, i32 0) ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestIndirectIndex_lit.frag b/llpc/test/shaderdb/object/ObjUniformBlock_TestIndirectIndex_lit.frag index 48d3483eb7..96af207de5 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestIndirectIndex_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestIndirectIndex_lit.frag @@ -22,7 +22,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 %{{[0-9a-z.]*}}, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicDouble_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicDouble_lit.vert index 836a397af4..ece92ad7cb 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicDouble_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicDouble_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 64, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 80, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicFloat_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicFloat_lit.vert index 768ac62635..8a0a2f5242 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicFloat_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicFloat_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) ; SHADERTEST: call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 24, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicInt_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicInt_lit.vert index 797ed97d32..7d79645cb5 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicInt_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicInt_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) ; SHADERTEST: call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 24, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicUint_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicUint_lit.vert index 01324d0b40..98949a0fd5 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicUint_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadBasicUint_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) ; SHADERTEST: call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 24, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrixArray_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrixArray_lit.vert index 591e923d48..c980b409e7 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrixArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrixArray_lit.vert @@ -15,7 +15,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 256, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 %{{[0-9a-z.]*}}, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 240, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrix_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrix_lit.vert index 7f9e548c22..4ff4e5a72a 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrix_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromMatrix_lit.vert @@ -15,7 +15,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 64, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 %{{[0-9a-z.]*}}, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromRowMajorMatrix_lit.frag b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromRowMajorMatrix_lit.frag index 4ca7215a38..82c8cea514 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromRowMajorMatrix_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromRowMajorMatrix_lit.frag @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 20, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 36, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 52, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromScalarVectorArray_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromScalarVectorArray_lit.vert index 33b1bcc1ef..30251dc053 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromScalarVectorArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadFromScalarVectorArray_lit.vert @@ -17,7 +17,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 448, i32 0) ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 112, i32 0) ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 %{{[0-9a-z.]*}}, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMatrix_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMatrix_lit.vert index 18fb5a4d15..7edfacd88f 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMatrix_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMatrix_lit.vert @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 48, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMixedMatrixStyle_lit.frag b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMixedMatrixStyle_lit.frag index 918f8a212b..78dcb969d2 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMixedMatrixStyle_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadMixedMatrixStyle_lit.frag @@ -19,7 +19,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-LABEL: call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST-LABEL: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 8, i32 0) ; SHADERTEST-LABEL: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 20, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadNestedStruct_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadNestedStruct_lit.vert index 960800e7d4..7afc1434c5 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadNestedStruct_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadNestedStruct_lit.vert @@ -26,7 +26,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadRowMajorMatrix_lit.frag b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadRowMajorMatrix_lit.frag index 026be72352..04582beb8e 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadRowMajorMatrix_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadRowMajorMatrix_lit.frag @@ -17,7 +17,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> {{%[^,]+}}, i32 20, i32 0) ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> {{%[^,]+}}, i32 36, i32 0) ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> {{%[^,]+}}, i32 52, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadScalarArray_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadScalarArray_lit.vert index 43c1a0f059..d5b0a22952 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadScalarArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadScalarArray_lit.vert @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadStruct_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadStruct_lit.vert index 8f6bdb5afb..46151ae51e 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadStruct_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadStruct_lit.vert @@ -21,7 +21,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: [[TMP23:%.*]] = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0) ; SHADERTEST: freeze i32 [[TMP23]] ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadVectorArray_lit.vert b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadVectorArray_lit.vert index 37bd207072..19e8016cde 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadVectorArray_lit.vert +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestLoadVectorArray_lit.vert @@ -18,7 +18,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 32, i32 0) ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 48, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformBlock_TestOffset_lit.frag b/llpc/test/shaderdb/object/ObjUniformBlock_TestOffset_lit.frag index 4c4af7148a..d411c25e5e 100644 --- a/llpc/test/shaderdb/object/ObjUniformBlock_TestOffset_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformBlock_TestOffset_lit.frag @@ -27,7 +27,7 @@ void main() /* ; RUN: amdllpc -enable-load-scalarizer=false -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-DAG: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 128, i32 0) ; SHADERTEST-DAG: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 256, i32 0) ; SHADERTEST-DAG: call <2 x i32> @llvm.amdgcn.s.buffer.load.v2i32(<4 x i32> %{{[0-9]*}}, i32 512, i32 0) diff --git a/llpc/test/shaderdb/object/ObjUniformConstant_TestArray_lit.frag b/llpc/test/shaderdb/object/ObjUniformConstant_TestArray_lit.frag index 55b590d70c..cb38aa03ab 100644 --- a/llpc/test/shaderdb/object/ObjUniformConstant_TestArray_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformConstant_TestArray_lit.frag @@ -16,7 +16,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %{{[0-9]*}}, i32 48, i32 0), !invariant.load ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 %{{[0-9a-z.]*}}, i32 0), !invariant.load diff --git a/llpc/test/shaderdb/object/ObjUniformConstant_TestSimple_lit.frag b/llpc/test/shaderdb/object/ObjUniformConstant_TestSimple_lit.frag index 98ed886143..0d3d74dfef 100644 --- a/llpc/test/shaderdb/object/ObjUniformConstant_TestSimple_lit.frag +++ b/llpc/test/shaderdb/object/ObjUniformConstant_TestSimple_lit.frag @@ -16,11 +16,11 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: load <4 x float>, ; SHADERTEST: load <4 x float>, -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0), !invariant.load ; SHADERTEST: call <4 x i32> @llvm.amdgcn.s.buffer.load.v4i32(<4 x i32> %{{[0-9]*}}, i32 16, i32 0), !invariant.load diff --git a/llpc/test/shaderdb/object/ObjXfb_TestBasic_lit.vert b/llpc/test/shaderdb/object/ObjXfb_TestBasic_lit.vert index cd73292ff0..653908e0e2 100644 --- a/llpc/test/shaderdb/object/ObjXfb_TestBasic_lit.vert +++ b/llpc/test/shaderdb/object/ObjXfb_TestBasic_lit.vert @@ -13,7 +13,7 @@ void main() /* ; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results +; SHADERTEST-LABEL: {{^// LLPC}} FE lowering results ; SHADERTEST: call void (...) @lgc.write.xfb.output(i32 0, i32 16, i32 0, <4 x float> {{(splat \(float 2\.000000e\+00\))|()}} ; SHADERTEST: AMDLLPC SUCCESS diff --git a/llpc/test/shaderdb/ray_tracing/PipelineRays_TestWaveSize.pipe b/llpc/test/shaderdb/ray_tracing/PipelineRays_TestWaveSize.pipe new file mode 100644 index 0000000000..7b7b575466 --- /dev/null +++ b/llpc/test/shaderdb/ray_tracing/PipelineRays_TestWaveSize.pipe @@ -0,0 +1,332 @@ +; Check that the ray tracing pipeline is compiled in Wave32 mode (which is the only one we support so far). + +; BEGIN_SHADERTEST +; RUN: amdllpc -o - -filetype=asm %gfxip %s | FileCheck -check-prefix=CHECK %s +; CHECK: .wavefront_size: 0x20 + +[Version] +version = 53 + +[rgenGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable + +layout(binding = 0, set = 0) uniform accelerationStructureEXT g_bvh; +layout(binding = 1, set = 0, rgba32f) uniform image2D g_dst; + +layout(location = 0) rayPayloadEXT vec3 g_ray; + +void main() { + vec3 origin; + origin.x = gl_LaunchIDEXT.x; + origin.y = gl_LaunchIDEXT.y; + origin.z = 0; + + traceRayEXT(g_bvh, /* ray flags */ 0, /* cull mask */ 0xff, + /* sbt offset */ 0, /* sbt stride */ 1, /* miss index */ 0, + origin.xyz, /* tmin */ 0.0, /* direction */ vec3(1, 0, 0), + /* tmax */ 48.0, /* payload location */ 0); + + imageStore(g_dst, ivec2(gl_LaunchIDEXT.xy), vec4(g_ray, 0)); +} + +[rgenInfo] +entryPoint = main +options.trapPresent = 0 +options.debugMode = 0 +options.enablePerformanceData = 0 +options.allowReZ = 0 +options.vgprLimit = 0 +options.sgprLimit = 0 +options.maxThreadGroupsPerComputeUnit = 0 +options.waveSize = 32 +options.wgpMode = 0 +options.waveBreakSize = None +options.forceLoopUnrollCount = 0 +options.useSiScheduler = 0 +options.updateDescInElf = 0 +options.allowVaryWaveSize = 0 +options.enableLoadScalarizer = 0 +options.disableLicm = 0 +options.unrollThreshold = 0 +options.scalarThreshold = 0 +options.disableLoopUnroll = 0 +options.fp32DenormalMode = Auto +options.adjustDepthImportVrs = 0 +options.disableLicmThreshold = 0 +options.unrollHintThreshold = 0 +options.dontUnrollHintThreshold = 0 + +[missGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable + +void main() +{ +} + + +[missInfo] +entryPoint = main +options.trapPresent = 0 +options.debugMode = 0 +options.enablePerformanceData = 0 +options.allowReZ = 0 +options.vgprLimit = 0 +options.sgprLimit = 0 +options.maxThreadGroupsPerComputeUnit = 0 +options.waveSize = 0 +options.wgpMode = 0 +options.waveBreakSize = None +options.forceLoopUnrollCount = 0 +options.useSiScheduler = 0 +options.updateDescInElf = 0 +options.allowVaryWaveSize = 0 +options.enableLoadScalarizer = 0 +options.disableLicm = 0 +options.unrollThreshold = 0 +options.scalarThreshold = 0 +options.disableLoopUnroll = 0 +options.fp32DenormalMode = Auto +options.adjustDepthImportVrs = 0 +options.disableLicmThreshold = 0 +options.unrollHintThreshold = 0 +options.dontUnrollHintThreshold = 0 + +[chitGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable + +layout(location = 0) rayPayloadInEXT vec3 hitValue; + +void main() +{ + hitValue = vec3(3, 4, 5); +} + +[chitInfo] +entryPoint = main +options.trapPresent = 0 +options.debugMode = 0 +options.enablePerformanceData = 0 +options.allowReZ = 0 +options.vgprLimit = 0 +options.sgprLimit = 0 +options.maxThreadGroupsPerComputeUnit = 0 +options.waveSize = 0 +options.wgpMode = 0 +options.waveBreakSize = None +options.forceLoopUnrollCount = 0 +options.useSiScheduler = 0 +options.updateDescInElf = 0 +options.allowVaryWaveSize = 0 +options.enableLoadScalarizer = 0 +options.disableLicm = 0 +options.unrollThreshold = 0 +options.scalarThreshold = 0 +options.disableLoopUnroll = 0 +options.fp32DenormalMode = Auto +options.adjustDepthImportVrs = 0 +options.disableLicmThreshold = 0 +options.unrollHintThreshold = 0 +options.dontUnrollHintThreshold = 0 + +[sectGlsl] +#version 460 +#extension GL_EXT_ray_tracing : enable + +void main() +{ + reportIntersectionEXT(0.5, 0u); +} + +[sectInfo] +entryPoint = main +options.trapPresent = 0 +options.debugMode = 0 +options.enablePerformanceData = 0 +options.allowReZ = 0 +options.vgprLimit = 0 +options.sgprLimit = 0 +options.maxThreadGroupsPerComputeUnit = 0 +options.waveSize = 0 +options.wgpMode = 0 +options.waveBreakSize = None +options.forceLoopUnrollCount = 0 +options.useSiScheduler = 0 +options.updateDescInElf = 0 +options.allowVaryWaveSize = 0 +options.enableLoadScalarizer = 0 +options.disableLicm = 0 +options.unrollThreshold = 0 +options.scalarThreshold = 0 +options.disableLoopUnroll = 0 +options.fp32DenormalMode = Auto +options.adjustDepthImportVrs = 0 +options.disableLicmThreshold = 0 +options.unrollHintThreshold = 0 +options.dontUnrollHintThreshold = 0 + +[ResourceMapping] +userDataNode[0].visibility = 1728 +userDataNode[0].type = DescriptorTableVaPtr +userDataNode[0].offsetInDwords = 0 +userDataNode[0].sizeInDwords = 1 +userDataNode[0].next[0].type = DescriptorConstBuffer +userDataNode[0].next[0].offsetInDwords = 0 +userDataNode[0].next[0].sizeInDwords = 4 +userDataNode[0].next[0].set = 0x00000000 +userDataNode[0].next[0].binding = 0 +userDataNode[0].next[1].type = DescriptorImage +userDataNode[0].next[1].offsetInDwords = 4 +userDataNode[0].next[1].sizeInDwords = 8 +userDataNode[0].next[1].set = 0x00000000 +userDataNode[0].next[1].binding = 1 +userDataNode[0].next[2].type = DescriptorImage +userDataNode[0].next[2].offsetInDwords = 12 +userDataNode[0].next[2].sizeInDwords = 8 +userDataNode[0].next[2].set = 0x00000000 +userDataNode[0].next[2].binding = 2 +userDataNode[0].next[3].type = DescriptorConstBuffer +userDataNode[0].next[3].offsetInDwords = 20 +userDataNode[0].next[3].sizeInDwords = 4 +userDataNode[0].next[3].set = 0x00000000 +userDataNode[0].next[3].binding = 3 +userDataNode[0].next[4].type = DescriptorBuffer +userDataNode[0].next[4].offsetInDwords = 24 +userDataNode[0].next[4].sizeInDwords = 4 +userDataNode[0].next[4].set = 0x00000000 +userDataNode[0].next[4].binding = 4 +userDataNode[0].next[5].type = DescriptorBuffer +userDataNode[0].next[5].offsetInDwords = 28 +userDataNode[0].next[5].sizeInDwords = 4 +userDataNode[0].next[5].set = 0x00000000 +userDataNode[0].next[5].binding = 5 +userDataNode[0].next[6].type = DescriptorBuffer +userDataNode[0].next[6].offsetInDwords = 32 +userDataNode[0].next[6].sizeInDwords = 4 +userDataNode[0].next[6].set = 0x00000000 +userDataNode[0].next[6].binding = 6 +userDataNode[0].next[7].type = DescriptorBuffer +userDataNode[0].next[7].offsetInDwords = 36 +userDataNode[0].next[7].sizeInDwords = 4 +userDataNode[0].next[7].set = 0x00000000 +userDataNode[0].next[7].binding = 7 +userDataNode[0].next[8].type = DescriptorCombinedTexture +userDataNode[0].next[8].offsetInDwords = 40 +userDataNode[0].next[8].sizeInDwords = 12 +userDataNode[0].next[8].set = 0x00000000 +userDataNode[0].next[8].binding = 8 +userDataNode[0].next[9].type = DescriptorBuffer +userDataNode[0].next[9].offsetInDwords = 52 +userDataNode[0].next[9].sizeInDwords = 4 +userDataNode[0].next[9].set = 0x00000000 +userDataNode[0].next[9].binding = 9 +userDataNode[1].visibility = 4032 +userDataNode[1].type = DescriptorTableVaPtr +userDataNode[1].offsetInDwords = 2 +userDataNode[1].sizeInDwords = 1 +userDataNode[1].next[0].type = DescriptorConstBufferCompact +userDataNode[1].next[0].offsetInDwords = 0 +userDataNode[1].next[0].sizeInDwords = 2 +userDataNode[1].next[0].set = 0x0000005D +userDataNode[1].next[0].binding = 17 +userDataNode[1].next[1].type = DescriptorConstBuffer +userDataNode[1].next[1].offsetInDwords = 2 +userDataNode[1].next[1].sizeInDwords = 4 +userDataNode[1].next[1].set = 0x0000005D +userDataNode[1].next[1].binding = 0 +userDataNode[1].next[2].type = DescriptorBuffer +userDataNode[1].next[2].offsetInDwords = 6 +userDataNode[1].next[2].sizeInDwords = 4 +userDataNode[1].next[2].set = 0x0000005D +userDataNode[1].next[2].binding = 1 + +[RayTracingPipelineState] +deviceIndex = 0 +options.includeDisassembly = 0 +options.scalarBlockLayout = 0 +options.includeIr = 0 +options.robustBufferAccess = 0 +options.reconfigWorkgroupLayout = 0 +options.shadowDescriptorTableUsage = Auto +options.shadowDescriptorTablePtrHigh = 0 +options.extendedRobustness.robustBufferAccess = 0 +options.extendedRobustness.robustImageAccess = 0 +options.extendedRobustness.nullDescriptor = 0 +groups[0].type = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR +groups[0].generalShader = 0 +groups[0].closestHitShader = -1 +groups[0].anyHitShader = -1 +groups[0].intersectionShader = -1 +groups[1].type = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR +groups[1].generalShader = 1 +groups[1].closestHitShader = -1 +groups[1].anyHitShader = -1 +groups[1].intersectionShader = -1 +groups[2].type = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR +groups[2].generalShader = -1 +groups[2].closestHitShader = 2 +groups[2].anyHitShader = -1 +groups[2].intersectionShader = -1 +groups[3].type = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR +groups[3].generalShader = -1 +groups[3].closestHitShader = 3 +groups[3].anyHitShader = -1 +groups[3].intersectionShader = 4 +maxRecursionDepth = 1 +indirectStageMask = 0 +rtState.bvhResDescSize = 4 +rtState.bvhResDesc[0] = 0 +rtState.bvhResDesc[1] = 2197815296 +rtState.bvhResDesc[2] = 4294967295 +rtState.bvhResDesc[3] = 2164261887 +rtState.nodeStrideShift = 7 +rtState.staticPipelineFlags = 0 +rtState.triCompressMode = 0 +rtState.pipelineFlags = 0 +rtState.threadGroupSizeX = 8 +rtState.threadGroupSizeY = 4 +rtState.threadGroupSizeZ = 1 +rtState.boxSortHeuristicMode = 0 +rtState.counterMode = 0 +rtState.counterMask = 0 +rtState.rayQueryCsSwizzle = 1 +rtState.ldsStackSize = 16 +rtState.dispatchRaysThreadGroupSize = 32 +rtState.ldsSizePerThreadGroup = 65536 +rtState.outerTileSize = 4 +rtState.dispatchDimSwizzleMode = 0 +rtState.exportConfig.indirectCallingConvention = 1 +rtState.exportConfig.indirectCalleeSavedRegs.raygen = 2 +rtState.exportConfig.indirectCalleeSavedRegs.miss = 40 +rtState.exportConfig.indirectCalleeSavedRegs.closestHit = 50 +rtState.exportConfig.indirectCalleeSavedRegs.anyHit = 75 +rtState.exportConfig.indirectCalleeSavedRegs.intersection = 75 +rtState.exportConfig.indirectCalleeSavedRegs.callable = 28 +rtState.exportConfig.indirectCalleeSavedRegs.traceRays = 28 +rtState.exportConfig.enableUniformNoReturn = 1 +rtState.exportConfig.enableTraceRayArgsInLds = 0 +rtState.exportConfig.readsDispatchRaysIndex = 0 +rtState.exportConfig.enableDynamicLaunch = 0 +rtState.exportConfig.emitRaytracingShaderDataToken = 0 +rtState.enableRayQueryCsSwizzle = 0 +rtState.enableDispatchRaysInnerSwizzle = 1 +rtState.enableDispatchRaysOuterSwizzle = 1 +rtState.forceInvalidAccelStruct = 0 +rtState.enableRayTracingCounters = 0 +rtState.enableOptimalLdsStackSizeForIndirect = 1 +rtState.enableOptimalLdsStackSizeForUnified = 1 +rtState.gpurtFuncTable.pFunc[0] = TraceRay1_1 +rtState.gpurtFuncTable.pFunc[1] = TraceRayInline1_1 +rtState.gpurtFuncTable.pFunc[2] = TraceRayUsingHitToken1_1 +rtState.gpurtFuncTable.pFunc[3] = RayQueryProceed1_1 +rtState.gpurtFuncTable.pFunc[4] = GetInstanceIndex +rtState.gpurtFuncTable.pFunc[5] = GetInstanceID +rtState.gpurtFuncTable.pFunc[6] = GetObjectToWorldTransform +rtState.gpurtFuncTable.pFunc[7] = GetWorldToObjectTransform +rtState.gpurtFuncTable.pFunc[8] = TraceLongRayAMD1_1 +rtState.gpurtFuncTable.pFunc[9] = LongRayQueryProceed1_1 +payloadSizeMaxInLib = 0 +attributeSizeMaxInLib = 0 +hasPipelineLibrary = 0 diff --git a/llpc/test/shaderdb/ray_tracing/TestContState.rchit b/llpc/test/shaderdb/ray_tracing/TestContState.rchit new file mode 100644 index 0000000000..6148e5763b --- /dev/null +++ b/llpc/test/shaderdb/ray_tracing/TestContState.rchit @@ -0,0 +1,47 @@ + +// Test that continuations state has a reasonable size. +// NOTE: Hit attribute is extracted from system data, we want to make sure we only put necessary part into continuations +// state, but not the whole/partial structure which is extracted from. + +// RUN: amdllpc %gfxip --llpc-raytracing-mode=continuations --report-cont-state-sizes %s 2>&1 | FileCheck -check-prefix=CHECK %s +// CHECK: Continuation state size of "_chit_1" (closesthit): 12 bytes +#version 460 +#extension GL_EXT_ray_tracing : require + +struct RayPayload { + vec4 a; + vec4 b; + float c; +}; + +layout(binding = 0, set = 0) uniform accelerationStructureEXT g_bvh; +layout(binding = 1, set = 0, rgba32f) uniform image2D g_dst; +layout(binding = 2, set = 0) uniform Buf { + vec4 u_a; + vec4 u_b; + float u_c; +}; + +layout(location = 14) rayPayloadInEXT RayPayload g_ray; +hitAttributeEXT vec2 g_attr; + +void main() { + g_ray.a = u_a; + g_ray.b = u_b; + g_ray.c = u_c; + vec3 origin; + origin.x = gl_LaunchIDEXT.x; + origin.y = gl_LaunchIDEXT.y; + origin.z = 0; + + vec4 bary = vec4((1.0 - g_attr.x) - g_attr.y, g_attr.x, g_attr.y, 0); + + traceRayEXT(g_bvh, /* ray flags */ 0, /* cull mask */ 0xff, + /* sbt offset */ 0, /* sbt stride */ 1, /* miss index */ 0, + origin.xyz, /* tmin */ 0.0, /* direction */ vec3(1, 0, 0), + /* tmax */ 48.0, /* payload location */ 14); + + vec4 result = g_ray.a + bary; + + imageStore(g_dst, ivec2(gl_LaunchIDEXT.xy), result); +} diff --git a/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_EnableColorExport.pipe b/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_EnableColorExport.pipe index f246f2613f..593a9ede3b 100644 --- a/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_EnableColorExport.pipe +++ b/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_EnableColorExport.pipe @@ -73,7 +73,7 @@ attribute[0].offset = 0 ; SHADERTEST-LABEL: @lgc.shader.VS.main( ; SHADERTEST-NEXT: .entry: -; SHADERTEST-NEXT: [[TMP0:%.*]] = call <2 x float> @lgc.load.vertex.input__v2f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison) +; SHADERTEST-NEXT: [[TMP0:%.*]] = call <2 x float> @lgc.load.vertex.input__v2f32(i1 false, i32 0, i32 0, i32 0, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison) ; SHADERTEST-NEXT: call void @lgc.output.export.generic.i32.i32.v2f32(i32 0, i32 0, <2 x float> [[TMP0]]) #[[ATTR2:[0-9]+]] ; SHADERTEST-NEXT: ret void ; diff --git a/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_MultiDwordPushConst.pipe b/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_MultiDwordPushConst.pipe index caadbe8315..a985ce7748 100644 --- a/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_MultiDwordPushConst.pipe +++ b/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_MultiDwordPushConst.pipe @@ -5,7 +5,7 @@ ; RUN: FileCheck -check-prefix=SHADERTEST %s ; Check that the llvm-ir gets the push constant values from as a parameter. -; SHADERTEST: // LLPC pipeline patching results +; SHADERTEST: // LLPC LGC lowering results ; SHADERTEST: define dllexport amdgpu_ps { <4 x float>, i32 } @_amdgpu_ps_main({{.*}}, i32 inreg noundef %userdata3, i32 inreg noundef %userdata4, {{.*}}) ; SHADERTEST: [[pushConst0:%[.a-zA-Z0-9]+]] = bitcast i32 %userdata3 to float ; SHADERTEST: [[pushConst1:%[.a-zA-Z0-9]+]] = bitcast i32 %userdata4 to float diff --git a/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_TestRelocatableSeparateCompilation.pipe b/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_TestRelocatableSeparateCompilation.pipe index 0fa3883aca..7aa1fba073 100644 --- a/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_TestRelocatableSeparateCompilation.pipe +++ b/llpc/test/shaderdb/relocatable_shaders/PipelineVsFs_TestRelocatableSeparateCompilation.pipe @@ -1,13 +1,13 @@ -; This test checks that pipeline patching is done for each shader separately. +; This test checks that LGC lowering is done for each shader separately. ; It shows that the shaders were compiled individually and then linked. ; BEGIN_SHADERTEST ; RUN: amdllpc -enable-relocatable-shader-elf -auto-layout-desc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-EMPTY: ; SHADERTEST-NEXT: ; ModuleID = 'lgcPipeline' ; SHADERTEST-NEXT: source_filename = "llpc_vertex -; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results +; SHADERTEST-LABEL: {{^// LLPC}} LGC lowering results ; SHADERTEST-EMPTY: ; SHADERTEST-NEXT: ; ModuleID = 'lgcPipeline' ; SHADERTEST-NEXT: source_filename = "llpc_fragment diff --git a/llpc/translator/lib/SPIRV/SPIRVReader.cpp b/llpc/translator/lib/SPIRV/SPIRVReader.cpp index 9496f53cc8..88aa9775cb 100644 --- a/llpc/translator/lib/SPIRV/SPIRVReader.cpp +++ b/llpc/translator/lib/SPIRV/SPIRVReader.cpp @@ -5,7 +5,7 @@ // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -// Copyright (c) 2014 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2014-2025 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -1455,6 +1455,10 @@ FastMathFlags SPIRVToLLVM::getFastMathFlags(SPIRVValue *bv) { if (!bv->hasType()) return {}; SPIRVType *ty = bv->getType(); + if (bv->isExtInst(SPIRVEIS_GLSL, GLSLstd450ModfStruct)) { + assert(ty->isTypeStruct()); + ty = ty->getStructMemberType(0); + } if (ty->isTypeVector()) ty = ty->getVectorComponentType(); else if (ty->isTypeMatrix()) @@ -3342,8 +3346,9 @@ Value *SPIRVToLLVM::transArrayLength(SPIRVValue *const spvValue) { const StructLayout *const structLayout = m_m->getDataLayout().getStructLayout(structType); const unsigned offset = static_cast(structLayout->getElementOffset(remappedMemberIndex)); - Value *const offsetVal = getBuilder()->getInt32(offset); - Value *const arrayBytes = getBuilder()->create(structurePtr, offsetVal); + Value *const offsetVal = getBuilder()->getInt64(offset); + Value *arrayBytes = getBuilder()->create(structurePtr, offsetVal); + arrayBytes = getBuilder()->CreateTrunc(arrayBytes, getBuilder()->getInt32Ty()); Type *const memberType = structType->getStructElementType(remappedMemberIndex)->getArrayElementType(); const unsigned stride = static_cast(m_m->getDataLayout().getTypeSizeInBits(memberType) / 8); @@ -4499,6 +4504,8 @@ Value *SPIRVToLLVM::transGroupArithOp(Builder::GroupArithOp groupArithOp, SPIRVV return getBuilder()->CreateSubgroupClusteredExclusive(groupArithOp, value, clusterSize); case GroupOperationClusteredReduce: return getBuilder()->CreateSubgroupClusteredReduction(groupArithOp, value, clusterSize); + case GroupOperationPartitionedExclusiveScanNV: + return getBuilder()->CreateSubgroupClusteredMultiExclusive(groupArithOp, value, clusterSize); default: llvm_unreachable("Should never be called!"); return nullptr; @@ -5764,9 +5771,9 @@ SmallVector SPIRVToLLVM::transValueWithoutDecoration(SPIRVValue *bv, Fu case OpTypeFloat: { const llvm::fltSemantics *fs = nullptr; switch (bt->getFloatBitWidth()) { - case 16: + case 16: { fs = &APFloat::IEEEhalf(); - break; + } break; case 32: fs = &APFloat::IEEEsingle(); break; @@ -11112,7 +11119,7 @@ void SPIRVToLLVM::insertScratchBoundsChecks(SPIRVValue *memOp, const ScratchBoun auto insertOutOfBoundsGuard = [&](SPIRVValue *accessChainIndex, uint64_t upperBound) { Value *comparisonValue = transValue(accessChainIndex, checkBlock->getParent(), checkBlock); - ConstantInt *arrayUpperBound = getBuilder()->getInt32(upperBound); + auto *arrayUpperBound = ConstantInt::get(comparisonValue->getType(), upperBound); auto cmpResult = getBuilder()->CreateICmpULT(comparisonValue, arrayUpperBound); if (finalCmpResult) diff --git a/llpc/translator/lib/SPIRV/libSPIRV/SPIRVInstruction.h b/llpc/translator/lib/SPIRV/libSPIRV/SPIRVInstruction.h index dd4c1e2f34..330cac14e6 100644 --- a/llpc/translator/lib/SPIRV/libSPIRV/SPIRVInstruction.h +++ b/llpc/translator/lib/SPIRV/libSPIRV/SPIRVInstruction.h @@ -5,7 +5,7 @@ // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -// Copyright (c) 2014 Advanced Micro Devices, Inc. All rights reserved. +// Copyright (c) 2014-2025 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -46,6 +46,7 @@ #include "SPIRVOpCode.h" #include "SPIRVStream.h" #include "SPIRVValue.h" +#include "llvm/Support/ErrorHandling.h" #include #include #include @@ -1676,11 +1677,16 @@ class SPIRVCompositeConstruct : public SPIRVInstruction { switch (getValueType(this->getId())->getOpCode()) { case OpTypeVector: assert(getConstituents().size() > 1 && "There must be at least two Constituent operands in vector"); + break; + case OpTypeMatrix: + assert(getConstituents().size() == getValueType(this->getId())->getMatrixColumnCount() && + "There must be equal to Constituent operands in matrix"); case OpTypeArray: case OpTypeStruct: + case OpTypeCooperativeMatrixKHR: break; default: - static_assert("Invalid type", ""); + llvm_unreachable("Invalid type"); } } std::vector Constituents; @@ -1720,7 +1726,7 @@ class SPIRVCompositeConstructReplicateEXT : public SPIRVInstruction { case OpTypeCooperativeMatrixKHR: break; default: - static_assert("Invalid type", ""); + llvm_unreachable("Invalid type"); } } std::vector Constituents; diff --git a/llpc/util/llpcTimerProfiler.cpp b/llpc/util/llpcTimerProfiler.cpp index ee7ff99610..f86de0c964 100644 --- a/llpc/util/llpcTimerProfiler.cpp +++ b/llpc/util/llpcTimerProfiler.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -78,17 +78,17 @@ TimerProfiler::TimerProfiler(uint64_t hash64, const char *descriptionPrefix, uns "llpc-translate", (Twine(descriptionPrefix) + Twine(" Translate ") + hashString).str(), m_phases); } - if (enableMask & (1 << TimerLower)) { - m_phaseTimers[TimerLower].init("llpc-lower", (Twine(descriptionPrefix) + Twine(" Lower ") + hashString).str(), - m_phases); + if (enableMask & (1 << TimerFeLowering)) { + m_phaseTimers[TimerFeLowering].init( + "llpc-fe-lowering", (Twine(descriptionPrefix) + Twine(" FE-Lowering ") + hashString).str(), m_phases); } if (enableMask & (1 << TimerLoadBc)) { m_phaseTimers[TimerLoadBc].init("llpc-load", (Twine(descriptionPrefix) + Twine(" Load ") + hashString).str(), m_phases); } - if (enableMask & (1 << TimerPatch)) { - m_phaseTimers[TimerPatch].init("llpc-patch", (Twine(descriptionPrefix) + Twine(" Patch ") + hashString).str(), - m_phases); + if (enableMask & (1 << TimerLgcLowering)) { + m_phaseTimers[TimerLgcLowering].init( + "llpc-lgc-lowering", (Twine(descriptionPrefix) + Twine(" LGC-Lowering ") + hashString).str(), m_phases); } if (enableMask & (1 << TimerOpt)) { m_phaseTimers[TimerOpt].init("llpc-opt", (Twine(descriptionPrefix) + Twine(" Optimization ") + hashString).str(), diff --git a/llpc/util/llpcTimerProfiler.h b/llpc/util/llpcTimerProfiler.h index bc7c8e598e..73ff277a5a 100644 --- a/llpc/util/llpcTimerProfiler.h +++ b/llpc/util/llpcTimerProfiler.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -46,12 +46,12 @@ namespace Llpc { // ===================================================================================================================== // Enumerates the kinds of timer used to do profiling for LLPC compilation phases. enum TimerKind : unsigned { - TimerTranslate, // Timer for translator - TimerLower, // Timer for SPIR-V lowering - TimerLoadBc, // Timer for loading LLVM bitcode - TimerPatch, // Timer for LLVM patching - TimerOpt, // Timer for LLVM optimization - TimerCodeGen, // Timer for backend code generation + TimerTranslate, // Timer for translator + TimerFeLowering, // Timer for FE lowering + TimerLoadBc, // Timer for loading LLVM bitcode + TimerLgcLowering, // Timer for LGC lowering + TimerOpt, // Timer for LLVM optimization + TimerCodeGen, // Timer for backend code generation TimerCount }; @@ -73,7 +73,7 @@ class TimerProfiler { static const llvm::StringMap &getDummyTimeRecords(); static const unsigned PipelineTimerEnableMask = ((1 << TimerCount) - 1); - static const unsigned ShaderModuleTimerEnableMask = ((1 << TimerTranslate) | (1 << TimerLower)); + static const unsigned ShaderModuleTimerEnableMask = ((1 << TimerTranslate) | (1 << TimerFeLowering)); private: TimerProfiler(const TimerProfiler &) = delete; diff --git a/llvmraytracing/CMakeLists.txt b/llvmraytracing/CMakeLists.txt index b532314daa..932fd99bb6 100644 --- a/llvmraytracing/CMakeLists.txt +++ b/llvmraytracing/CMakeLists.txt @@ -1,7 +1,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -47,7 +47,6 @@ add_llvm_library(LLVMRaytracing lib/DXILContPrepareGpurtLibrary.cpp lib/DXILContLgcRtOpConverter.cpp lib/DXILContPostProcess.cpp - lib/DXILSupport.cpp lib/GpurtContext.cpp lib/GpurtDialect.cpp lib/ContinuationsStatsReport.cpp @@ -62,6 +61,7 @@ add_llvm_library(LLVMRaytracing lib/PassRegistry.inc lib/PipelineState.cpp lib/PayloadAccessQualifiers.cpp + lib/RematSupport.cpp lib/RemoveTypesMetadata.cpp lib/SpecializeDriverShaders.cpp diff --git a/llvmraytracing/include/lgc/LgcCpsDialect.td b/llvmraytracing/include/lgc/LgcCpsDialect.td index c6df4411a4..f6442f73d1 100644 --- a/llvmraytracing/include/lgc/LgcCpsDialect.td +++ b/llvmraytracing/include/lgc/LgcCpsDialect.td @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -59,6 +59,22 @@ def JumpOp : LgcCpsOp<"jump", [NoReturn]> { }]; } +// ===================================================================================================================== +def JumpUniformOp : LgcCpsOp<"jump.uniform", [NoReturn]> { + let arguments = (ins PointerType:$target, (or I32, I64):$exec, value:$vgprs, AttrI32:$flags, varargs:$tail); + let results = (outs); + + let summary = "Uniform jump to a CPS function."; + let description = [{ + Uniformly jump to a CPS function via: + * target, the target function + * exec, the exec mask for the next function + * vgprs, a struct consisting of arguments to be passed as VGPRs + * flags: whether additional arguments should be passed + * Additional arguments as described by flags. + }]; +} + // ===================================================================================================================== def AwaitOp : LgcCpsOp<"await", [NoUnwind, WillReturn]> { let arguments = (ins ContinuationReference:$target, AttrI32:$levels, varargs:$tail); diff --git a/llvmraytracing/include/llvmraytracing/Continuations.h b/llvmraytracing/include/llvmraytracing/Continuations.h index c2caca781c..bdd7977877 100644 --- a/llvmraytracing/include/llvmraytracing/Continuations.h +++ b/llvmraytracing/include/llvmraytracing/Continuations.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -138,11 +138,23 @@ Value *replaceIntrinsicCall(IRBuilder<> &B, Type *SystemDataTy, Value *SystemDat CallInst *Call, Module *GpurtLibrary, CompilerUtils::CrossModuleInliner &Inliner, bool KeepBuilderPos = false); +/// Promote pointer arguments of a GPURT function @Func to by-value if appropriate (e. g. depending on pointeetys +/// metadata). +/// +/// Changes pointer types to their value types for non-struct types. +/// Handle _Amd*Await* and _Amd*Enqueue*. +/// For _cont_SetTriangleHitAttributes, we always use its value type for hitAttributes argument. +// For Traversal, promote the system data argument so it is of struct type. +/// +/// Returns a pointer to the promoted function or nullptr. +Function *tryGpurtPointerArgPromotion(Function *Func); + /// Transformations that run early on the driver/gpurt module. /// +/// Promote arguments of the functions residing in @PromotableFunctions. /// Replace intrinsics called by gpurt code that can be replaced early. /// Returns whether something changed. -bool earlyGpurtTransform(Module &M); +bool earlyGpurtTransform(Module &M, SmallVector &PromotableFunctions, bool PreserveWaitMasks = true); /// Given a number NumI32s of 4-byte values and the number of reserved /// registers, return the amount of dynamic storage required to store that many @@ -239,10 +251,6 @@ class DXILContPostHookPass : public llvm::PassInfoMixin { static llvm::StringRef name() { return "DXIL continuation post hook pass"; } }; -// Rematerializable callback specific to DXIL - mainly used to extend what's -// considered rematerializable for continuations -bool DXILMaterializable(Instruction &I); - // Define a wrapper pass that is used for testing using opt (dxil-coro-split vs // coro-split) class DXILCoroSplitPass : public CoroSplitPass { @@ -252,14 +260,6 @@ class DXILCoroSplitPass : public CoroSplitPass { static llvm::StringRef name() { return "DXIL continuations coro split pass wrapper"; } }; -// Helper function to query whether an instruction is rematerializable, which is -// shared between both DX and Vulkan path. -bool commonMaterializable(Instruction &I); - -// Rematerializable callback specific to LgcCps - mainly used to extend what's -// considered rematerializable for continuations -bool LgcMaterializable(Instruction &I); - // Define a wrapper pass that is used for testing using opt (lgc-coro-split vs // coro-split) class LgcCoroSplitPass : public CoroSplitPass { diff --git a/llvmraytracing/include/llvmraytracing/ContinuationsUtil.h b/llvmraytracing/include/llvmraytracing/ContinuationsUtil.h index fff75a0904..1734a8e73a 100644 --- a/llvmraytracing/include/llvmraytracing/ContinuationsUtil.h +++ b/llvmraytracing/include/llvmraytracing/ContinuationsUtil.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -245,12 +245,10 @@ class ContHelper { public: // Public metadata node names - static constexpr const char *MDEntryName = "continuation.entry"; static constexpr const char *MDStackSizeName = "continuation.stacksize"; static constexpr const char *MDStateName = "continuation.state"; static constexpr const char *MDContinuationName = "continuation"; static constexpr const char *MDContPayloadTyName = "cont.payload.type"; - static constexpr const char *MDLgcCpsModuleName = "lgc.cps.module"; static constexpr const char *MDGpurtSettingsName = "gpurt.settings"; static constexpr const char *MDWaitMaskName = "waitmask"; @@ -428,15 +426,6 @@ class ContHelper { static void removeWaitMask(CallInst &CI) { CI.setMetadata(MDWaitMaskName, nullptr); } - /// Returns true if a call to the given function should be rematerialized - /// in a shader of the specified kind. - /// - /// If no shader kind is specified, return false. - static bool isRematerializableLgcRtOp(CallInst &CInst, - std::optional Kind = std::nullopt); - - static bool isLegacyEntryFunction(Function *Func) { return Func->hasMetadata(MDEntryName); } - // Given a list of types, get a type that makes the list of types // occupy a specific number of dwords including it. static Type *getPaddingType(const DataLayout &DL, LLVMContext &Context, ArrayRef Types, @@ -546,6 +535,7 @@ DRIVER_FUNC_NAME(Traversal) DRIVER_FUNC_NAME(KernelEntry) DRIVER_FUNC_NAME(GpurtVersionFlags) DRIVER_FUNC_NAME(ShaderStart) +DRIVER_FUNC_NAME(Scheduler) #undef DRIVER_FUNC_NAME } // namespace ContDriverFunc @@ -554,7 +544,8 @@ DRIVER_FUNC_NAME(ShaderStart) // Replace all calls to a given function with some value. // Removes the original call. -void replaceCallsToFunction(llvm::Function &F, llvm::Value &Replacement); +// Returns whether something has changed. +bool replaceCallsToFunction(llvm::Function &F, llvm::Value &Replacement); // Move all basic blocks of OldFunc to NewFunc. void moveFunctionBody(Function &OldFunc, Function &NewFunc); diff --git a/llvmraytracing/lib/CleanupContinuations.cpp b/llvmraytracing/lib/CleanupContinuations.cpp index 33bfd756d8..60dac80964 100644 --- a/llvmraytracing/lib/CleanupContinuations.cpp +++ b/llvmraytracing/lib/CleanupContinuations.cpp @@ -3,7 +3,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -448,8 +448,6 @@ void CleanupContinuationsPassImpl::processContinuations() { if (F != FuncData.first) { // Set same linkage as for start function F->setLinkage(FuncData.first->getLinkage()); - // Entry marker should only be on the start and not on resume functions - F->eraseMetadata(F->getContext().getMDKindID(ContHelper::MDEntryName)); // Same for stacksize ContHelper::StackSize::reset(F); } diff --git a/llvmraytracing/lib/ContStateBuilder.cpp b/llvmraytracing/lib/ContStateBuilder.cpp index 974daa7b38..c6a9021139 100644 --- a/llvmraytracing/lib/ContStateBuilder.cpp +++ b/llvmraytracing/lib/ContStateBuilder.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -51,7 +51,8 @@ using namespace llvm; using namespace llvmraytracing; -static cl::opt ReportContStateAccessCounts( +namespace { +cl::opt ReportContStateAccessCounts( "report-cont-state-access-counts", cl::desc("Report on the number of spills (stores) and reloads (loads) from the cont state."), cl::init(false), cl::Hidden); @@ -59,13 +60,11 @@ static cl::opt ReportContStateAccessCounts( #ifndef NDEBUG // When debugging a potential issue with the cont-state-builder try setting // this option to verify the issue resides within the builder. -static cl::opt UseLLVMContStateBuilder("use-llvm-cont-state-builder", - cl::desc("Use LLVM's built-in continuation state builder."), - cl::init(false), cl::Hidden); +cl::opt UseLLVMContStateBuilder("use-llvm-cont-state-builder", + cl::desc("Use LLVM's built-in continuation state builder."), cl::init(false), + cl::Hidden); #endif -namespace { - // Representation of a row in the frame-table. struct CoroFrameRow { CoroFrameRow(const DataLayout &DL, Value *D) : Def(D) { @@ -141,6 +140,13 @@ struct CoroFrameRow { // suspend are not currently recorded. void dump() const; + + // Compares the row's range with the test offset and size (test range) and + // returns the signed distance value of: + // 0 -> Row's range overlaps with the test range, + // positive -> Row's range follows the test range, + // negative -> Row's range precedes the test range. + int64_t compareRanges(uint64_t TestOffset, uint64_t TestSize) const; }; using CoroFrameTableTy = std::vector; @@ -264,13 +270,13 @@ class ContStateBuilderImpl { }; /// Return true if Def is an Arg with the ByVal attribute. -[[maybe_unused]] static bool isArgByVal(Value *Def) { +[[maybe_unused]] bool isArgByVal(Value *Def) { if (auto *Arg = dyn_cast(Def)) return Arg->hasByValAttr(); return false; } -static std::string getLabel(Function *F) { +std::string getLabel(Function *F) { if (F->hasName()) return F->getName().str(); ModuleSlotTracker MST(F->getParent()); @@ -279,7 +285,7 @@ static std::string getLabel(Function *F) { return std::to_string(MST.getLocalSlot(F)); } -static std::string getLabel(BasicBlock *BB) { +std::string getLabel(BasicBlock *BB) { if (BB->hasName()) return BB->getName().str(); @@ -291,7 +297,7 @@ static std::string getLabel(BasicBlock *BB) { return std::to_string(MST.getLocalSlot(BB)); } -static std::string getLabel(Value *V) { +std::string getLabel(Value *V) { if (V->hasName()) return V->getName().str(); @@ -307,7 +313,7 @@ static std::string getLabel(Value *V) { return std::to_string(MST.getLocalSlot(V)); } -static std::string getAllNames(const SmallSet &List) { +std::string getAllNames(const SmallSet &List) { std::string S; if (List.empty()) return ""; @@ -347,8 +353,37 @@ void CoroFrameRow::dump() const { } } +int64_t CoroFrameRow::compareRanges(uint64_t TestOffset, uint64_t TestSize) const { + assert(Offset != OptimizedStructLayoutField::FlexibleOffset); + + // Stop if the start addr of the Row exceeds the test range's end addr. + // Row's range comes after the test range. + if (Offset >= TestOffset + TestSize) { + int64_t Diff = Offset - (int64_t)(TestOffset + TestSize - 1); // Positive value + assert(Diff > 0); + return Diff; + } + + // Stop if the test range's start addr exceeds the end addr of the Row. + // Row's range comes before the test ranges. + if (Offset + Size <= TestOffset) { + int64_t Diff = (Offset + Size - 1) - (int64_t)TestOffset; // Negative value + assert(Diff < 0); + return Diff; + } + + // Row's range overlaps with test range, 3 cases: + // Row starts at the same addr as test range + // Row starts at an earlier addr but ends after test ranges' start addr + // Row starts at a later addr but before the end of test ranges' end addr + assert((Offset == TestOffset) || (Offset < TestOffset && Offset + Size > TestOffset) || + (Offset > TestOffset && Offset < TestOffset + TestSize)); + + return 0; +} + void CoroFrameStruct::dumpField(const OptimizedStructLayoutField &F, const CoroFrameTableTy &FrameTable) const { - auto Idx = reinterpret_cast(F.Id); + auto Idx = reinterpret_cast(F.Id); const CoroFrameRow *Row = &FrameTable[Idx]; dbgs() << " Frame Table Row " << std::to_string(Idx); if (isa(Row->Def)) @@ -475,8 +510,8 @@ void ContStateBuilderImpl::makeRowsResideInSuspendFrame(DefRowMapTy &FrameValues // Check if Def value crosses the suspend. Note this check is used instead of // checking the ResidesInSuspendFrame set because if eviction is not enabled // then the ResidesInSuspendFrame set will include all suspends. -static bool isSuspendCrossingValue(Value *Def, const coro::SpillInfo &CandidateSpills, - const SmallVector &CandidateAllocas) { +bool isSuspendCrossingValue(Value *Def, const coro::SpillInfo &CandidateSpills, + const SmallVector &CandidateAllocas) { if (auto *DefAlloca = dyn_cast(Def)) { auto II = std::find_if(CandidateAllocas.begin(), CandidateAllocas.end(), [DefAlloca](const coro::AllocaInfo &AI) { return AI.Alloca == DefAlloca; }); @@ -486,7 +521,7 @@ static bool isSuspendCrossingValue(Value *Def, const coro::SpillInfo &CandidateS return CandidateSpills.contains(Def); } -static void fitNewField(Value *Val, OptimizedStructLayoutField &NewField, CoroFrameStruct &Struct) { +void fitNewField(Value *Val, OptimizedStructLayoutField &NewField, CoroFrameStruct &Struct) { NewField.Offset = 0; // If Fields is empty, start at offset 0 if (!Struct.Fields.empty()) { NewField.Offset = alignTo(Struct.Size, NewField.Alignment); @@ -637,7 +672,7 @@ void ContStateBuilderImpl::insertSpills(coro::Shape &Shape, DominatorTree &DT) { // Visit each field in the struct and create spills as needed. Visit fields // in reverse order to cause the spills to occur in-order after creation. for (auto &Field : llvm::reverse(Struct.Fields)) { - auto Idx = reinterpret_cast(Field.Id); + auto Idx = reinterpret_cast(Field.Id); CoroFrameRow &Row = FrameTable[Idx]; Value *Def = Row.Def; @@ -699,7 +734,7 @@ void ContStateBuilderImpl::insertReloads() { // Visit each field in the struct and create reloads as needed. Visit the // in reverse order to cause the reloads to occur in-order after creation. for (auto &Field : llvm::reverse(Struct.Fields)) { - auto Idx = reinterpret_cast(Field.Id); + auto Idx = reinterpret_cast(Field.Id); CoroFrameRow &Row = FrameTable[Idx]; Value *Def = Row.Def; @@ -864,7 +899,7 @@ void ContStateBuilderImpl::createFrameGEPs(SmallVector &DeadIn // fields in reverse order to cause the reloads to occur in-order after // creation. for (auto &Field : llvm::reverse(Struct.Fields)) { - auto Idx = reinterpret_cast(Field.Id); + auto Idx = reinterpret_cast(Field.Id); CoroFrameRow &Row = FrameTable[Idx]; assert(Row.ResidesInSuspendFrame.contains(Suspend)); @@ -996,7 +1031,32 @@ void ContStateBuilderImpl::removeUnusedReloads() { } } -static bool hasPoisonOperand(Instruction *I) { +void checkForValidLayout(const CoroFrameTableTy &FrameTable, const ArrayRef &StructFields) { + for (auto Itr = StructFields.begin(); Itr != StructFields.end(); Itr++) { + auto &Field = *Itr; + if (Field.Offset == OptimizedStructLayoutField::FlexibleOffset) + llvm_unreachable("Field must have an offset at this point."); + + auto Idx = reinterpret_cast(Field.Id); + auto &Row = FrameTable[Idx]; + + // Check all other fields in this frame for overlap. + + for (auto OtherItr = std::next(Itr); OtherItr != StructFields.end(); OtherItr++) { + auto &OtherField = *OtherItr; + + auto OtherIdx = reinterpret_cast(OtherField.Id); + assert(Idx != OtherIdx); + + if (Row.compareRanges(OtherField.Offset, OtherField.Size) == 0) { + LLVM_DEBUG(dbgs() << "Error: Overlapping fields Row " << Idx << " and Row " << OtherIdx << "\n"); + llvm_unreachable("Fields in a struct must not overlap"); + } + } + } +} + +bool hasPoisonOperand(Instruction *I) { // Check GetElementPtrInst if (auto *GEP = dyn_cast(I)) { for (auto &Op : GEP->operands()) @@ -1023,7 +1083,7 @@ static bool hasPoisonOperand(Instruction *I) { return false; } -[[maybe_unused]] static void collectInstWithPoison(Function &F, SmallSet &PoisonInstructions) { +[[maybe_unused]] void collectInstWithPoison(Function &F, SmallSet &PoisonInstructions) { for (auto &BB : F) { for (auto &I : BB) { // Record the instruction if it has a poison operand @@ -1034,7 +1094,7 @@ static bool hasPoisonOperand(Instruction *I) { } } -[[maybe_unused]] static bool hasNewPoisonOperand(Function &F, const SmallSet &PoisonInstructions) { +[[maybe_unused]] bool hasNewPoisonOperand(Function &F, const SmallSet &PoisonInstructions) { bool foundNewPoison = false; for (auto &BB : F) { @@ -1092,8 +1152,7 @@ template static unsigned countInstrs(const Function &F) { // Report absolute number of new geps, spills and reloads inserted by the // continuation state builder. -static void reportGepsSpillsAndReloads(Function &F, unsigned NonFrameGeps, unsigned NonSpillStores, - unsigned NonReloadLoads) { +void reportGepsSpillsAndReloads(Function &F, unsigned NonFrameGeps, unsigned NonSpillStores, unsigned NonReloadLoads) { if (ReportContStateAccessCounts) { unsigned FrameGeps = countInstrs(F); assert(FrameGeps >= NonFrameGeps); @@ -1327,8 +1386,16 @@ void ContStateBuilderImpl::buildCoroutineFrame() { } }); - // ======== Poison instructions ======== #ifndef NDEBUG + // ======== Sanity Checks ======== + // Verify all fields in the frame are valid. Invalid fields do not have a + // valid offset, or have a range that overlaps with other fields. + for (auto &I : FrameStructs) { + auto &Struct = I.second; + checkForValidLayout(FrameTable, Struct.Fields); + } + + // ======== Poison instructions ======== // Verify no new poisons are left in the IR if (hasNewPoisonOperand(F, PoisonInstructions)) { llvm_unreachable("Error: Found poison"); diff --git a/llvmraytracing/lib/Continuations.cpp b/llvmraytracing/lib/Continuations.cpp index 5348a8618f..d4194e212f 100644 --- a/llvmraytracing/lib/Continuations.cpp +++ b/llvmraytracing/lib/Continuations.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -31,8 +31,11 @@ #include "llvmraytracing/Continuations.h" #include "ContStateBuilder.h" +#include "RematSupport.h" +#include "compilerutils/ArgPromotion.h" #include "compilerutils/CompilerUtils.h" #include "compilerutils/DxilToLlvm.h" +#include "compilerutils/TypesMetadata.h" #include "llvmraytracing/ContinuationsUtil.h" #include "llvmraytracing/GpurtContext.h" #include "llvmraytracing/SpecializeDriverShaders.h" @@ -41,11 +44,11 @@ #include "lgc/LgcRtDialect.h" #include "llvm-dialects/Dialect/Builder.h" #include "llvm-dialects/Dialect/Dialect.h" -#include "llvm-dialects/Dialect/OpSet.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/IntervalTree.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallBitVector.h" +#include "llvm/IR/Attributes.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/Instructions.h" @@ -58,10 +61,10 @@ #include "llvm/Transforms/Coroutines/CoroEarly.h" #include "llvm/Transforms/Coroutines/CoroElide.h" #include "llvm/Transforms/IPO/AlwaysInliner.h" -#include "llvm/Transforms/InstCombine/InstCombine.h" #include "llvm/Transforms/Scalar/ADCE.h" #include "llvm/Transforms/Scalar/InstSimplifyPass.h" #include "llvm/Transforms/Scalar/SROA.h" +#include "llvm/Transforms/Scalar/Scalarizer.h" #include "llvm/Transforms/Scalar/SimplifyCFG.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/FixIrreducible.h" @@ -104,7 +107,9 @@ const llvm_dialects::OpMap llvm::LgcRtGpuRtMap = {{ #undef GPURTMAP_ENTRY -void llvm::replaceCallsToFunction(Function &F, Value &Replacement) { +bool llvm::replaceCallsToFunction(Function &F, Value &Replacement) { + bool Changed = false; + llvm::forEachCall(F, [&](CallInst &CInst) { // Basic sanity check. We should also check for dominance. assert((!isa(&Replacement) || cast(&Replacement)->getFunction() == CInst.getFunction()) && @@ -112,7 +117,11 @@ void llvm::replaceCallsToFunction(Function &F, Value &Replacement) { "reside in the same function as CallInst to replace!"); CInst.replaceAllUsesWith(&Replacement); CInst.eraseFromParent(); + + Changed = true; }); + + return Changed; } void llvm::moveFunctionBody(Function &OldFunc, Function &NewFunc) { @@ -149,35 +158,6 @@ bool llvm::removeUnusedFunctionDecls(Module *Mod, bool OnlyIntrinsics) { return DidChange; } -bool ContHelper::isRematerializableLgcRtOp(CallInst &CInst, std::optional Kind) { - using namespace lgc::rt; - Function *Callee = CInst.getCalledFunction(); - if (!LgcRtDialect::isDialectOp(*Callee)) - return false; - - // Always rematerialize - static const llvm_dialects::OpSet RematerializableDialectOps = - llvm_dialects::OpSet::get(); - if (RematerializableDialectOps.contains(*Callee)) - return true; - - // Rematerialize for Intersection that can only call ReportHit, which keeps - // the largest system data struct. These cannot be rematerialized in - // ClosestHit, because if ClosestHit calls TraceRay or CallShader, that - // information is lost from the system data struct. Also exclude rayTCurrent - // because ReportHit calls can change that. - if (!Kind || *Kind == RayTracingShaderStage::Intersection) { - static const llvm_dialects::OpSet RematerializableIntersectionDialectOps = - llvm_dialects::OpSet::get(); - if (RematerializableIntersectionDialectOps.contains(*Callee)) - return true; - } - - return false; -} - Type *ContHelper::getPaddingType(const DataLayout &DL, LLVMContext &Context, ArrayRef Types, unsigned TargetNumDwords) { unsigned DwordsOccupied = lgc::cps::getArgumentDwordCount(DL, Types); @@ -928,8 +908,8 @@ static bool replaceEnqueueIntrinsic(Function &F) { return Changed; } -/// Remove wait mask from WaitAwait intrinsic calls and set waitmask metadata -static bool replaceAwaitIntrinsic(Function &F) { +/// Remove wait mask from WaitAwait intrinsic calls and set waitmask metadata if PreserveWaitMasks is set to true +static bool replaceAwaitIntrinsic(Function &F, bool PreserveWaitMasks = true) { StringRef FuncName = F.getName(); if (FuncName.contains("AmdAwait")) @@ -951,7 +931,8 @@ static bool replaceAwaitIntrinsic(Function &F) { B.SetInsertPoint(&CInst); auto *NewCall = CompilerUtils::createNamedCall(B, "_AmdAwait", CInst.getType(), NewArgs, {}); CInst.replaceAllUsesWith(NewCall); - ContHelper::setWaitMask(*NewCall); + if (PreserveWaitMasks) + ContHelper::setWaitMask(*NewCall); ErasableAwaits.push_back(&CInst); }); @@ -1118,7 +1099,50 @@ void ContHelper::handleValueSetI32(Function &F, IRBuilder<> &Builder) { }); } -bool llvm::earlyGpurtTransform(Module &M) { +Function *llvm::tryGpurtPointerArgPromotion(Function *Func) { + StringRef FuncName = Func->getName(); + + if (!Func->hasMetadata(TypedFuncTy::MDTypesName) && !Func->arg_empty()) + return nullptr; + + SmallBitVector PromotionMask(Func->arg_size()); + for (auto [Index, Arg] : llvm::enumerate(Func->args())) { + TypedArgTy ArgTy = TypedArgTy::get(&Arg); + if (!ArgTy.isPointerTy()) + continue; + + // Change the pointer type to its value type for non-struct types. + // _Amd*Await use value types for all arguments. + // For _cont_SetTriangleHitAttributes, we always use its value type for hitAttributes argument. + // Include Traversal, since we want the system data to be of struct type. + if (!isa(ArgTy.getPointerElementType()) || FuncName.contains("Enqueue") || FuncName.contains("Await") || + FuncName == ContDriverFunc::TraversalName || + (FuncName == ContDriverFunc::SetTriangleHitAttributesName && Index == 1)) + PromotionMask.set(Index); + } + + // promotePointerArguments returns the input if no argument was promoted. + auto *NewFunc = CompilerUtils::promotePointerArguments(Func, PromotionMask); + + // This function is provided by the compiler to GPURT. It will be substituted by LowerRaytracingPipeline. + // NOTE: GPURT now preserves all function names started with "_Amd", but some of them are not intrinsics, e.g., + // "_AmdSystemData.IsTraversal", which are methods of system data structs. Skip those to let them be inlined + // automatically. + if (NewFunc->getName().contains("_Amd") && !NewFunc->getName().contains(".")) { + // Metadata can be cleared by the call to deleteBody, so ensure the prototypes still have it, since we + // later rely on it. + auto *ClonedMD = NewFunc->getMetadata(TypedFuncTy::MDTypesName); + NewFunc->deleteBody(); + NewFunc->setMetadata(TypedFuncTy::MDTypesName, ClonedMD); + } + + if (PromotionMask.any()) + return NewFunc; + + return nullptr; +} + +bool llvm::earlyGpurtTransform(Module &M, SmallVector &PromotableFunctions, bool PreserveWaitMasks) { // Import StackAddrspace from metadata if set, otherwise from default auto StackAddrspaceMD = ContHelper::tryGetStackAddrspace(M); auto StackAddrspace = StackAddrspaceMD.value_or(ContHelper::DefaultStackAddrspace); @@ -1129,6 +1153,14 @@ bool llvm::earlyGpurtTransform(Module &M) { ContHelper::getGpurtSettings(M, GpurtSettings); bool Changed = false; + + // Try the argument promotion + for (Function *PromotableFunc : PromotableFunctions) { + Function *PromotedFunc = tryGpurtPointerArgPromotion(PromotableFunc); + if (PromotedFunc) + Changed = true; + } + // Replace Enqueue and Complete intrinsics for (auto &F : M) { auto Name = F.getName(); @@ -1136,7 +1168,7 @@ bool llvm::earlyGpurtTransform(Module &M) { if (Name.contains("Enqueue")) { Changed = replaceEnqueueIntrinsic(F); } else if (Name.contains("Await")) { - Changed = replaceAwaitIntrinsic(F); + Changed = replaceAwaitIntrinsic(F, PreserveWaitMasks); } if (Name.starts_with("_AmdContinuationStackIsGlobal")) { @@ -1171,95 +1203,21 @@ uint64_t llvm::computePayloadSpillSize(uint64_t NumI32s, uint64_t NumReservedReg } DXILCoroSplitPass::DXILCoroSplitPass() - : CoroSplitPass(std::function(&DXILMaterializable), {[](Function &F, coro::Shape &S) { - return std::make_unique(F, S, DXILMaterializable); + : CoroSplitPass(std::function(&rematsupport::DXILMaterializable), + {[](Function &F, coro::Shape &S) { + return std::make_unique(F, S, rematsupport::DXILMaterializable); }}, /*OptimizeFrame*/ true) { } LgcCoroSplitPass::LgcCoroSplitPass() - : CoroSplitPass(std::function(&LgcMaterializable), {[](Function &F, coro::Shape &S) { - return std::make_unique(F, S, LgcMaterializable); + : CoroSplitPass(std::function(&rematsupport::LgcMaterializable), + {[](Function &F, coro::Shape &S) { + return std::make_unique(F, S, rematsupport::LgcMaterializable); }}, /*OptimizeFrame*/ true) { } -bool llvm::commonMaterializable(Instruction &Inst) { - if (coro::isTriviallyMaterializable(Inst)) - return true; - - // Insert into constant. - if (isa(Inst) && isa(Inst.getOperand(0))) { - return true; - } - - if (auto *Shuffle = dyn_cast(&Inst); Shuffle && Shuffle->isSingleSource()) - return true; - - return false; -} - -bool llvm::LgcMaterializable(Instruction &OrigI) { - Instruction *V = &OrigI; - - // extract instructions are rematerializable, but increases the size of the - // continuation state, so as a heuristic only rematerialize this if the source - // can be rematerialized as well. - while (true) { - Instruction *NewInst = nullptr; - if (auto *Val = dyn_cast(V)) - NewInst = dyn_cast(Val->getVectorOperand()); - else if (auto *Val = dyn_cast(V)) - NewInst = dyn_cast(Val->getAggregateOperand()); - - if (NewInst) - V = NewInst; - else - break; - } - - if (commonMaterializable(*V)) - return true; - - if (auto *LI = dyn_cast(V)) { - // load from constant address space - if (LI->getPointerAddressSpace() == 4) - return true; - } - - if (auto *CInst = dyn_cast(V)) { - if (auto *CalledFunc = CInst->getCalledFunction()) { - // Before rematerialization happens, lgc.rt dialect operations that cannot - // be rematerialized are replaced by their implementation, so that the - // necessary values can be put into the coroutine frame. Therefore, we - // can assume all left-over intrinsics can be rematerialized. - if (ContHelper::isRematerializableLgcRtOp(*CInst)) - return true; - - if (auto *Intrinsic = dyn_cast(CInst)) { - switch (Intrinsic->getIntrinsicID()) { - // Note: s_getpc will return a different value if rematerialized into a - // different place, but assuming we only care about the high 32bit for - // all the use cases we have now, it should be ok to do so. - case Intrinsic::amdgcn_s_getpc: - return true; - default: - break; - } - } - - auto CalledName = CalledFunc->getName(); - // FIXME: switch to dialectOp check. - if (CalledName.starts_with("lgc.user.data") || CalledName.starts_with("lgc.shader.input") || - CalledName.starts_with("lgc.create.get.desc.ptr") || CalledName.starts_with("lgc.load.buffer.desc") || - CalledName.starts_with("lgc.load.strided.buffer.desc") || CalledName.starts_with("lgc.load.user.data")) - return true; - } - } - - return false; -} - std::optional llvm::findDominatedContinueCall(CallInst *GetResPointAddr) { SmallDenseSet Visited; SmallDenseSet UnknownPreds; @@ -1328,7 +1286,11 @@ void addLgcContinuationTransform(ModulePassManager &MPM) { MPM.addPass(LowerAwaitPass()); - MPM.addPass(createModuleToFunctionPassAdaptor(InstCombinePass())); + // Scalarizer pass could break down system data structure (and possibly other data) which would help to reduce size of + // continuations state. + ScalarizerPassOptions scalarizerOptions; + scalarizerOptions.ScalarizeMinBits = 32; + MPM.addPass(createModuleToFunctionPassAdaptor(ScalarizerPass(scalarizerOptions))); MPM.addPass(CoroEarlyPass()); CGSCCPassManager CGPM; diff --git a/llvmraytracing/lib/DXILContPrepareGpurtLibrary.cpp b/llvmraytracing/lib/DXILContPrepareGpurtLibrary.cpp index 8f3aad0a32..c0d43557c7 100644 --- a/llvmraytracing/lib/DXILContPrepareGpurtLibrary.cpp +++ b/llvmraytracing/lib/DXILContPrepareGpurtLibrary.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -41,6 +41,7 @@ #include "llvm/ADT/SmallBitVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" +#include "llvm/IR/Analysis.h" #include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include @@ -86,22 +87,6 @@ static Function *transformFunction(Function &F) { if (NewFn->hasStructRetAttr()) NewFn = CompilerUtils::lowerStructRetArgument(NewFn); - SmallBitVector PromotionMask(NewFn->arg_size()); - - StringRef NameStr = NewFn->getName(); - for (unsigned ArgNo = 0; ArgNo < NewFn->arg_size(); ArgNo++) { - auto *Arg = NewFn->getArg(ArgNo); - TypedArgTy ArgTy = TypedArgTy::get(Arg); - if (!ArgTy.isPointerTy()) - continue; - - if ((NameStr.contains("Await") || NameStr.contains("Enqueue") || NameStr.contains("Traversal") || - (NameStr == ContDriverFunc::SetTriangleHitAttributesName && ArgNo != 0))) - PromotionMask.set(ArgNo); - } - // Promote pointer arguments to their pointee value types. - NewFn = CompilerUtils::promotePointerArguments(NewFn, PromotionMask); - NewFn->addFnAttr(Attribute::AlwaysInline); // Set external linkage, so the functions don't get removed, even if they are // never referenced at this point @@ -161,26 +146,32 @@ static bool isUtilFunction(StringRef Name) { return false; } -static void handleIsLlpc(Function &Func) { +static bool handleIsLlpc(Function &Func) { assert(Func.arg_empty() // bool && Func.getFunctionType()->getReturnType()->isIntegerTy(1)); auto *FalseConst = ConstantInt::getFalse(Func.getContext()); - llvm::replaceCallsToFunction(Func, *FalseConst); + return llvm::replaceCallsToFunction(Func, *FalseConst); } -static void handleGetShaderRecordIndex(llvm_dialects::Builder &B, Function &Func) { +static bool handleGetShaderRecordIndex(llvm_dialects::Builder &B, Function &Func) { assert(Func.arg_empty() // bool && Func.getFunctionType()->getReturnType()->isIntegerTy(32)); + bool Changed = false; + llvm::forEachCall(Func, [&](CallInst &CInst) { B.SetInsertPoint(&CInst); auto *ShaderIndexCall = B.create(); CInst.replaceAllUsesWith(ShaderIndexCall); CInst.eraseFromParent(); + + Changed = true; }); + + return Changed; } /// Restore the local root index after calls to some function, Func. @@ -189,12 +180,17 @@ static void handleGetShaderRecordIndex(llvm_dialects::Builder &B, Function &Func /// lgc.ilcps.setLocalRootIndex after cross-module inlining and helps us with determining a basic block split point /// later. We need that split point to ensure lgc.ilcps.setLocalRootIndex is called before resource accesses that depend /// on the local root index occur. -static void restoreLocalRootIndex(llvm_dialects::Builder &B, Function &Func) { +/// Returns whether something has changed. +static bool restoreLocalRootIndex(llvm_dialects::Builder &B, Function &Func) { + bool Changed = false; llvm::forEachCall(Func, [&](CallInst &CInst) { B.SetInsertPoint(++CInst.getIterator()); auto *ShaderIndexCall = B.create(); B.create(ShaderIndexCall); + Changed = true; }); + + return Changed; } llvm::PreservedAnalyses DXILContPrepareGpurtLibraryPass::run(llvm::Module &M, @@ -206,7 +202,9 @@ llvm::PreservedAnalyses DXILContPrepareGpurtLibraryPass::run(llvm::Module &M, SmallVector Funcs(make_pointer_range(M.functions())); llvm_dialects::Builder B{M.getContext()}; + bool Changed = false; + SmallVector PromotableFunctions; for (auto *F : Funcs) { auto Name = F->getName(); bool ShouldTransform = false; @@ -220,23 +218,26 @@ llvm::PreservedAnalyses DXILContPrepareGpurtLibraryPass::run(llvm::Module &M, if (isUtilFunction(Name)) { ShouldTransform = true; if (Name.contains("Await")) - restoreLocalRootIndex(B, *F); + Changed |= restoreLocalRootIndex(B, *F); } else if (Name.contains("IsLlpc")) { ShouldTransform = false; - handleIsLlpc(*F); + Changed |= handleIsLlpc(*F); } else if (Name.contains("GetShaderRecordIndex")) { ShouldTransform = false; - handleGetShaderRecordIndex(B, *F); + Changed |= handleGetShaderRecordIndex(B, *F); } } - if (ShouldTransform) - transformFunction(*F); - } + if (ShouldTransform) { + Function *NewFunc = transformFunction(*F); + PromotableFunctions.push_back(NewFunc); + } - fixupDxilMetadata(M); + Changed |= ShouldTransform; + } - earlyGpurtTransform(M); + Changed |= fixupDxilMetadata(M); + Changed |= earlyGpurtTransform(M, PromotableFunctions); - return PreservedAnalyses::none(); + return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all(); } diff --git a/llvmraytracing/lib/LowerRaytracingPipeline.cpp b/llvmraytracing/lib/LowerRaytracingPipeline.cpp index 69ab3afc68..806ffa495d 100644 --- a/llvmraytracing/lib/LowerRaytracingPipeline.cpp +++ b/llvmraytracing/lib/LowerRaytracingPipeline.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -38,7 +38,9 @@ // //===----------------------------------------------------------------------===// +#include "RematSupport.h" #include "compilerutils/CompilerUtils.h" +#include "compilerutils/TypesMetadata.h" #include "llpc/GpurtEnums.h" #include "llvmraytracing/Continuations.h" #include "llvmraytracing/ContinuationsUtil.h" @@ -58,6 +60,8 @@ #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Metadata.h" #include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include "llvm/IR/Value.h" @@ -226,8 +230,6 @@ class ModuleMetadataState final { uint32_t getMaxHitAttributeByteCount() const { return MaxHitAttributeByteCount; } - bool isInLgcCpsMode() const { return IsInLgcCpsMode; } - void updateModuleMetadata() const; private: @@ -252,9 +254,6 @@ class ModuleMetadataState final { /// Either stack or global memory. ContStackAddrspace StackAddrspace = ContHelper::DefaultStackAddrspace; - /// If the module has lgc.cps.module metadata attached. - bool IsInLgcCpsMode = false; - // Describes whether a value for maxUsedPayloadRegisterCount was set in the input module. // If that is the case, for driver functions we rely on it. // This mechanism ensures we don't rely on it in case the value was only initialized @@ -386,7 +385,7 @@ class LowerRaytracingPipelinePassImpl final { Data.PayloadStorage = Builder.CreateAlloca(Data.PayloadStorageTy); Data.PayloadStorage->setName("payload.serialization.alloca"); // TODO: We shouldn't need to create the alloca for RGS. - if (Data.Kind != RayTracingShaderStage::RayGeneration && Data.FirstPayloadArgumentDword.has_value()) + if (!Data.isRayGeneration() && Data.FirstPayloadArgumentDword.has_value()) Builder.CreateStore(Parent->getArg(Parent->arg_size() - 1), Data.PayloadStorage); } @@ -509,11 +508,11 @@ class LowerRaytracingPipelinePassImpl final { void collectGpuRtFunctions(); void determineDispatchSystemDataType(); + void extendArgumentStruct(); // Computes an upper bound on the number of required payload registers // for a TraceRay call, based on module-wide max attribute and payload size. - // In lgc.cps mode, this determines the number of payload - // registers preserved by Intersection shaders. + // For intersection shaders, this determines the number of preserved payload registers. // Doesn't apply to callable shaders. unsigned getUpperBoundOnTraceRayPayloadRegisters() const; @@ -587,6 +586,8 @@ class LowerRaytracingPipelinePassImpl final { Type *HitMissDataTy; /// Dispatch system data type passed to RayGen and others Type *DispatchSystemDataTy; + /// Vgpr Argument struct type passed to shaders + StructType *VgprArgumentStructTy; // Function definitions and declarations from HLSL // Driver implementation that returns if AcceptHitAndEndSearch was called @@ -633,8 +634,6 @@ ModuleMetadataState::ModuleMetadataState(Module &Module) : Mod{Module} { // Import StackAddrspace from metadata if set, otherwise from default auto StackAddrspaceMD = ContHelper::tryGetStackAddrspace(Module); StackAddrspace = StackAddrspaceMD.value_or(ContHelper::DefaultStackAddrspace); - - IsInLgcCpsMode = Mod.getNamedMetadata(ContHelper::MDLgcCpsModuleName) != nullptr; } /// Write the previously derived information about max payload registers and @@ -1404,7 +1403,7 @@ void LowerRaytracingPipelinePassImpl::processFunctionEntry(FunctionData &Data, A // Shader preamble // NOTE: Skip Traversal, as it can call its own shader start function in // GPURT directly if needed. - if (Data.Kind != RayTracingShaderStage::Traversal) { + if (!Data.isTraversal()) { auto ShaderStart = ShaderStartOverloads[Data.SystemDataTy]; if (ShaderStart) { CrossInliner.inlineCall(Builder, ShaderStart, Data.SystemData); @@ -1491,8 +1490,7 @@ void LowerRaytracingPipelinePassImpl::processFunctionEnd(FunctionData &Data, Fun Builder.SetInsertPoint(EData.Terminator); auto *PayloadTy = Data.IncomingPayload; - if (Data.Kind != RayTracingShaderStage::RayGeneration && Data.Kind != RayTracingShaderStage::Intersection && - Data.Kind != RayTracingShaderStage::Traversal) { + if (!Data.isRayGeneration() && !Data.isIntersection() && !Data.isTraversal()) { assert(PayloadTy && "Missing payload type!"); if (IsAnyHit) { @@ -1674,10 +1672,7 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData break; } case RayTracingShaderStage::Traversal: { - if (MetadataState.isInLgcCpsMode()) - SystemDataTy = getFuncArgPtrElementType(F, 0); - else - SystemDataTy = F->getArg(0)->getType(); + SystemDataTy = F->getArg(0)->getType(); AllArgTypes.push_back(SystemDataTy); NewRetTy = SystemDataTy; @@ -1707,9 +1702,8 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData Data.FirstPayloadArgumentDword = PayloadHelper.getPayloadStartDword(Data, MetadataState.getMaxHitAttributeByteCount(), TraversalDataTy); - const bool HasPayloadArgument = Data.Kind != RayTracingShaderStage::RayGeneration; - if (HasPayloadArgument) { - if (Data.Kind != RayTracingShaderStage::AnyHit) { + if (!Data.isRayGeneration()) { + if (!Data.isAnyHit()) { // Add a dummy argument for CpsArgIdx::HitAttributes so that the arg index // of payload matches CpsArgIdx::Payload AllArgTypes.push_back(StructType::get(*Context, {})); @@ -1724,7 +1718,7 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData Data.PayloadSpillSize = computePayloadSpillSize(Data.MaxOutgoingPayloadI32s, MetadataState.getMaxPayloadRegisterCount()); - assert(Data.PayloadSpillSize == 0 || Data.Kind != RayTracingShaderStage::Intersection); + assert(Data.PayloadSpillSize == 0 || !Data.isIntersection()); // Create new function to change signature auto *NewFuncTy = FunctionType::get(Builder.getVoidTy(), AllArgTypes, false); @@ -1740,13 +1734,11 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData Data.SystemDataTy = cast(SystemDataTy); processFunctionEntry(Data, NewFunc->getArg(CpsArgIdx::SystemData)); - if (MetadataState.isInLgcCpsMode()) { - // Mark as CPS function with the corresponding level. - CpsLevel Level = getCpsLevelForShaderStage(Data.Kind); - setCpsFunctionLevel(*NewFunc, Level); - } + // Mark as CPS function with the corresponding level. + CpsLevel Level = getCpsLevelForShaderStage(Data.Kind); + setCpsFunctionLevel(*NewFunc, Level); - if (Data.Kind != RayTracingShaderStage::RayGeneration) { + if (!Data.isRayGeneration()) { NewFunc->getArg(CpsArgIdx::SystemData)->setName("system.data"); NewFunc->getArg(CpsArgIdx::HitAttributes)->setName("hit.attrs"); NewFunc->getArg(CpsArgIdx::Padding)->setName("padding"); @@ -1754,19 +1746,9 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData } Value *NewSystemData = nullptr; - const bool IsTraversal = Data.isTraversal(); - if (IsTraversal) { + if (Data.isTraversal()) { assert(F->arg_size() == 1); - if (MetadataState.isInLgcCpsMode()) { - // System data - // NOTE: Pointer address space may not match based on data layout, mutate - // the address space here to keep later GEP valid. - Data.SystemData->mutateType(F->getArg(0)->getType()); - NewSystemData = Data.SystemData; - } else { - // Replace old system data argument with cloned functions' argument - NewSystemData = NewFunc->getArg(CpsArgIdx::SystemData); - } + NewSystemData = NewFunc->getArg(CpsArgIdx::SystemData); } PayloadHelper.initializePayloadSerializationStorage(NewFunc, Data); @@ -1785,9 +1767,6 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData FunctionEndData EData; if (Data.isRayGeneration()) { - if (!MetadataState.isInLgcCpsMode()) - NewFunc->setMetadata(ContHelper::MDEntryName, MDTuple::get(*Context, {})); - // Entry functions have no incoming payload or continuation state ContHelper::IncomingRegisterCount::setValue(NewFunc, 0); } else { @@ -1818,12 +1797,12 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData // recursive TraceRay or CallShader) SmallVector SavedRegisterValues{}; - if (Data.Kind != RayTracingShaderStage::Intersection && Data.Kind != RayTracingShaderStage::Traversal) { + if (!Data.isIntersection() && !Data.isTraversal()) { assert(PayloadTy && "Missing payload type!"); // For AnyHit, the layout depends on whether we accept or ignore, which // we do not know yet. In that case, the layout is determined later. - if (Data.Kind != RayTracingShaderStage::AnyHit) { + if (!Data.isAnyHit()) { OutgoingSerializationLayout = &PAQManager.getOrCreateShaderExitSerializationLayout( *SerializationInfo, Data.Kind, Data.HitAttributes, AnyHitExitKind::None); } @@ -1974,7 +1953,7 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData // Modify function ends // We do this close to the end because ReportHit handling can insert new returns. - if (Data.Kind != RayTracingShaderStage::Traversal) { + if (!Data.isTraversal()) { // While iterating over function ends, basic blocks are inserted by inlining // functions, so we copy them beforehand. SmallVector BBs(make_pointer_range(*NewFunc)); @@ -2004,7 +1983,7 @@ void LowerRaytracingPipelinePassImpl::processFunction(Function *F, FunctionData replaceShaderIndexCall(Data, Call); #ifndef NDEBUG - if (Data.Kind != RayTracingShaderStage::RayGeneration) { + if (!Data.isRayGeneration()) { // Check that all returns have registercount metadata for (const auto &BB : *F) { auto *Terminator = BB.getTerminator(); @@ -2100,20 +2079,19 @@ void LowerRaytracingPipelinePassImpl::collectProcessableFunctions() { FunctionData Data; Data.Kind = Kind; - if (Kind != RayTracingShaderStage::Intersection && Kind != RayTracingShaderStage::RayGeneration && - Kind != RayTracingShaderStage::Traversal) { + if (!Data.isIntersection() && !Data.isRayGeneration() && !Data.isTraversal()) { assert(!Func.arg_empty() && "Shader must have at least one argument"); Data.IncomingPayload = getFuncArgPtrElementType(&Func, 0); PAQPayloadConfig PAQConfig = {Data.IncomingPayload, MetadataState.getMaxHitAttributeByteCount()}; Data.IncomingPayloadSerializationInfo = &PAQManager.getOrCreateSerializationInfo(PAQConfig, Kind); assert(Data.IncomingPayloadSerializationInfo != nullptr && "Missing serialization info!"); } - if (Kind == RayTracingShaderStage::AnyHit || Kind == RayTracingShaderStage::ClosestHit) { + if (Data.isAnyHit() || Data.isClosestHit()) { assert(Func.arg_size() >= 2 && "Shader must have at least two arguments"); Data.HitAttributes = getFuncArgPtrElementType(&Func, Func.arg_size() - 1); } - if (Kind == RayTracingShaderStage::Intersection) { + if (Data.isIntersection()) { Data.MaxOutgoingPayloadI32s = MetadataState.getMaxPayloadRegisterCount(); } @@ -2151,7 +2129,7 @@ void LowerRaytracingPipelinePassImpl::handleUnrematerializableCandidates() { llvm::forEachCall(Func, [&](llvm::CallInst &CInst) { auto Data = ToProcess.find(CInst.getFunction()); if (Data != ToProcess.end()) { - if (!ContHelper::isRematerializableLgcRtOp(CInst, Data->second.Kind)) + if (!rematsupport::isRematerializableLgcRtOp(CInst, Data->second.Kind)) Data->second.IntrinsicCalls.push_back(&CInst); } }); @@ -2251,6 +2229,41 @@ void LowerRaytracingPipelinePassImpl::determineDispatchSystemDataType() { "type from _cont_DispatchRaysIndex3!"); } +/// Try to find the scheduler function on the GPURT module. Extract the arguments struct type, create a new one extended +/// by the maximum number of hit attribute and payload dwords and update the pointee type on the scheduler. +void LowerRaytracingPipelinePassImpl::extendArgumentStruct() { + Function *SchedulerFunc = GpurtLibrary->getFunction(ContDriverFunc::SchedulerName); + if (!SchedulerFunc) + return; + + assert(SchedulerFunc->arg_size() == 1); + + StructType *ExistingStructTy = cast(getFuncArgPtrElementType(SchedulerFunc->getArg(0))); + + // Ensure the arguments struct is properly setup if it exists. + SmallVector ArgumentTypes{ExistingStructTy->elements()}; + assert(ArgumentTypes.size() == 5); + assert(ArgumentTypes[0]->isIntegerTy(32)); + assert(ArgumentTypes[1]->isIntegerTy(32)); + assert(ArgumentTypes[2]->isIntegerTy(32)); + assert(ArgumentTypes[3]->isIntegerTy(32)); + assert(ArgumentTypes[4]->isStructTy()); + + ArgumentTypes.push_back( + ArrayType::get(Builder.getInt32Ty(), MetadataState.getMaxHitAttributeByteCount() / RegisterBytes)); + ArgumentTypes.push_back(ArrayType::get(Builder.getInt32Ty(), MetadataState.getMaxPayloadRegisterCount())); + + // Create a new struct. + LLVMContext &C = SchedulerFunc->getContext(); + VgprArgumentStructTy = + StructType::create(C, ArgumentTypes, ExistingStructTy->getStructName(), ExistingStructTy->isPacked()); + + // Update the pointee type on the scheduler function. + SchedulerFunc->eraseMetadata(C.getMDKindID(TypedFuncTy::MDTypesName)); + SmallVector PointeeTys{ConstantAsMetadata::get(PoisonValue::get(VgprArgumentStructTy))}; + SchedulerFunc->setMetadata(TypedFuncTy::MDTypesName, MDTuple::get(C, PointeeTys)); +} + LowerRaytracingPipelinePassImpl::LowerRaytracingPipelinePassImpl(llvm::Module &M, Module &GpurtLibrary) : Mod{&M}, GpurtLibrary{&GpurtLibrary}, Context{&M.getContext()}, DL{&M.getDataLayout()}, Builder{Mod->getContext()}, MetadataState{*Mod}, @@ -2260,6 +2273,7 @@ LowerRaytracingPipelinePassImpl::LowerRaytracingPipelinePassImpl(llvm::Module &M PreservedAnalyses LowerRaytracingPipelinePassImpl::run() { collectGpuRtFunctions(); determineDispatchSystemDataType(); + extendArgumentStruct(); collectProcessableFunctions(); diff --git a/llvmraytracing/lib/DXILSupport.cpp b/llvmraytracing/lib/RematSupport.cpp similarity index 60% rename from llvmraytracing/lib/DXILSupport.cpp rename to llvmraytracing/lib/RematSupport.cpp index cb4a1c44de..f6f354f4dc 100644 --- a/llvmraytracing/lib/DXILSupport.cpp +++ b/llvmraytracing/lib/RematSupport.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -23,26 +23,33 @@ * **********************************************************************************************************************/ -//===- DXILSupport.cpp - support functions for DXIL continuations ---------===// +//===- RematSupport.cpp - support functions for DXIL continuations ---------===// // // This file implements support functions for the DXIL continuations // //===----------------------------------------------------------------------===// -#include "llvmraytracing/Continuations.h" +#include "RematSupport.h" #include "llvmraytracing/ContinuationsUtil.h" +#include "llvm-dialects/Dialect/OpSet.h" #include "llvm/ADT/StringRef.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instructions.h" +#include "llvm/IR/Intrinsics.h" +#include "llvm/IR/IntrinsicsAMDGPU.h" +#include "llvm/IR/Module.h" #include "llvm/IR/User.h" #include "llvm/IR/Value.h" #include "llvm/Support/Casting.h" +#include "llvm/Support/Debug.h" +#include "llvm/Transforms/Coroutines/MaterializationUtils.h" -using namespace llvm; +#define DEBUG_TYPE "remat-support" -#define DEBUG_TYPE "dxil-coro-split" +using namespace llvm; +using namespace rematsupport; /// Check if a value is in the given resource list. /// The metadata argument must be one of the lists from dx.resources, i.e. for @@ -153,7 +160,80 @@ static bool isRematerializableDxilLoad(CallInst *CInst, StringRef CalledName) { return false; } -bool llvm::DXILMaterializable(Instruction &OrigI) { +// Helper function to track the first one of a sequence of insert instructions. +template static Instruction *TrackSequenceInsert(Instruction *Insert) { + static_assert(std::is_base_of() && "T must be an llvm::Instruction type!"); + Instruction *FirstInsert = Insert; + while (isa(FirstInsert->getOperand(0))) { + FirstInsert = cast(FirstInsert->getOperand(0)); + } + + // Only do this within a basic block, otherwise it might be unreliable. + if (Insert->getParent() != FirstInsert->getParent()) + return Insert; + return FirstInsert; +} + +// Helper function to query whether an instruction is rematerializable, which is +// shared between both DX and Vulkan path. +static bool commonMaterializable(Instruction &Inst) { + if (coro::isTriviallyMaterializable(Inst)) + return true; + + // Insert into constant. + if (isa(Inst)) { + Instruction *FirstInsert = nullptr; + if (FirstInsert = dyn_cast(&Inst)) + FirstInsert = TrackSequenceInsert(FirstInsert); + else if (FirstInsert = dyn_cast(&Inst)) + FirstInsert = TrackSequenceInsert(FirstInsert); + + if (isa(FirstInsert->getOperand(0))) + return true; + } + + if (auto *Shuffle = dyn_cast(&Inst)) { + if (Shuffle->isSingleSource()) + return true; + + // If either operand is constant, rematerializing will not increase continuation state size. + if (isa(Shuffle->getOperand(0)) || isa(Shuffle->getOperand(1))) + return true; + } + + return false; +} + +bool rematsupport::isRematerializableLgcRtOp(CallInst &CInst, std::optional Kind) { + using namespace lgc::rt; + Function *Callee = CInst.getCalledFunction(); + if (!LgcRtDialect::isDialectOp(*Callee)) + return false; + + // Always rematerialize + static const llvm_dialects::OpSet RematerializableDialectOps = + llvm_dialects::OpSet::get(); + if (RematerializableDialectOps.contains(*Callee)) + return true; + + // Rematerialize for Intersection that can only call ReportHit, which keeps + // the largest system data struct. These cannot be rematerialized in + // ClosestHit, because if ClosestHit calls TraceRay or CallShader, that + // information is lost from the system data struct. Also exclude rayTCurrent + // because ReportHit calls can change that. + if (!Kind || *Kind == RayTracingShaderStage::Intersection) { + static const llvm_dialects::OpSet RematerializableIntersectionDialectOps = + llvm_dialects::OpSet::get(); + if (RematerializableIntersectionDialectOps.contains(*Callee)) + return true; + } + + return false; +} + +bool rematsupport::DXILMaterializable(Instruction &OrigI) { Instruction *V = &OrigI; // extract instructions are rematerializable, but increases the size of the @@ -195,7 +275,7 @@ bool llvm::DXILMaterializable(Instruction &OrigI) { // be rematerialized are replaced by their implementation, so that the // necessary values can be put into the coroutine frame. Therefore, we // can assume all left-over intrinsics can be rematerialized. - if (ContHelper::isRematerializableLgcRtOp(*CInst)) + if (isRematerializableLgcRtOp(*CInst)) return true; auto CalledName = CalledFunc->getName(); @@ -234,3 +314,64 @@ bool llvm::DXILMaterializable(Instruction &OrigI) { return false; } + +bool rematsupport::LgcMaterializable(Instruction &OrigI) { + Instruction *V = &OrigI; + + // extract instructions are rematerializable, but increases the size of the + // continuation state, so as a heuristic only rematerialize this if the source + // can be rematerialized as well. + while (true) { + Instruction *NewInst = nullptr; + if (auto *Val = dyn_cast(V)) + NewInst = dyn_cast(Val->getVectorOperand()); + else if (auto *Val = dyn_cast(V)) + NewInst = dyn_cast(Val->getAggregateOperand()); + + if (NewInst) + V = NewInst; + else + break; + } + + if (commonMaterializable(*V)) + return true; + + if (auto *LI = dyn_cast(V)) { + // load from constant address space + if (LI->getPointerAddressSpace() == 4) + return true; + } + + if (auto *CInst = dyn_cast(V)) { + if (auto *CalledFunc = CInst->getCalledFunction()) { + // Before rematerialization happens, lgc.rt dialect operations that cannot + // be rematerialized are replaced by their implementation, so that the + // necessary values can be put into the coroutine frame. Therefore, we + // can assume all left-over intrinsics can be rematerialized. + if (isRematerializableLgcRtOp(*CInst)) + return true; + + if (auto *Intrinsic = dyn_cast(CInst)) { + switch (Intrinsic->getIntrinsicID()) { + // Note: s_getpc will return a different value if rematerialized into a + // different place, but assuming we only care about the high 32bit for + // all the use cases we have now, it should be ok to do so. + case Intrinsic::amdgcn_s_getpc: + return true; + default: + break; + } + } + + auto CalledName = CalledFunc->getName(); + // FIXME: switch to dialectOp check. + if (CalledName.starts_with("lgc.user.data") || CalledName.starts_with("lgc.shader.input") || + CalledName.starts_with("lgc.create.get.desc.ptr") || CalledName.starts_with("lgc.load.buffer.desc") || + CalledName.starts_with("lgc.load.strided.buffer.desc") || CalledName.starts_with("lgc.load.user.data")) + return true; + } + } + + return false; +} diff --git a/llvmraytracing/lib/RematSupport.h b/llvmraytracing/lib/RematSupport.h new file mode 100644 index 0000000000..a7cb83cd59 --- /dev/null +++ b/llvmraytracing/lib/RematSupport.h @@ -0,0 +1,56 @@ +/* + *********************************************************************************************************************** + * + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + **********************************************************************************************************************/ + +//===- RematSupport.h - Support functions for rematerialization -----------===// +// +// This file defines callbacks used during rematerialization by +// the Continuation State Builder. +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include "lgc/LgcRtDialect.h" +#include "llvm/IR/Instruction.h" +#include "llvm/IR/Instructions.h" +#include + +namespace rematsupport { +/// Returns true if a call to the given function should be rematerialized +/// in a shader of the specified kind. +/// +/// If no shader kind is specified, return false. +bool isRematerializableLgcRtOp(llvm::CallInst &CInst, + std::optional Kind = std::nullopt); + +// Rematerializable callback specific to DXIL - mainly used to extend what's +// considered rematerializable for continuations +bool DXILMaterializable(llvm::Instruction &I); + +// Rematerializable callback specific to LgcCps - mainly used to extend what's +// considered rematerializable for continuations +bool LgcMaterializable(llvm::Instruction &I); + +} // namespace rematsupport diff --git a/llvmraytracing/lib/SpecializeDriverShaders.cpp b/llvmraytracing/lib/SpecializeDriverShaders.cpp index 4e31c35457..4166d5d385 100644 --- a/llvmraytracing/lib/SpecializeDriverShaders.cpp +++ b/llvmraytracing/lib/SpecializeDriverShaders.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -493,8 +493,7 @@ struct FunctionData { // Stores an outgoing jump. SmallVector Jumps; - // Handle lgc.cps.await. - // lgc.cps uses a single await call, like: + // Handle lgc.cps.await, like: // %result = call @lgc.cps.await(i32 %target, i32 %levels, args...) SmallVector Awaits; }; diff --git a/llvmraytracing/test/intrinsics/get-func-addr.ll b/llvmraytracing/test/intrinsics/get-func-addr.ll index dbf69737d1..57786c8169 100644 --- a/llvmraytracing/test/intrinsics/get-func-addr.ll +++ b/llvmraytracing/test/intrinsics/get-func-addr.ll @@ -17,7 +17,7 @@ define void @_cont_ExitRayGen(ptr nocapture readonly %data) alwaysinline nounwin define { i32, i32 } @main() !lgc.rt.shaderstage !10 { ; CHECK-LABEL: define void @main -; CHECK-SAME: (i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], [[STRUCT_DISPATCHSYSTEMDATA:%.*]] [[TMP0:%.*]]) !lgc.rt.shaderstage [[META5:![0-9]+]] !continuation.entry [[META10:![0-9]+]] !continuation.registercount [[META5]] !continuation [[META11:![0-9]+]] { +; CHECK-SAME: (i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], [[STRUCT_DISPATCHSYSTEMDATA:%.*]] [[TMP0:%.*]]) !lgc.rt.shaderstage [[META5:![0-9]+]] !lgc.cps [[META10:![0-9]+]] !continuation.registercount [[META5]] !continuation [[META11:![0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca [[STRUCT_DISPATCHSYSTEMDATA]], align 8 ; CHECK-NEXT: [[PAYLOAD_SERIALIZATION_ALLOCA:%.*]] = alloca [0 x i32], align 4 diff --git a/llvmraytracing/test/intrinsics/shader-start.ll b/llvmraytracing/test/intrinsics/shader-start.ll index d7ecfc941f..f1b6d9f72d 100644 --- a/llvmraytracing/test/intrinsics/shader-start.ll +++ b/llvmraytracing/test/intrinsics/shader-start.ll @@ -13,7 +13,7 @@ declare !pointeetys !{%struct.DispatchSystemData poison} void @_cont_DispatchRay define void @main() !lgc.rt.shaderstage !10 { ; CHECK-LABEL: define void @main( -; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], [[STRUCT_DISPATCHSYSTEMDATA:%.*]] [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [8 x i32] [[PADDING:%.*]], [30 x i32] [[PAYLOAD:%.*]]) !lgc.rt.shaderstage [[META5:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !continuation [[META6:![0-9]+]] { +; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], [[STRUCT_DISPATCHSYSTEMDATA:%.*]] [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [8 x i32] [[PADDING:%.*]], [30 x i32] [[PAYLOAD:%.*]]) !lgc.rt.shaderstage [[META5:![0-9]+]] !lgc.cps [[META6:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !continuation [[META7:![0-9]+]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca [[STRUCT_DISPATCHSYSTEMDATA]], align 8 ; CHECK-NEXT: [[PAYLOAD_SERIALIZATION_ALLOCA:%.*]] = alloca [30 x i32], align 4 @@ -63,5 +63,6 @@ entry: ; CHECK: [[META0]] = !{i32 30} ; CHECK: [[META4]] = !{%struct.DispatchSystemData poison} ; CHECK: [[META5]] = !{i32 1} -; CHECK: [[META6]] = !{ptr @main} +; CHECK: [[META6]] = !{i32 5} +; CHECK: [[META7]] = !{ptr @main} ;. diff --git a/llvmraytracing/test/lgccps/alloca-select.ll b/llvmraytracing/test/lgccps/alloca-select.ll index 9bc5e8a0a7..8088266d88 100644 --- a/llvmraytracing/test/lgccps/alloca-select.ll +++ b/llvmraytracing/test/lgccps/alloca-select.ll @@ -1,8 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs --version 2 ; RUN: opt --verify-each -S -o - -passes='lower-await,coro-early,lgc-coro-split,coro-cleanup,cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, float) define void @test(i32 %shaderIndex, i32 %rcr, float %arg, i32 %arg1) !lgc.cps !0 { diff --git a/llvmraytracing/test/lgccps/await-if-else.ll b/llvmraytracing/test/lgccps/await-if-else.ll index 0a2c4de6cc..afe3a51bb0 100644 --- a/llvmraytracing/test/lgccps/await-if-else.ll +++ b/llvmraytracing/test/lgccps/await-if-else.ll @@ -1,8 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs --version 3 ; RUN: opt --verify-each -S -o - -passes='lower-await,coro-early,lgc-coro-split,coro-cleanup,cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, float) declare !lgc.cps !0 void @callee2({}, i32, float) diff --git a/llvmraytracing/test/lgccps/await-if.ll b/llvmraytracing/test/lgccps/await-if.ll index 0452c94abb..7b5dec9968 100644 --- a/llvmraytracing/test/lgccps/await-if.ll +++ b/llvmraytracing/test/lgccps/await-if.ll @@ -1,8 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs --version 3 ; RUN: opt --verify-each -S -o - -passes='lower-await,coro-early,lgc-coro-split,coro-cleanup,cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, float) define void @test(i32 %shaderIndex, i32 %rcr, float %arg) !lgc.cps !0 { diff --git a/llvmraytracing/test/lgccps/await-in-loop.ll b/llvmraytracing/test/lgccps/await-in-loop.ll index bdaf2d2f6c..d4ba4a6af3 100644 --- a/llvmraytracing/test/lgccps/await-in-loop.ll +++ b/llvmraytracing/test/lgccps/await-in-loop.ll @@ -1,8 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs --version 3 ; RUN: opt --verify-each -S -o - -passes='lower-await,coro-early,lgc-coro-split,coro-cleanup,cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, i32) define void @test(i32 %shaderIndex, i32 %rcr, float %arg, float %arg2) !lgc.cps !0 { diff --git a/llvmraytracing/test/lgccps/call-shader-i1-payload.ll b/llvmraytracing/test/lgccps/call-shader-i1-payload.ll index 6487fbd1a4..3026e91ca6 100644 --- a/llvmraytracing/test/lgccps/call-shader-i1-payload.ll +++ b/llvmraytracing/test/lgccps/call-shader-i1-payload.ll @@ -43,8 +43,6 @@ declare void @lgc.rt.call.callable.shader(...) #1 attributes #0 = { alwaysinline } attributes #1 = { nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) } -!lgc.cps.module = !{} - !0 = !{i32 0, %struct.DispatchSystemData poison} !1 = !{%struct.DispatchSystemData poison} !2 = !{%struct.DispatchSystemData poison} diff --git a/llvmraytracing/test/lgccps/cleanup-store-loads.ll b/llvmraytracing/test/lgccps/cleanup-store-loads.ll index 3d185f2fed..687e1e8144 100644 --- a/llvmraytracing/test/lgccps/cleanup-store-loads.ll +++ b/llvmraytracing/test/lgccps/cleanup-store-loads.ll @@ -1,8 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs --version 3 ; RUN: opt --verify-each -S -o - -passes='cgscc(inline),cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, float) declare i64 @getVal64() diff --git a/llvmraytracing/test/lgccps/cps-no-await.ll b/llvmraytracing/test/lgccps/cps-no-await.ll index 566a797650..8901e3363e 100644 --- a/llvmraytracing/test/lgccps/cps-no-await.ll +++ b/llvmraytracing/test/lgccps/cps-no-await.ll @@ -9,8 +9,6 @@ define void @_cont_Traversal() !lgc.cps !{i32 2} !continuation !{ptr @_cont_Trav unreachable } -!lgc.cps.module = !{} - declare ptr addrspace(4) @lgc.user.data(i32) declare void @lgc.cps.jump(...) ; LOWER-AWAIT-LABEL: define { ptr, ptr } @_cont_Traversal( diff --git a/llvmraytracing/test/lgccps/entry-point-with-cps.ll b/llvmraytracing/test/lgccps/entry-point-with-cps.ll index d2fa22cd3e..36b33d51c0 100644 --- a/llvmraytracing/test/lgccps/entry-point-with-cps.ll +++ b/llvmraytracing/test/lgccps/entry-point-with-cps.ll @@ -6,8 +6,6 @@ ; Details of the output are likely to differ from the final production pass, ; especially instruction order and value names. -!lgc.cps.module = !{} - declare void @lgc.cps.complete() define void @_cont_KernelEntry() #0 !lgc.rt.shaderstage !{i32 7} { diff --git a/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-get-i32.ll b/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-get-i32.ll index 7fceb15542..f952e442b7 100644 --- a/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-get-i32.ll +++ b/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-get-i32.ll @@ -14,14 +14,14 @@ declare i32 @_AmdContPayloadRegistersGetI32(i32) @debug_global = external global i32 -define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal(ptr addrspace(5) %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !3 { +define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal({ i32 } %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !3 { ; CHECK-LABEL: define dso_local spir_func void @_cont_Traversal( -; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { { i32 } } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [41 x i32] [[PADDING:%.*]], [30 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META3:![0-9]+]] !lgc.rt.shaderstage [[META4:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !lgc.cps [[META5:![0-9]+]] !continuation [[META6:![0-9]+]] { +; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { i32 } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [41 x i32] [[PADDING:%.*]], [30 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META3:![0-9]+]] !lgc.rt.shaderstage [[META4:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !lgc.cps [[META5:![0-9]+]] !continuation [[META6:![0-9]+]] { ; CHECK-NEXT: .entry: -; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { { i32 } }, align 8, addrspace(5) +; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { i32 }, align 8 ; CHECK-NEXT: [[PAYLOAD_SERIALIZATION_ALLOCA:%.*]] = alloca [30 x i32], align 4 ; CHECK-NEXT: store [30 x i32] [[PAYLOAD]], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], align 4 -; CHECK-NEXT: store { { i32 } } [[SYSTEM_DATA]], ptr addrspace(5) [[SYSTEM_DATA_ALLOCA]], align 4 +; CHECK-NEXT: store { i32 } [[SYSTEM_DATA]], ptr [[SYSTEM_DATA_ALLOCA]], align 4 ; CHECK-NEXT: [[TMP0:%.*]] = getelementptr [30 x i32], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], i32 0, i32 2 ; CHECK-NEXT: [[VAL:%.*]] = load i32, ptr [[TMP0]], align 4 ; CHECK-NEXT: store i32 [[VAL]], ptr @debug_global, align 4 @@ -38,8 +38,6 @@ define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @ declare void @lgc.cps.jump(...) local_unnamed_addr -!lgc.cps.module = !{} - !0 = !{i32 7} !1 = !{ { { i32 } } poison} !3 = !{i32 6} diff --git a/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-i32-count.ll b/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-i32-count.ll index 75cc839391..e4ad0cb4d3 100644 --- a/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-i32-count.ll +++ b/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-i32-count.ll @@ -14,14 +14,14 @@ declare i32 @_AmdContPayloadRegistersI32Count() @debug_global = external global i32 -define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal(ptr addrspace(5) %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !3 { +define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal({ i32 } %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !3 { ; CHECK-LABEL: define dso_local spir_func void @_cont_Traversal( -; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { { i32 } } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [41 x i32] [[PADDING:%.*]], [11 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META4:![0-9]+]] !lgc.rt.shaderstage [[META5:![0-9]+]] !continuation.registercount [[META1:![0-9]+]] !lgc.cps [[META6:![0-9]+]] !continuation [[META7:![0-9]+]] { +; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { i32 } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [41 x i32] [[PADDING:%.*]], [11 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META4:![0-9]+]] !lgc.rt.shaderstage [[META5:![0-9]+]] !continuation.registercount [[META1:![0-9]+]] !lgc.cps [[META6:![0-9]+]] !continuation [[META7:![0-9]+]] { ; CHECK-NEXT: .entry: -; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { { i32 } }, align 8, addrspace(5) +; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { i32 }, align 8 ; CHECK-NEXT: [[PAYLOAD_SERIALIZATION_ALLOCA:%.*]] = alloca [11 x i32], align 4 ; CHECK-NEXT: store [11 x i32] [[PAYLOAD]], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], align 4 -; CHECK-NEXT: store { { i32 } } [[SYSTEM_DATA]], ptr addrspace(5) [[SYSTEM_DATA_ALLOCA]], align 4 +; CHECK-NEXT: store { i32 } [[SYSTEM_DATA]], ptr [[SYSTEM_DATA_ALLOCA]], align 4 ; CHECK-NEXT: store i32 11, ptr @debug_global, align 4 ; CHECK-NEXT: [[TMP0:%.*]] = load [11 x i32], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], align 4 ; CHECK-NEXT: call void (...) @lgc.cps.jump(i32 4, i32 -1, i32 poison, i32 poison, i32 5, [42 x i32] poison, [11 x i32] [[TMP0]]), !continuation.registercount [[META1]] @@ -36,7 +36,6 @@ define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @ declare void @lgc.cps.jump(...) local_unnamed_addr -!lgc.cps.module = !{} !continuation.maxPayloadRegisterCount = !{!11} !continuation.maxUsedPayloadRegisterCount = !{!12} diff --git a/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-set-i32.ll b/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-set-i32.ll index 48db4658b1..82f9d4bb4d 100644 --- a/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-set-i32.ll +++ b/llvmraytracing/test/lgccps/intrinsics/cont-payload-registers-set-i32.ll @@ -12,14 +12,14 @@ declare !pointeetys !10 void @_cont_ExitRayGen(%struct.DispatchSystemData*) declare void @_AmdContPayloadRegistersSetI32(i32, i32) -define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal(ptr addrspace(5) %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !3 { +define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal({ i32 } %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !3 { ; CHECK-LABEL: define dso_local spir_func void @_cont_Traversal( -; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { { i32 } } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [41 x i32] [[PADDING:%.*]], [30 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META3:![0-9]+]] !lgc.rt.shaderstage [[META4:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !lgc.cps [[META5:![0-9]+]] !continuation [[META6:![0-9]+]] { +; CHECK-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { i32 } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [41 x i32] [[PADDING:%.*]], [30 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META3:![0-9]+]] !lgc.rt.shaderstage [[META4:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !lgc.cps [[META5:![0-9]+]] !continuation [[META6:![0-9]+]] { ; CHECK-NEXT: .entry: -; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { { i32 } }, align 8, addrspace(5) +; CHECK-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { i32 }, align 8 ; CHECK-NEXT: [[PAYLOAD_SERIALIZATION_ALLOCA:%.*]] = alloca [30 x i32], align 4 ; CHECK-NEXT: store [30 x i32] [[PAYLOAD]], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], align 4 -; CHECK-NEXT: store { { i32 } } [[SYSTEM_DATA]], ptr addrspace(5) [[SYSTEM_DATA_ALLOCA]], align 4 +; CHECK-NEXT: store { i32 } [[SYSTEM_DATA]], ptr [[SYSTEM_DATA_ALLOCA]], align 4 ; CHECK-NEXT: [[TMP0:%.*]] = getelementptr [30 x i32], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], i32 0, i32 3 ; CHECK-NEXT: store i32 42, ptr [[TMP0]], align 4 ; CHECK-NEXT: [[TMP1:%.*]] = load [30 x i32], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], align 4 @@ -34,8 +34,6 @@ define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @ declare void @lgc.cps.jump(...) local_unnamed_addr -!lgc.cps.module = !{} - !0 = !{i32 7} !1 = !{ { { i32 } } poison} !3 = !{i32 6} diff --git a/llvmraytracing/test/lgccps/multiple-await.ll b/llvmraytracing/test/lgccps/multiple-await.ll index 2e6de52440..14e74d6e53 100644 --- a/llvmraytracing/test/lgccps/multiple-await.ll +++ b/llvmraytracing/test/lgccps/multiple-await.ll @@ -1,8 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs --version 3 ; RUN: opt --verify-each -S -o - -passes='lower-await,coro-early,lgc-coro-split,coro-cleanup,cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, float) declare !lgc.cps !0 void @callee2({}, i32, float) diff --git a/llvmraytracing/test/lgccps/simple-await-more-state.ll b/llvmraytracing/test/lgccps/simple-await-more-state.ll index 90dfeb6b00..210ed246b7 100644 --- a/llvmraytracing/test/lgccps/simple-await-more-state.ll +++ b/llvmraytracing/test/lgccps/simple-await-more-state.ll @@ -1,8 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs --version 3 ; RUN: opt --verify-each -S -o - -passes='lower-await,coro-early,lgc-coro-split,coro-cleanup,cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, float) define void @test(i32 %shaderIndex, i32 %rcr, float %arg, float %arg2) !lgc.cps !0 { diff --git a/llvmraytracing/test/lgccps/simple-await.ll b/llvmraytracing/test/lgccps/simple-await.ll index 24bf723e66..a1b37422cc 100644 --- a/llvmraytracing/test/lgccps/simple-await.ll +++ b/llvmraytracing/test/lgccps/simple-await.ll @@ -2,8 +2,6 @@ ; RUN: opt --verify-each -S -o - -passes='lower-await,coro-early,lgc-coro-split,coro-cleanup,cleanup-continuations' %s | FileCheck --check-prefixes=CHECK %s ; RUN: opt --verify-each -S -o - -passes='lower-await' %s | FileCheck --check-prefixes=LOWER-AWAIT %s -!lgc.cps.module = !{} - declare !lgc.cps !0 void @callee({}, i32, float) define void @test(i32 %shaderIndex, i32 %rcr, float %arg) !lgc.cps !0 { diff --git a/llvmraytracing/test/lgccps/traversal-padding-hitattr-size.ll b/llvmraytracing/test/lgccps/traversal-padding-hitattr-size.ll index a748d04f04..253b3a966c 100644 --- a/llvmraytracing/test/lgccps/traversal-padding-hitattr-size.ll +++ b/llvmraytracing/test/lgccps/traversal-padding-hitattr-size.ll @@ -14,15 +14,15 @@ declare !pointeetys !6 void @_cont_ExitRayGen(%struct.DispatchSystemData*) declare i32 @_AmdGetCurrentFuncAddr() -define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal(ptr addrspace(5) %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !2 { +define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @_cont_Traversal({ i32 } %0) local_unnamed_addr !lgc.shaderstage !0 !pointeetys !1 !lgc.rt.shaderstage !2 { ; CHECK-ATTRSIZE-16-LABEL: define dso_local spir_func void @_cont_Traversal( ; CHECK-ATTRSIZE-16-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { i32 } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [4 x i32] [[PADDING:%.*]], [8 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META5:![0-9]+]] !lgc.rt.shaderstage [[META6:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !lgc.cps [[META7:![0-9]+]] !continuation [[META8:![0-9]+]] { ; CHECK-ATTRSIZE-16-NEXT: [[_ENTRY:.*:]] -; CHECK-ATTRSIZE-16-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { i32 }, align 8, addrspace(5) +; CHECK-ATTRSIZE-16-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { i32 }, align 8 ; CHECK-ATTRSIZE-16-NEXT: [[PAYLOAD_SERIALIZATION_ALLOCA:%.*]] = alloca [8 x i32], align 4 ; CHECK-ATTRSIZE-16-NEXT: store [8 x i32] [[PAYLOAD]], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], align 4 -; CHECK-ATTRSIZE-16-NEXT: store { i32 } [[SYSTEM_DATA]], ptr addrspace(5) [[SYSTEM_DATA_ALLOCA]], align 4 -; CHECK-ATTRSIZE-16-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[SYSTEM_DATA_ALLOCA]], align 4 +; CHECK-ATTRSIZE-16-NEXT: store { i32 } [[SYSTEM_DATA]], ptr [[SYSTEM_DATA_ALLOCA]], align 4 +; CHECK-ATTRSIZE-16-NEXT: [[TMP0:%.*]] = extractvalue { i32 } [[SYSTEM_DATA]], 0 ; CHECK-ATTRSIZE-16-NEXT: [[TMP1:%.*]] = icmp ugt i32 [[TMP0]], -3 ; CHECK-ATTRSIZE-16-NEXT: br i1 [[TMP1]], label %[[BB2:.*]], label %[[BB4:.*]] ; CHECK-ATTRSIZE-16: [[BB2]]: @@ -46,11 +46,11 @@ define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @ ; CHECK-ATTRSIZE-8-LABEL: define dso_local spir_func void @_cont_Traversal( ; CHECK-ATTRSIZE-8-SAME: i32 [[SHADERINDEX:%.*]], i32 [[RETURNADDR:%.*]], { i32 } [[SYSTEM_DATA:%.*]], {} [[HIT_ATTRS:%.*]], [2 x i32] [[PADDING:%.*]], [8 x i32] [[PAYLOAD:%.*]]) local_unnamed_addr !lgc.shaderstage [[META4:![0-9]+]] !lgc.rt.shaderstage [[META5:![0-9]+]] !continuation.registercount [[META0:![0-9]+]] !lgc.cps [[META6:![0-9]+]] !continuation [[META7:![0-9]+]] { ; CHECK-ATTRSIZE-8-NEXT: [[_ENTRY:.*:]] -; CHECK-ATTRSIZE-8-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { i32 }, align 8, addrspace(5) +; CHECK-ATTRSIZE-8-NEXT: [[SYSTEM_DATA_ALLOCA:%.*]] = alloca { i32 }, align 8 ; CHECK-ATTRSIZE-8-NEXT: [[PAYLOAD_SERIALIZATION_ALLOCA:%.*]] = alloca [8 x i32], align 4 ; CHECK-ATTRSIZE-8-NEXT: store [8 x i32] [[PAYLOAD]], ptr [[PAYLOAD_SERIALIZATION_ALLOCA]], align 4 -; CHECK-ATTRSIZE-8-NEXT: store { i32 } [[SYSTEM_DATA]], ptr addrspace(5) [[SYSTEM_DATA_ALLOCA]], align 4 -; CHECK-ATTRSIZE-8-NEXT: [[TMP0:%.*]] = load i32, ptr addrspace(5) [[SYSTEM_DATA_ALLOCA]], align 4 +; CHECK-ATTRSIZE-8-NEXT: store { i32 } [[SYSTEM_DATA]], ptr [[SYSTEM_DATA_ALLOCA]], align 4 +; CHECK-ATTRSIZE-8-NEXT: [[TMP0:%.*]] = extractvalue { i32 } [[SYSTEM_DATA]], 0 ; CHECK-ATTRSIZE-8-NEXT: [[TMP1:%.*]] = icmp ugt i32 [[TMP0]], -3 ; CHECK-ATTRSIZE-8-NEXT: br i1 [[TMP1]], label %[[BB2:.*]], label %[[BB4:.*]] ; CHECK-ATTRSIZE-8: [[BB2]]: @@ -72,7 +72,7 @@ define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @ ; CHECK-ATTRSIZE-8-NEXT: unreachable ; .entry: - %1 = load i32, ptr addrspace(5) %0, align 4 + %1 = extractvalue { i32 } %0, 0 %2 = icmp ugt i32 %1, -3 br i1 %2, label %3, label %4 @@ -98,7 +98,6 @@ define dso_local spir_func { { float, i32, i32, i32, i32 }, <2 x float>, i32 } @ declare void @lgc.cps.jump(...) local_unnamed_addr !continuation.maxUsedPayloadRegisterCount = !{!5} -!lgc.cps.module = !{} !lgc.rt.max.attribute.size = !{!3} !0 = !{i32 7} diff --git a/script/gc-amdvlk-docker-images.py b/script/gc-amdvlk-docker-images.py deleted file mode 100755 index 65baea5342..0000000000 --- a/script/gc-amdvlk-docker-images.py +++ /dev/null @@ -1,127 +0,0 @@ -#! /usr/bin/env python3 -"""Script to garbage collect old amdvlk docker images created by the public CI on GitHub. - -Requires python 3.8 or later. -""" - -import argparse -import json -import logging -import subprocess -import sys - -from collections import defaultdict -from typing import Any, Dict, List, Optional, Tuple - -def _run_cmd(cmd: List[str]) -> Tuple[bool, str]: - """ - Runs a shell command capturing its output. - - Args: - cmd: List of strings to invoke as a subprocess - - Returns: - Tuple: success, stdout. The first value is True on success. - """ - logging.info('Running command: %s', ' '.join(cmd)) - result = subprocess.run(cmd, capture_output=True, check=False, text=True) - if result.returncode != 0: - logging.info('%s', result.stderr) - return False, '' - return True, result.stdout - - -def query_images(artifact_repository_url: str) -> Optional[List[Dict[str, Any]]]: - """ - Returns a list of JSON objects representing docker images found under - |artifact_repository_url|, or None on error. - - Sample JSON object: - { - "createTime": "2022-07-11T20:20:23.577823Z", - "package": "us-docker.pkg.dev/stadia-open-source/amdvlk-public-ci/amdvlk_release_gcc_assertions", - "tags": "", - "updateTime": "2022-07-11T20:20:23.577823Z", - "version": "sha256:e101b6336fa78014e4008df59667dd84616dc8d1b60c2240f3246ab9a1ed6b20" - } - """ - ok, text = _run_cmd(['gcloud', 'artifacts', 'docker', 'images', 'list', - artifact_repository_url, '--format=json', '--quiet']) - if not ok: - return None - return list(json.loads(text)) - - -def find_images_to_gc(images: List[Dict[str, Any]], num_last_to_keep) -> List[Dict[str, Any]]: - """ - Returns a subset of |images| that should be garbage collected. Preserves tagged - images and also the most recent |num_last_to_keep| for each package. - """ - package_to_images = defaultdict(list) - for image in images: - package_to_images[image['package']].append(image) - - to_gc = [] - for _, images in package_to_images.items(): - # Because the time format is ISO 8601, the lexicographic order is also chronological. - images.sort(key=lambda x: x['createTime']) - for image in images[:-num_last_to_keep]: - if not image['tags']: - to_gc.append(image) - - return to_gc - - -def delete_images(images: List[Dict[str, Any]], dry_run: bool) -> None: - """ - Deletes all |images| from the repository. When |dry_run| is True, synthesizes the delete - commands and logs but does not execute them. - """ - for image in images: - image_path = image['package'] + '@' + image['version'] - cmd = ['gcloud', 'artifacts', 'docker', 'images', 'delete', - image_path, '--quiet'] - if dry_run: - logging.info('Dry run: %s', ' '.join(cmd)) - continue - - ok, _ = _run_cmd(cmd) - if not ok: - logging.warning('Failed to delete image:\n%s', image) - - -def main() -> int: - logging.basicConfig( - format='%(levelname)s %(asctime)s %(filename)s:%(lineno)d %(message)s', - level=logging.INFO) - parser = argparse.ArgumentParser( - description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) - - parser.add_argument( - '--dry-run', - action='store_true', - default=False, - help='Do not delete or modify any docker images (default: %(default)s).') - parser.add_argument( - '--keep-last', - default=8, - help='The number of the most recent images to keep for each package (default: %(default)s).') - parser.add_argument( - '--repository-url', - default='us-docker.pkg.dev/stadia-open-source/amdvlk-public-ci', - help='The repository with docker images to garbage collect (default: %(default)s).' - ) - args = parser.parse_args() - - all_images = query_images(args.repository_url) - if all_images is None: - logging.error('Failed to list docker images under \'%s\'', args.repository_url) - return 1 - - to_gc = find_images_to_gc(all_images, args.keep_last) - delete_images(to_gc, args.dry_run) - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/script/spv-to-shaderdb-test.py b/script/spv-to-shaderdb-test.py index df048785bf..fec6e19e00 100644 --- a/script/spv-to-shaderdb-test.py +++ b/script/spv-to-shaderdb-test.py @@ -2,7 +2,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -24,8 +24,6 @@ # ####################################################################################################################### - - """ spv-to-shaderdb-test.py -- Script to create a shaderdb test from spir-v assembly files. Supports downloading files and unpacking archives (e.g., .zip). diff --git a/script/switch-coding-style.sh b/script/switch-coding-style.sh index 51dfeb5fa9..5f4513457f 100755 --- a/script/switch-coding-style.sh +++ b/script/switch-coding-style.sh @@ -2,7 +2,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -142,9 +142,9 @@ do_clang_tidy() { mkdir -p $build/fixes/llpc/context && mkdir -p $build/fixes/llpc/imported/metrohash/src && mkdir -p $build/fixes/llpc/lower && - mkdir -p $build/fixes/lgc/patch && - mkdir -p $build/fixes/lgc/patch/gfx9 && - mkdir -p $build/fixes/lgc/patch/gfx9/chip && + mkdir -p $build/fixes/lgc/lowering && + mkdir -p $build/fixes/lgc/lowering/gfx9 && + mkdir -p $build/fixes/lgc/lowering/gfx9/chip && mkdir -p $build/fixes/llpc/tool && mkdir -p $build/fixes/llpc/tool/vfx && mkdir -p $build/fixes/llpc/translator/lib/SPIRV && diff --git a/test/query_gfxip.py b/test/query_gfxip.py index 7fea16d514..3687cd5abd 100755 --- a/test/query_gfxip.py +++ b/test/query_gfxip.py @@ -2,7 +2,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -24,7 +24,6 @@ # ####################################################################################################################### - # Map PCI device ids to a gfxip number import glob diff --git a/tool/dumper/vkgcPipelineDumper.cpp b/tool/dumper/vkgcPipelineDumper.cpp index c0bcbef7b7..c35345e9c1 100644 --- a/tool/dumper/vkgcPipelineDumper.cpp +++ b/tool/dumper/vkgcPipelineDumper.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -941,11 +941,8 @@ void PipelineDumper::dumpPipelineOptions(const PipelineOptions *options, std::os dumpFile << "options.internalRtShaders = " << options->internalRtShaders << "\n"; dumpFile << "options.forceNonUniformResourceIndexStageMask = " << options->forceNonUniformResourceIndexStageMask << "\n"; -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 73 - const char *glStatePrefix = "options."; -#else + const char *glStatePrefix = "options.glState."; -#endif dumpFile << glStatePrefix << "replaceSetWithResourceType = " << options->getGlState().replaceSetWithResourceType << "\n"; dumpFile << glStatePrefix << "disableSampleMask = " << options->getGlState().disableSampleMask << "\n"; @@ -1859,10 +1856,11 @@ void PipelineDumper::updateHashForNonFragmentState(const GraphicsPipelineBuildIn updateHashFromRs |= (enableNgg && !passthroughMode); if (updateHashFromRs) { - hasher->Update(rsState->usrClipPlaneMask); hasher->Update(rsState->rasterStream); } + hasher->Update(rsState->usrClipPlaneMask); + if (isCacheHash) { hasher->Update(nggState->enableNgg); if (nggState->enableNgg) { diff --git a/tool/update_llpc_test_checks.py b/tool/update_llpc_test_checks.py index 0c65996fb1..b800653262 100755 --- a/tool/update_llpc_test_checks.py +++ b/tool/update_llpc_test_checks.py @@ -2,7 +2,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -24,8 +24,6 @@ # ####################################################################################################################### - - # This script is based on the LLVM Project's update_test_checks.py, which is # licensed under the Apache License v2.0 with LLVM Exceptions; see the file # UpdateTestChecks/LICENSE.txt relative to this directory. It has been heavily diff --git a/tool/vfx/vfxPipelineDoc.cpp b/tool/vfx/vfxPipelineDoc.cpp index e9fcdd5f60..9d1ea16d79 100644 --- a/tool/vfx/vfxPipelineDoc.cpp +++ b/tool/vfx/vfxPipelineDoc.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -139,13 +139,8 @@ VfxPipelineStatePtr PipelineDocument::getDocument() { if (m_sections[SectionTypeVertexInputState].size() > 0) { reinterpret_cast(m_sections[SectionTypeVertexInputState][0])->getSubState(m_vertexInputState); m_pipelineState.gfxPipelineInfo.pVertexInput = &m_vertexInputState; -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 71 - reinterpret_cast(m_sections[SectionTypeVertexInputState][0]) - ->getvbAddressLowBits(m_pipelineState.gfxPipelineInfo.vbAddressLowBits); -#else reinterpret_cast(m_sections[SectionTypeVertexInputState][0]) ->getvbAddressLowBits(m_pipelineState.gfxPipelineInfo.glState.vbAddressLowBits); -#endif } if (m_pipelineState.pipelineType == VfxPipelineTypeGraphics || diff --git a/tool/vfx/vfxPipelineDoc.h b/tool/vfx/vfxPipelineDoc.h index 7643aa685d..7b237c9659 100644 --- a/tool/vfx/vfxPipelineDoc.h +++ b/tool/vfx/vfxPipelineDoc.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -46,13 +46,8 @@ class PipelineDocument : public Document { m_pipelineState.gfxPipelineInfo.options.optimizationLevel = 2; m_pipelineState.compPipelineInfo.options.optimizationLevel = 2; -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 71 - memset(&m_pipelineState.gfxPipelineInfo.vbAddressLowBits, 0, - sizeof(m_pipelineState.gfxPipelineInfo.vbAddressLowBits)); -#else memset(&m_pipelineState.gfxPipelineInfo.glState.vbAddressLowBits, 0, sizeof(m_pipelineState.gfxPipelineInfo.glState.vbAddressLowBits)); -#endif memset(&m_vertexInputState, 0, sizeof(m_vertexInputState)); }; diff --git a/tool/vfx/vfxVkSection.h b/tool/vfx/vfxVkSection.h index de14386acb..48fe19d495 100644 --- a/tool/vfx/vfxVkSection.h +++ b/tool/vfx/vfxVkSection.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -589,25 +589,8 @@ class SectionPipelineOption : public Section { INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, optimizeTessFactor, MemberTypeBool, false); INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enableInterpModePatch, MemberTypeBool, false); INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, pageMigrationEnabled, MemberTypeBool, false); -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 73 - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, replaceSetWithResourceType, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, disableSampleMask, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, buildResourcesDataForShaderModule, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, disableTruncCoordForGather, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enableCombinedTexture, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, vertex64BitsAttribSingleLoc, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enableFragColor, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, disableBaseVertex, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, bindlessTextureMode, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, bindlessImageMode, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enablePolygonStipple, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enableLineSmooth, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, emulateWideLineStipple, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enablePointSmooth, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enableRemapLocation, MemberTypeBool, false); -#else + INIT_MEMBER_NAME_TO_ADDR(SectionPipelineOption, m_glState, MemberTypeGlState, true); -#endif INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, enablePrimGeneratedQuery, MemberTypeBool, false); INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, disablePerCompFetch, MemberTypeBool, false); INIT_STATE_MEMBER_NAME_TO_ADDR(SectionPipelineOption, optimizePointSizeWrite, MemberTypeBool, false); @@ -977,11 +960,7 @@ class SectionGraphicsState : public Section { m_tessLevelOuter[3] = -1.0f; m_clientMetadata = &m_clientMetadataBufMem; m_forceDisableStreamOut = false; -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 71 - m_state.ppUniformMaps = &m_pUniformMaps[0]; -#else m_state.glState.ppUniformMaps = &m_pUniformMaps[0]; -#endif } static StrToMemberAddrArrayRef getAddrTable() { @@ -1039,13 +1018,9 @@ class SectionGraphicsState : public Section { INIT_MEMBER_NAME_TO_ADDR(SectionGraphicsState, m_clientMetadata, MemberTypeU8Array, false); INIT_MEMBER_ARRAY_NAME_TO_ADDR(SectionGraphicsState, m_uniformConstantMaps, MemberTypeUniformConstantMap, Vkgc::ShaderStageGfxCount, true); -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 71 - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionGraphicsState, originUpperLeft, MemberTypeBool, false); - INIT_STATE_MEMBER_NAME_TO_ADDR(SectionGraphicsState, vbAddressLowBitsKnown, MemberTypeBool, false); -#else + INIT_STATE_SUB_MEMBER_NAME_TO_ADDR(SectionGraphicsState, glState, originUpperLeft, MemberTypeBool, false); INIT_STATE_SUB_MEMBER_NAME_TO_ADDR(SectionGraphicsState, glState, vbAddressLowBitsKnown, MemberTypeBool, false); -#endif INIT_MEMBER_NAME_TO_ADDR(SectionGraphicsState, m_forceDisableStreamOut, MemberTypeBool, false); INIT_MEMBER_DYNARRAY_NAME_TO_ADDR(SectionGraphicsState, m_xfbOutInfo, MemberTypeXfbOutInfo, true); INIT_MEMBER_NAME_TO_ADDR(SectionGraphicsState, m_advancedBlendInfo, MemberTypeAdvancedBlendInfo, true); @@ -1068,11 +1043,8 @@ class SectionGraphicsState : public Section { m_advancedBlendInfo.getSubState(m_state.advancedBlendInfo); m_options.getSubState(m_state.options); m_nggState.getSubState(m_state.nggState); -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 71 - auto pGlState = &m_state; -#else + auto pGlState = &m_state.glState; -#endif for (unsigned i = 0; i < Vkgc::ShaderStageGfxCount; i++) { m_uniformConstantMaps[i].getSubState(m_uniformMaps[i]); if (m_uniformMaps[i].numUniformConstants > 0) { diff --git a/util/vkgcUtil.cpp b/util/vkgcUtil.cpp index 8f948b8b13..c4b26d5e43 100644 --- a/util/vkgcUtil.cpp +++ b/util/vkgcUtil.cpp @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -215,7 +215,9 @@ const char *getEntryPointNameFromSpirvBinary(const BinaryData *spvBin) { const unsigned *code = reinterpret_cast(spvBin->pCode); const unsigned *end = code + spvBin->codeSize / sizeof(unsigned); - if (isSpirvBinary(spvBin)) { + const bool isSpvBinary = isSpirvBinary(spvBin); + + if (isSpvBinary) { // Skip SPIR-V header const unsigned *codePos = code + sizeof(SpirvHeader) / sizeof(unsigned); @@ -224,7 +226,7 @@ const char *getEntryPointNameFromSpirvBinary(const BinaryData *spvBin) { unsigned wordCount = (codePos[0] >> WordCountShift); if (wordCount == 0 || codePos + wordCount > end) { - assert("Invalid SPIR-V binary\n"); + assert(wordCount != 0 && codePos + wordCount <= end && "Invalid SPIR-V binary"); break; } @@ -244,11 +246,11 @@ const char *getEntryPointNameFromSpirvBinary(const BinaryData *spvBin) { } if (!entryName) { - assert("Entry-point not found\n"); + assert(entryName && "Entry-point not found"); entryName = ""; } } else { - assert("Invalid SPIR-V binary\n"); + assert(isSpvBinary && "Invalid SPIR-V binary"); entryName = ""; } diff --git a/version/CMakeLists.txt b/version/CMakeLists.txt index 62404537a9..925eb8007c 100644 --- a/version/CMakeLists.txt +++ b/version/CMakeLists.txt @@ -1,7 +1,7 @@ ## ####################################################################################################################### # - # Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved. + # Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -65,61 +65,28 @@ endif() ### Chip-enabling options ############################################################################################## -# Set defaults. This serves two purposes: -# 1. On a driver build, this defines what settings we want to scrape from PAL's settings from branchdefs; the -# default value itself is overridden by PAL's setting. -# 2. On a standalone build, this defines the actual default settings. -set(DEFAULT_LLPC_BUILD +# llpc_set_property sets the given LLPC_* variable to the first of: +# +# - the value it already has (which might be set by driver or developer); +# - the value of the variable whose name has PAL_ instead of LLPC_ (which might be set by driver or developer); +# - the given default. +# +# Then, if the value is true, the function adds it to llpc_version's target_compile_definitions, +# and appends the setting to LLPC_SET_PROPERTY_SUMMARY_llpc_version for us to report the summary. + #if LLPC_BUILD_GFX11 - GFX11=ON -#endif -#if LLPC_BUILD_STRIX1 - STRIX1=ON +### GFX11 device support +llpc_set_property(llpc_version INTERFACE LLPC_BUILD_GFX11 ON "HW_GFX11") #endif + #if LLPC_BUILD_GFX115 - GFX115=ON +### GFX11.5 device support +llpc_set_property(llpc_version INTERFACE LLPC_BUILD_GFX115 ON "HW_GFX115") +#endif +#if LLPC_BUILD_STRIX1 +llpc_set_property(llpc_version INTERFACE LLPC_BUILD_STRIX1 ON "HW_STRIX1") #endif -) - -if (TARGET pal) - # On a driver build, adjust the default settings by scraping the PAL settings (from branchdefs) out of the - # pal target's INTERFACE_COMPILE_DEFINITIONS. (The PAL_* variables are not visible here.) - get_target_property(PALDEFS pal INTERFACE_COMPILE_DEFINITIONS) - list(REMOVE_DUPLICATES PALDEFS) - foreach(PALDEF IN LISTS PALDEFS) - if("${PALDEF}" MATCHES "PAL_BUILD_(.*)=(.*)") - set(DEF "${CMAKE_MATCH_1}") - set(VAL "${CMAKE_MATCH_2}") - # Handle the value being a $ generator expression. - # We rely on the input to the $ being a constant 0,1,OFF,ON,NO,YES - if ("${VAL}" MATCHES "0|OFF|NO|\\$") - set(VAL OFF) - elseif("${VAL}" MATCHES "1|ON|YES") - set(VAL ON) - else() - message(FATAL_ERROR "Unexpected value in PAL_BUILD_${DEF}=${VAL}") - endif() - # Override the entry in DEFAULT_LLPC_BUILD. - list(TRANSFORM DEFAULT_LLPC_BUILD REPLACE "${DEF}=.*" "${DEF}=${VAL}") - endif() - endforeach() -endif() - -# For each define in DEFAULT_LLPC_BUILD, provide a cached option for it (which makes it globally visible, so -# GPURT can see it), and add it to llpc_version's target_compiler_definitions. -set(LLPC_BUILD_SUMMARY "") -foreach(DEFVAL IN LISTS DEFAULT_LLPC_BUILD) - if ("${DEFVAL}" MATCHES "(.*)=(.*)") - set(DEF "${CMAKE_MATCH_1}") - set(VAL "${CMAKE_MATCH_2}") - option("LLPC_BUILD_${DEF}" "LLPC support for this chip?" "${VAL}") - if ("${LLPC_BUILD_${DEF}}") - target_compile_definitions(llpc_version INTERFACE "LLPC_BUILD_${DEF}=1") - set(LLPC_BUILD_SUMMARY "${LLPC_BUILD_SUMMARY} LLPC_BUILD_${DEF}") - endif() - endif() -endforeach() # Report the summary of what is enabled. -message(STATUS "LLPC_BUILD_* summary: ${LLPC_BUILD_SUMMARY}") +message(STATUS "llpc_version:${LLPC_SET_PROPERTY_SUMMARY_llpc_version}") diff --git a/version/include/llpc/GpurtIntrinsics.h b/version/include/llpc/GpurtIntrinsics.h index 8d451867c2..0bb6cfe9c7 100644 --- a/version/include/llpc/GpurtIntrinsics.h +++ b/version/include/llpc/GpurtIntrinsics.h @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -62,9 +62,6 @@ #endif #endif -#define PASS_DUMMY_RET_ADDR 1 -#define PASS_SHADER_INDEX_ARG 1 - //===================================================================================================================== // Continuation intrinsics // diff --git a/version/include/llpcVersion.h.in b/version/include/llpcVersion.h.in index 4979d9b48c..b2d98d025a 100644 --- a/version/include/llpcVersion.h.in +++ b/version/include/llpcVersion.h.in @@ -1,7 +1,7 @@ /* *********************************************************************************************************************** * - * Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -37,6 +37,7 @@ // %Version History // | %Version | Change Description | // | -------- | ----------------------------------------------------------------------------------------------------- | +// | 75.10| Add temporalHintShaderControl to PipelineShaderOptions | // | 75.9 | Add rtIgnoreDeclaredPayloadSize to RayTracingPipelineBuildInfo. | // | 75.8 | Add forceMemoryBarrierScope to PipelineShaderOptions. | // | 75.6 | Add enableRemapLocation to PipelineOptions. Add outLocationMaps to GraphicsPipelineBuildInfo. | @@ -200,7 +201,7 @@ #define LLPC_INTERFACE_MAJOR_VERSION 75 /// LLPC minor interface version. -#define LLPC_INTERFACE_MINOR_VERSION 9 +#define LLPC_INTERFACE_MINOR_VERSION 10 /// The client's LLPC major interface version #ifndef LLPC_CLIENT_INTERFACE_MAJOR_VERSION