llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-backend-directx Author: Justin Bogner (bogner) <details> <summary>Changes</summary> This wires up dxil-op-lower, dxil-intrinsic-expansion, dxil-translate-metadata, and dxil-pretty-printer to the new pass manager, both as a matter of future proofing the backend and so that they can be used more flexibly in tests. A few arbitrary tests are updated in order to test the new PM path, and we drop the "print-dxil-resource-md" pass since it's redundant with the pretty printer. --- Patch is 20.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/104250.diff 16 Files Affected: - (modified) llvm/lib/Target/DirectX/DXILOpLowering.cpp (+7-16) - (added) llvm/lib/Target/DirectX/DXILOpLowering.h (+27) - (modified) llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp (+25-17) - (added) llvm/lib/Target/DirectX/DXILPrettyPrinter.h (+33) - (modified) llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp (+42-30) - (added) llvm/lib/Target/DirectX/DXILTranslateMetadata.h (+24) - (modified) llvm/lib/Target/DirectX/DirectX.h (+4-4) - (modified) llvm/lib/Target/DirectX/DirectXPassRegistry.def (+4-1) - (modified) llvm/lib/Target/DirectX/DirectXTargetMachine.cpp (+7-3) - (modified) llvm/test/Analysis/DXILResource/buffer-frombinding.ll (+3-3) - (modified) llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.0.ll (+1-1) - (modified) llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.8.ll (+1-1) - (modified) llvm/test/CodeGen/DirectX/UAVMetadata.ll (+1-1) - (modified) llvm/test/CodeGen/DirectX/any.ll (+1-1) - (modified) llvm/test/CodeGen/DirectX/cbuf.ll (+1-1) - (modified) llvm/test/CodeGen/DirectX/floor.ll (+1-1) ``````````diff diff --git a/llvm/lib/Target/DirectX/DXILOpLowering.cpp b/llvm/lib/Target/DirectX/DXILOpLowering.cpp index e458720fcd6e9f..fb708a61dd318d 100644 --- a/llvm/lib/Target/DirectX/DXILOpLowering.cpp +++ b/llvm/lib/Target/DirectX/DXILOpLowering.cpp @@ -1,15 +1,12 @@ -//===- DXILOpLower.cpp - Lowering LLVM intrinsic to DIXLOp function -------===// +//===- DXILOpLowering.cpp - Lowering to DXIL operations -------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -/// -/// \file This file contains passes and utilities to lower llvm intrinsic call -/// to DXILOp function call. -//===----------------------------------------------------------------------===// +#include "DXILOpLowering.h" #include "DXILConstants.h" #include "DXILIntrinsicExpansion.h" #include "DXILOpBuilder.h" @@ -145,17 +142,11 @@ class OpLowerer { }; } // namespace -namespace { -/// A pass that transforms external global definitions into declarations. -class DXILOpLowering : public PassInfoMixin<DXILOpLowering> { -public: - PreservedAnalyses run(Module &M, ModuleAnalysisManager &) { - if (OpLowerer(M).lowerIntrinsics()) - return PreservedAnalyses::none(); - return PreservedAnalyses::all(); - } -}; -} // namespace +PreservedAnalyses DXILOpLowering::run(Module &M, ModuleAnalysisManager &) { + if (OpLowerer(M).lowerIntrinsics()) + return PreservedAnalyses::none(); + return PreservedAnalyses::all(); +} namespace { class DXILOpLoweringLegacy : public ModulePass { diff --git a/llvm/lib/Target/DirectX/DXILOpLowering.h b/llvm/lib/Target/DirectX/DXILOpLowering.h new file mode 100644 index 00000000000000..fe357da7bb9050 --- /dev/null +++ b/llvm/lib/Target/DirectX/DXILOpLowering.h @@ -0,0 +1,27 @@ +//===- DXILOpLowering.h - Lowering to DXIL operations -----------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// \file Pass for lowering llvm intrinsics into DXIL operations. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_TARGET_DIRECTX_DXILOPLOWERING_H +#define LLVM_LIB_TARGET_DIRECTX_DXILOPLOWERING_H + +#include "llvm/IR/PassManager.h" + +namespace llvm { + +class DXILOpLowering : public PassInfoMixin<DXILOpLowering> { +public: + PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM); +}; + +} // namespace llvm + +#endif // LLVM_LIB_TARGET_DIRECTX_DXILOPLOWERING_H diff --git a/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp b/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp index 99cc4067b1d62d..7d2abb7078b8ac 100644 --- a/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp +++ b/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp @@ -1,16 +1,12 @@ -//===- DXILPrettyPrinter.cpp - DXIL Resource helper objects ---------------===// +//===- DXILPrettyPrinter.cpp - Print resources for textual DXIL -----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -/// -/// \file This file contains a pass for pretty printing DXIL metadata into IR -/// comments when printing assembly output. -/// -//===----------------------------------------------------------------------===// +#include "DXILPrettyPrinter.h" #include "DXILResourceAnalysis.h" #include "DirectX.h" #include "llvm/ADT/StringRef.h" @@ -20,18 +16,30 @@ using namespace llvm; +static void prettyPrintResources(raw_ostream &OS, + const dxil::Resources &MDResources) { + MDResources.print(OS); +} + +PreservedAnalyses DXILPrettyPrinterPass::run(Module &M, + ModuleAnalysisManager &MAM) { + const dxil::Resources &MDResources = MAM.getResult<DXILResourceMDAnalysis>(M); + prettyPrintResources(OS, MDResources); + return PreservedAnalyses::all(); +} + namespace { -class DXILPrettyPrinter : public llvm::ModulePass { +class DXILPrettyPrinterLegacy : public llvm::ModulePass { raw_ostream &OS; // raw_ostream to print to. public: static char ID; - DXILPrettyPrinter() : ModulePass(ID), OS(dbgs()) { - initializeDXILPrettyPrinterPass(*PassRegistry::getPassRegistry()); + DXILPrettyPrinterLegacy() : ModulePass(ID), OS(dbgs()) { + initializeDXILPrettyPrinterLegacyPass(*PassRegistry::getPassRegistry()); } - explicit DXILPrettyPrinter(raw_ostream &O) : ModulePass(ID), OS(O) { - initializeDXILPrettyPrinterPass(*PassRegistry::getPassRegistry()); + explicit DXILPrettyPrinterLegacy(raw_ostream &O) : ModulePass(ID), OS(O) { + initializeDXILPrettyPrinterLegacyPass(*PassRegistry::getPassRegistry()); } StringRef getPassName() const override { @@ -46,19 +54,19 @@ class DXILPrettyPrinter : public llvm::ModulePass { }; } // namespace -char DXILPrettyPrinter::ID = 0; -INITIALIZE_PASS_BEGIN(DXILPrettyPrinter, "dxil-pretty-printer", +char DXILPrettyPrinterLegacy::ID = 0; +INITIALIZE_PASS_BEGIN(DXILPrettyPrinterLegacy, "dxil-pretty-printer", "DXIL Metadata Pretty Printer", true, true) INITIALIZE_PASS_DEPENDENCY(DXILResourceMDWrapper) -INITIALIZE_PASS_END(DXILPrettyPrinter, "dxil-pretty-printer", +INITIALIZE_PASS_END(DXILPrettyPrinterLegacy, "dxil-pretty-printer", "DXIL Metadata Pretty Printer", true, true) -bool DXILPrettyPrinter::runOnModule(Module &M) { +bool DXILPrettyPrinterLegacy::runOnModule(Module &M) { dxil::Resources &Res = getAnalysis<DXILResourceMDWrapper>().getDXILResource(); Res.print(OS); return false; } -ModulePass *llvm::createDXILPrettyPrinterPass(raw_ostream &OS) { - return new DXILPrettyPrinter(OS); +ModulePass *llvm::createDXILPrettyPrinterLegacyPass(raw_ostream &OS) { + return new DXILPrettyPrinterLegacy(OS); } diff --git a/llvm/lib/Target/DirectX/DXILPrettyPrinter.h b/llvm/lib/Target/DirectX/DXILPrettyPrinter.h new file mode 100644 index 00000000000000..84e17ac0f2ec62 --- /dev/null +++ b/llvm/lib/Target/DirectX/DXILPrettyPrinter.h @@ -0,0 +1,33 @@ +//===- DXILPrettyPrinter.h - Print resources for textual DXIL ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// \file This file contains a pass for pretty printing DXIL metadata into IR +// comments when printing assembly output. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TARGET_DIRECTX_DXILPRETTYPRINTER_H +#define LLVM_TARGET_DIRECTX_DXILPRETTYPRINTER_H + +#include "llvm/IR/PassManager.h" + +namespace llvm { + +/// A pass that prints resources in a format suitable for textual DXIL. +class DXILPrettyPrinterPass : public PassInfoMixin<DXILPrettyPrinterPass> { + raw_ostream &OS; + +public: + explicit DXILPrettyPrinterPass(raw_ostream &OS) : OS(OS) {} + + PreservedAnalyses run(Module &M, ModuleAnalysisManager &); +}; + +} // namespace llvm + +#endif // LLVM_TARGET_DIRECTX_DXILPRETTYPRINTER_H diff --git a/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp b/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp index 21089a232783a5..55b3d945684260 100644 --- a/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp +++ b/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp @@ -1,13 +1,12 @@ -//===- DXILTranslateMetadata.cpp - Pass to emit DXIL metadata ---*- C++ -*-===// +//===- DXILTranslateMetadata.cpp - Pass to emit DXIL metadata -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -/// -//===----------------------------------------------------------------------===// +#include "DXILTranslateMetadata.h" #include "DXILMetadata.h" #include "DXILResource.h" #include "DXILResourceAnalysis.h" @@ -23,11 +22,35 @@ using namespace llvm; using namespace llvm::dxil; +static void translateMetadata(Module &M, const dxil::Resources &MDResources, + const ComputedShaderFlags &ShaderFlags) { + dxil::ValidatorVersionMD ValVerMD(M); + if (ValVerMD.isEmpty()) + ValVerMD.update(VersionTuple(1, 0)); + dxil::createShaderModelMD(M); + dxil::createDXILVersionMD(M); + + MDResources.write(M); + + dxil::createEntryMD(M, static_cast<uint64_t>(ShaderFlags)); +} + +PreservedAnalyses DXILTranslateMetadata::run(Module &M, + ModuleAnalysisManager &MAM) { + const dxil::Resources &MDResources = MAM.getResult<DXILResourceMDAnalysis>(M); + const ComputedShaderFlags &ShaderFlags = + MAM.getResult<ShaderFlagsAnalysis>(M); + + translateMetadata(M, MDResources, ShaderFlags); + + return PreservedAnalyses::all(); +} + namespace { -class DXILTranslateMetadata : public ModulePass { +class DXILTranslateMetadataLegacy : public ModulePass { public: static char ID; // Pass identification, replacement for typeid - explicit DXILTranslateMetadata() : ModulePass(ID) {} + explicit DXILTranslateMetadataLegacy() : ModulePass(ID) {} StringRef getPassName() const override { return "DXIL Translate Metadata"; } @@ -37,39 +60,28 @@ class DXILTranslateMetadata : public ModulePass { AU.addRequired<ShaderFlagsAnalysisWrapper>(); } - bool runOnModule(Module &M) override; + bool runOnModule(Module &M) override { + const dxil::Resources &MDResources = + getAnalysis<DXILResourceMDWrapper>().getDXILResource(); + const ComputedShaderFlags &ShaderFlags = + getAnalysis<ShaderFlagsAnalysisWrapper>().getShaderFlags(); + + translateMetadata(M, MDResources, ShaderFlags); + return true; + } }; } // namespace -bool DXILTranslateMetadata::runOnModule(Module &M) { - - dxil::ValidatorVersionMD ValVerMD(M); - if (ValVerMD.isEmpty()) - ValVerMD.update(VersionTuple(1, 0)); - dxil::createShaderModelMD(M); - dxil::createDXILVersionMD(M); - - const dxil::Resources &Res = - getAnalysis<DXILResourceMDWrapper>().getDXILResource(); - Res.write(M); - - const uint64_t Flags = static_cast<uint64_t>( - getAnalysis<ShaderFlagsAnalysisWrapper>().getShaderFlags()); - dxil::createEntryMD(M, Flags); - - return false; -} - -char DXILTranslateMetadata::ID = 0; +char DXILTranslateMetadataLegacy::ID = 0; -ModulePass *llvm::createDXILTranslateMetadataPass() { - return new DXILTranslateMetadata(); +ModulePass *llvm::createDXILTranslateMetadataLegacyPass() { + return new DXILTranslateMetadataLegacy(); } -INITIALIZE_PASS_BEGIN(DXILTranslateMetadata, "dxil-translate-metadata", +INITIALIZE_PASS_BEGIN(DXILTranslateMetadataLegacy, "dxil-translate-metadata", "DXIL Translate Metadata", false, false) INITIALIZE_PASS_DEPENDENCY(DXILResourceMDWrapper) INITIALIZE_PASS_DEPENDENCY(ShaderFlagsAnalysisWrapper) -INITIALIZE_PASS_END(DXILTranslateMetadata, "dxil-translate-metadata", +INITIALIZE_PASS_END(DXILTranslateMetadataLegacy, "dxil-translate-metadata", "DXIL Translate Metadata", false, false) diff --git a/llvm/lib/Target/DirectX/DXILTranslateMetadata.h b/llvm/lib/Target/DirectX/DXILTranslateMetadata.h new file mode 100644 index 00000000000000..f3f5eb19014060 --- /dev/null +++ b/llvm/lib/Target/DirectX/DXILTranslateMetadata.h @@ -0,0 +1,24 @@ +//===- DXILTranslateMetadata.h - Pass to emit DXIL metadata -----*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TARGET_DIRECTX_DXILTRANSLATEMETADATA_H +#define LLVM_TARGET_DIRECTX_DXILTRANSLATEMETADATA_H + +#include "llvm/IR/PassManager.h" + +namespace llvm { + +/// A pass that transforms DXIL Intrinsics that don't have DXIL opCodes +class DXILTranslateMetadata : public PassInfoMixin<DXILTranslateMetadata> { +public: + PreservedAnalyses run(Module &M, ModuleAnalysisManager &); +}; + +} // namespace llvm + +#endif // LLVM_TARGET_DIRECTX_DXILTRANSLATEMETADATA_H diff --git a/llvm/lib/Target/DirectX/DirectX.h b/llvm/lib/Target/DirectX/DirectX.h index d056ae2bc488e7..963c39ace3af9c 100644 --- a/llvm/lib/Target/DirectX/DirectX.h +++ b/llvm/lib/Target/DirectX/DirectX.h @@ -41,19 +41,19 @@ void initializeDXILOpLoweringLegacyPass(PassRegistry &); ModulePass *createDXILOpLoweringLegacyPass(); /// Initializer for DXILTranslateMetadata. -void initializeDXILTranslateMetadataPass(PassRegistry &); +void initializeDXILTranslateMetadataLegacyPass(PassRegistry &); /// Pass to emit metadata for DXIL. -ModulePass *createDXILTranslateMetadataPass(); +ModulePass *createDXILTranslateMetadataLegacyPass(); /// Initializer for DXILTranslateMetadata. void initializeDXILResourceMDWrapperPass(PassRegistry &); /// Pass to pretty print DXIL metadata. -ModulePass *createDXILPrettyPrinterPass(raw_ostream &OS); +ModulePass *createDXILPrettyPrinterLegacyPass(raw_ostream &OS); /// Initializer for DXILPrettyPrinter. -void initializeDXILPrettyPrinterPass(PassRegistry &); +void initializeDXILPrettyPrinterLegacyPass(PassRegistry &); /// Initializer for dxil::ShaderFlagsAnalysisWrapper pass. void initializeShaderFlagsAnalysisWrapperPass(PassRegistry &); diff --git a/llvm/lib/Target/DirectX/DirectXPassRegistry.def b/llvm/lib/Target/DirectX/DirectXPassRegistry.def index 7544172ab94e43..a3e051b173d890 100644 --- a/llvm/lib/Target/DirectX/DirectXPassRegistry.def +++ b/llvm/lib/Target/DirectX/DirectXPassRegistry.def @@ -23,7 +23,10 @@ MODULE_ANALYSIS("dxil-resource-md", DXILResourceMDAnalysis()) #ifndef MODULE_PASS #define MODULE_PASS(NAME, CREATE_PASS) #endif +MODULE_PASS("dxil-intrinsic-expansion", DXILIntrinsicExpansion()) +MODULE_PASS("dxil-op-lower", DXILOpLowering()) +MODULE_PASS("dxil-pretty-printer", DXILPrettyPrinterPass(dbgs())) +MODULE_PASS("dxil-translate-metadata", DXILTranslateMetadata()) // TODO: rename to print<foo> after NPM switch MODULE_PASS("print-dx-shader-flags", dxil::ShaderFlagsAnalysisPrinter(dbgs())) -MODULE_PASS("print-dxil-resource-md", DXILResourceMDPrinterPass(dbgs())) #undef MODULE_PASS diff --git a/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp b/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp index 92bd69b69684f0..a578ad1452560c 100644 --- a/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp +++ b/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp @@ -12,8 +12,12 @@ //===----------------------------------------------------------------------===// #include "DirectXTargetMachine.h" +#include "DXILIntrinsicExpansion.h" +#include "DXILOpLowering.h" +#include "DXILPrettyPrinter.h" #include "DXILResourceAnalysis.h" #include "DXILShaderFlags.h" +#include "DXILTranslateMetadata.h" #include "DXILWriter/DXILWriterPass.h" #include "DirectX.h" #include "DirectXSubtarget.h" @@ -45,7 +49,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTarget() { initializeWriteDXILPassPass(*PR); initializeDXContainerGlobalsPass(*PR); initializeDXILOpLoweringLegacyPass(*PR); - initializeDXILTranslateMetadataPass(*PR); + initializeDXILTranslateMetadataLegacyPass(*PR); initializeDXILResourceMDWrapperPass(*PR); initializeShaderFlagsAnalysisWrapperPass(*PR); } @@ -79,7 +83,7 @@ class DirectXPassConfig : public TargetPassConfig { void addCodeGenPrepare() override { addPass(createDXILIntrinsicExpansionLegacyPass()); addPass(createDXILOpLoweringLegacyPass()); - addPass(createDXILTranslateMetadataPass()); + addPass(createDXILTranslateMetadataLegacyPass()); addPass(createDXILPrepareModulePass()); } }; @@ -116,7 +120,7 @@ bool DirectXTargetMachine::addPassesToEmitFile( switch (FileType) { case CodeGenFileType::AssemblyFile: - PM.add(createDXILPrettyPrinterPass(Out)); + PM.add(createDXILPrettyPrinterLegacyPass(Out)); PM.add(createPrintModulePass(Out, "", true)); break; case CodeGenFileType::ObjectFile: diff --git a/llvm/test/Analysis/DXILResource/buffer-frombinding.ll b/llvm/test/Analysis/DXILResource/buffer-frombinding.ll index 4349adb8ef8ebb..65802c6d1ff87a 100644 --- a/llvm/test/Analysis/DXILResource/buffer-frombinding.ll +++ b/llvm/test/Analysis/DXILResource/buffer-frombinding.ll @@ -46,14 +46,14 @@ define void @test_typedbuffer() { ; Buffer<uint4> Buf[24] : register(t3, space5) %typed2 = call target("dx.TypedBuffer", <4 x i32>, 0, 0, 0) @llvm.dx.handle.fromBinding.tdx.TypedBuffer_i32_0_0t( - i32 2, i32 7, i32 24, i32 0, i1 false) + i32 5, i32 3, i32 24, i32 0, i1 false) ; CHECK: Binding for %typed2 ; CHECK: Symbol: ptr undef ; CHECK: Name: "" ; CHECK: Binding: ; CHECK: Record ID: 0 - ; CHECK: Space: 2 - ; CHECK: Lower Bound: 7 + ; CHECK: Space: 5 + ; CHECK: Lower Bound: 3 ; CHECK: Size: 24 ; CHECK: Class: SRV ; CHECK: Kind: TypedBuffer diff --git a/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.0.ll b/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.0.ll index 318d5a6210eeea..fb31833dd5139e 100644 --- a/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.0.ll +++ b/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.0.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -dxil-translate-metadata %s | FileCheck %s +; RUN: opt -S -passes=dxil-translate-metadata %s | FileCheck %s ; RUN: opt -S -passes="print<dxil-metadata>" -disable-output %s 2>&1 | FileCheck %s --check-prefix=ANALYSIS target triple = "dxil-pc-shadermodel6.0-vertex" diff --git a/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.8.ll b/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.8.ll index fb54fa916f33f9..5944acc3b5b4b9 100644 --- a/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.8.ll +++ b/llvm/test/CodeGen/DirectX/Metadata/dxilVer-1.8.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -dxil-translate-metadata %s | FileCheck %s +; RUN: opt -S -passes=dxil-translate-metadata %s | FileCheck %s ; RUN: opt -S -passes="print<dxil-metadata>" -disable-output %s 2>&1 | FileCheck %s --check-prefix=ANALYSIS target triple = "dxil-pc-shadermodel6.8-compute" diff --git a/llvm/test/CodeGen/DirectX/UAVMetadata.ll b/llvm/test/CodeGen/DirectX/UAVMetadata.ll index b10112a044df58..2c242ec08eda52 100644 --- a/llvm/test/CodeGen/DirectX/UAVMetadata.ll +++ b/llvm/test/CodeGen/DirectX/UAVMetadata.ll @@ -1,5 +1,5 @@ ; RUN: opt -S -dxil-translate-metadata < %s | FileCheck %s -; RUN: opt -S --passes="print-dxil-resource-md" < %s 2>&1 | FileCheck %s --check-prefix=PRINT +; RUN: opt -S --passes="dxil-pretty-printer" < %s 2>&1 | FileCheck %s --check-prefix=PRINT ; RUN: llc %s --filetype=asm -o - < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,PRINT target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" diff --git a/llvm/test/CodeGen/DirectX/any.ll b/llvm/test/CodeGen/DirectX/any.ll index ceb8077af311dc..e32aa389a81a55 100644 --- a/llvm/test/CodeGen/DirectX/any.ll +++ b/llvm/test/CodeGen/DirectX/any.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.0-library < %s | FileCheck %s +; RUN: opt -S -passes=dxil-intrinsic-expansion,dxil-op-lower -mtriple=dxil-pc-shadermodel6.0-library < %s | FileCheck %s ; Make sure dxil operation function calls for any are generated for float and half. diff --git a/llvm/test/CodeGen/DirectX/cbuf.ll b/llvm/test/CodeGen/DirectX/cbuf.ll index e31a659728fcf2..7589da5e15bd7c 100644 --- a/llvm/test/CodeGen/DirectX/cbuf.ll +++ b/llvm/test/CodeGen/DirectX/cbuf.ll @@ -1,5 +1,5 @@ ; RUN: opt -S -dxil-translate-metadata < %s | FileCheck %s --check-prefix=DXILMD -; RUN: opt -S --passes="print-dxil-res... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/104250 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits