================ @@ -0,0 +1,93 @@ +// RUN: %clang_cc1 -x hlsl -triple dxil-pc-shadermodel6.3-library -finclude-default-header %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s +// RUN: %clang_cc1 -x hlsl -triple dxil-pc-shadermodel6.0-compute -finclude-default-header %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s + +// Verify that a few different function types all get the NoRecurse attribute + +#define MAX 100 + +struct Node { + uint value; + uint key; + uint left, right; +}; + +// CHECK: Function Attrs:{{.*}}norecurse +// CHECK: define noundef i32 @"?Find@@YAIY0GE@UNode@@I@Z"(ptr noundef byval([100 x %struct.Node]) align 4 %SortedTree, i32 noundef %key) [[IntAttr:\#[0-9]+]] +// CHECK: ret i32 +// Find and return value corresponding to key in the SortedTree +uint Find(Node SortedTree[MAX], uint key) { ---------------- pow2clk wrote:
Probably not. I admit I got carried away, but in the process I discovered the constraints of the current implementation and potentially introduced some incidentals that might catch future issues by creating a more representative shader. I realize that philosophies might differ here, but I'm reluctant to change it. https://github.com/llvm/llvm-project/pull/105907 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits