================
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm 
-disable-llvm-passes -o - %s | FileCheck %s
+
+void foo(__hlsl_resource_t res);
+
+// CHECK: define void 
@"?bar@@YAXU__hlsl_resource_t@@@Z"(target("dx.TypedBuffer", <4 x float>, 1, 0, 
1) %a)
+// CHECK: call void 
@"?foo@@YAXU__hlsl_resource_t@@@Z"(target("dx.TypedBuffer", <4 x float>, 1, 0, 
1) %0)
----------------
bogner wrote:

Best not to rely on the names of SSA values in tests (`%a` and `%0`). It's 
probably fine to just leave the name out of these checks. 

OTOH, if we run this pass with `-O1` instead of `-disable-llvm-passes` so we 
get some basic function simplification we could capture the argument name in 
the first check and see that it's forwarded on in the second. This wouldn't 
work right now since we have a bunch of stack related noise in the output IR.

https://github.com/llvm/llvm-project/pull/104856
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to