[llvm] 607be38 - [DX] Fix missing preserved analysis
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 19 10:11:09 PDT 2022
Author: Chris Bieneman
Date: 2022-10-19T12:11:03-05:00
New Revision: 607be386e7ee1d11a58fe68bf9336de2b2fb9fde
URL: https://github.com/llvm/llvm-project/commit/607be386e7ee1d11a58fe68bf9336de2b2fb9fde
DIFF: https://github.com/llvm/llvm-project/commit/607be386e7ee1d11a58fe68bf9336de2b2fb9fde.diff
LOG: [DX] Fix missing preserved analysis
The ShaderFlagsAnalysisWrapper needs to be marked to preserve all
analyssis.
Fixes #58474 (https://github.com/llvm/llvm-project/issues/58474)
Added:
Modified:
llvm/lib/Target/DirectX/DXILShaderFlags.h
llvm/test/CodeGen/DirectX/UAVMetadata.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/DirectX/DXILShaderFlags.h b/llvm/lib/Target/DirectX/DXILShaderFlags.h
index 216d8a3f1f9e3..4f51873a2d0b3 100644
--- a/llvm/lib/Target/DirectX/DXILShaderFlags.h
+++ b/llvm/lib/Target/DirectX/DXILShaderFlags.h
@@ -91,6 +91,10 @@ class ShaderFlagsAnalysisWrapper : public ModulePass {
Flags = ComputedShaderFlags::computeFlags(M);
return false;
}
+
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
+ AU.setPreservesAll();
+ }
};
} // namespace dxil
diff --git a/llvm/test/CodeGen/DirectX/UAVMetadata.ll b/llvm/test/CodeGen/DirectX/UAVMetadata.ll
index 4fd3f5e2ad7ac..c51358790710a 100644
--- a/llvm/test/CodeGen/DirectX/UAVMetadata.ll
+++ b/llvm/test/CodeGen/DirectX/UAVMetadata.ll
@@ -1,7 +1,6 @@
; RUN: opt -S -dxil-metadata-emit < %s | FileCheck %s
; RUN: opt -S --passes="print-dxil-resource" < %s 2>&1 | FileCheck %s --check-prefix=PRINT
-; FIX-ME: llc %s --filetype=asm -o - < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,PRINT
-; See: https://github.com/llvm/llvm-project/issues/58474
+; 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"
target triple = "dxil-pc-shadermodel6.0-compute"
More information about the llvm-commits
mailing list