[PATCH] D127166: [DirectX] Add DirectX target object writer

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 10:13:49 PDT 2022


beanz added inline comments.


================
Comment at: llvm/test/CodeGen/DirectX/embed-dxil.ll:3
 ; RUN: opt %s -dxil-embed -S -o - | FileCheck %s
-target triple = "dxil-unknown-unknown"
+; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC
+target triple = "dxil-unknown-shadermodel6.5-compute"
----------------
python3kgae wrote:
> Is it possible to extract the dxil part out of the container and run dxil-dis to test the output dxil?
There are a few reasons _not_ to use dxil-dis here.

First and foremost, this test is testing the structure of the generated DXContainer file, not the dxil encoding itself. In that regard dxil-dis doesn't help because while it can extract the bitcode from a DXContainer, it doesn't actually dump any of the structural information about the container itself (which is what is important here).

Additionally dxil-dis is an optional external dependency. Tests that rely on dxil-dis only run if you have dxil-dis available, and I don't expect most LLVM developers will have dxil-dis available. Maximizing test coverage while not depending on external dependencies is a big win.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127166/new/

https://reviews.llvm.org/D127166



More information about the llvm-commits mailing list