diff --git a/llvm/lib/Target/DirectX/DXILShaderFlags.cpp b/llvm/lib/Target/DirectX/DXILShaderFlags.cpp index 5df9ed518436f8..3cea08b7ae18e5 100644 --- a/llvm/lib/Target/DirectX/DXILShaderFlags.cpp +++ b/llvm/lib/Target/DirectX/DXILShaderFlags.cpp @@ -69,16 +69,6 @@ static void updateResourceFlags(ComputedShaderFlags &Flags, Module &M, break; } } - - if (Flags.EnableRawAndStructuredBuffers) { - const dxil::ModuleMetadataInfo &MMDI = - AM->getResult(M); - VersionTuple SM = MMDI.ShaderModelVersion; - Triple::EnvironmentType SP = MMDI.ShaderProfile; - - Flags.ComputeShadersPlusRawAndStructuredBuffers = - (SP == Triple::EnvironmentType::Compute && SM.getMajor() == 4); - } } ComputedShaderFlags diff --git a/llvm/test/CodeGen/DirectX/ShaderFlags/buffer_cs4.ll b/llvm/test/CodeGen/DirectX/ShaderFlags/buffer_cs4.ll deleted file mode 100644 index 574dd652f4e890..00000000000000 --- a/llvm/test/CodeGen/DirectX/ShaderFlags/buffer_cs4.ll +++ /dev/null @@ -1,24 +0,0 @@ -; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s - -target triple = "dxil-pc-shadermodel4.0-compute" - -@G = external constant <4 x float>, align 4 - -define void @test_bufferflags() { - - ; ByteAddressBuffer Buf : register(t8, space1) - %srv0 = call target("dx.RawBuffer", i8, 0, 0) - @llvm.dx.handle.fromBinding.tdx.RawBuffer_i8_0_0t( - i32 1, i32 8, i32 1, i32 0, i1 false) - - ret void -} - -attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) } - -; CHECK: ; Shader Flags Value: 0x00020010 -; CHECK: ; Note: shader requires additional functionality: -; CHECK-NEXT: ; Raw and Structured buffers -; CHECK-NEXT: ; Note: extra DXIL module flags: -; CHECK-NEXT: ; D3D11_SB_GLOBAL_FLAG_ENABLE_RAW_AND_STRUCTURED_BUFFERS -; CHECK-NEXT: {{^;$}}