diff --git a/llvm/lib/MC/MCDXContainerWriter.cpp b/llvm/lib/MC/MCDXContainerWriter.cpp index ddccc100967d47..028bfe6e79a121 100644 --- a/llvm/lib/MC/MCDXContainerWriter.cpp +++ b/llvm/lib/MC/MCDXContainerWriter.cpp @@ -104,7 +104,7 @@ uint64_t DXContainerObjectWriter::writeObject(MCAssembler &Asm, // Write section header. W.write(ArrayRef(Sec.getName().data(), 4)); - uint64_t PartSize = SectionSize + sizeof(dxbc::PartHeader); + uint64_t PartSize = SectionSize; if (Sec.getName() == "DXIL") PartSize += sizeof(dxbc::ProgramHeader); diff --git a/llvm/test/CodeGen/DirectX/ContainerData/DebugShaderHash.ll b/llvm/test/CodeGen/DirectX/ContainerData/DebugShaderHash.ll index 8e69242be771cf..26788260475eef 100644 --- a/llvm/test/CodeGen/DirectX/ContainerData/DebugShaderHash.ll +++ b/llvm/test/CodeGen/DirectX/ContainerData/DebugShaderHash.ll @@ -19,7 +19,7 @@ define i32 @add(i32 %a, i32 %b) { !4 = !{i32 2, !"Debug Info Version", i32 3} ; DXC: - Name: HASH -; DXC: Size: 28 +; DXC: Size: 20 ; DXC: Hash: ; DXC: IncludesSource: true ; DXC: Digest: [ diff --git a/llvm/test/CodeGen/DirectX/ContainerData/ShaderHash.ll b/llvm/test/CodeGen/DirectX/ContainerData/ShaderHash.ll index 327d3557dede57..02008722b8a53a 100644 --- a/llvm/test/CodeGen/DirectX/ContainerData/ShaderHash.ll +++ b/llvm/test/CodeGen/DirectX/ContainerData/ShaderHash.ll @@ -10,7 +10,7 @@ define i32 @add(i32 %a, i32 %b) { } ; DXC: - Name: HASH -; DXC: Size: 28 +; DXC: Size: 20 ; DXC: Hash: ; DXC: IncludesSource: false ; DXC: Digest: [ diff --git a/llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll b/llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll index 26487ca2a71159..865fefeac335dd 100644 --- a/llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll +++ b/llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll @@ -15,7 +15,7 @@ define double @div(double %a, double %b) { ; DXC: - Name: SFI0 -; DXC-NEXT: Size: 16 +; DXC-NEXT: Size: 8 ; DXC-NEXT: Flags: ; DXC-NEXT: Doubles: true ; DXC-NOT: {{[A-Za-z]+: +true}} diff --git a/llvm/test/CodeGen/DirectX/ShaderFlags/doubles.ll b/llvm/test/CodeGen/DirectX/ShaderFlags/doubles.ll index 95320dd495d491..f90db61661f09f 100644 --- a/llvm/test/CodeGen/DirectX/ShaderFlags/doubles.ll +++ b/llvm/test/CodeGen/DirectX/ShaderFlags/doubles.ll @@ -13,7 +13,7 @@ define double @add(double %a, double %b) { } ; DXC: - Name: SFI0 -; DXC-NEXT: Size: 16 +; DXC-NEXT: Size: 8 ; DXC-NEXT: Flags: ; DXC-NEXT: Doubles: true ; DXC-NOT: {{[A-Za-z]+: +true}} diff --git a/llvm/test/CodeGen/DirectX/embed-dxil.ll b/llvm/test/CodeGen/DirectX/embed-dxil.ll index bea6f60f785627..b9a3e8ccd0719b 100644 --- a/llvm/test/CodeGen/DirectX/embed-dxil.ll +++ b/llvm/test/CodeGen/DirectX/embed-dxil.ll @@ -42,11 +42,11 @@ define i32 @add(i32 %a, i32 %b) { ; DXC-NEXT: MajorVersion: 6 ; DXC-NEXT: MinorVersion: 5 ; DXC-NEXT: ShaderKind: 6 -; DXC-NEXT: Size: [[#div(SIZE,4) - 2]] +; DXC-NEXT: Size: [[#div(SIZE,4)]] ; DXC-NEXT: DXILMajorVersion: [[#]] ; DXC-NEXT: DXILMinorVersion: [[#]] -; DXC-NEXT: DXILSize: [[#SIZE - 32]] +; DXC-NEXT: DXILSize: [[#SIZE - 24]] ; DXC-NEXT: DXIL: [ 0x42, 0x43, 0xC0, 0xDE, ; DXC: - Name: SFI0 -; DXC-NEXT: Size: 16 +; DXC-NEXT: Size: 8 ; DXC-NOT: Flags: