================ @@ -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) { ---------------- dmpots wrote:
Do we need such complicated functions for this test? Does the body matter here or is it really just the internal/external properties that matter. In my opinion, the function body is distracting from the essence of the test here. 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