Skip to content

[HLSL] update StructuredBuffer subscript test for alwaysinline #109023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

pow2clk
Copy link
Contributor

@pow2clk pow2clk commented Sep 17, 2024

The Alwaysinline change made the mangled form of entry points get removed. The StructuredBuffer-subscript.hlsl test was introduced in the meantime depending on that version of the entry point. This revises it in the same way as RWBuffer-subscript

Follow up to #89282

The Alwaysinline change made the mangled form of entry points get
removed. The StructuredBuffer-subscript.hlsl test was introduced in
the meantime depending on that version of the entry point. This
revises it in the same way as RWBuffer-subscript

Follow up to llvm#89282
@pow2clk pow2clk requested a review from bob80905 September 17, 2024 17:42
@llvmbot llvmbot added clang Clang issues not falling into any other category HLSL HLSL Language Support labels Sep 17, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 17, 2024

@llvm/pr-subscribers-clang

Author: Greg Roth (pow2clk)

Changes

The Alwaysinline change made the mangled form of entry points get removed. The StructuredBuffer-subscript.hlsl test was introduced in the meantime depending on that version of the entry point. This revises it in the same way as RWBuffer-subscript

Follow up to #89282


Full diff: https://github.com/llvm/llvm-project/pull/109023.diff

1 Files Affected:

  • (modified) clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl (+3-2)
diff --git a/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl b/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl
index 9bd885d94d7e75..155749ec4f94a9 100644
--- a/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl
@@ -11,6 +11,7 @@ void main(unsigned GI : SV_GroupIndex) {
 // Even at -O0 the subscript operators get inlined. The -O0 IR is a bit messy
 // and confusing to follow so the match here is pretty weak.
 
-// CHECK: define internal void @"?main@@YAXI@Z"
-// CHECK-NOT: call
+// CHECK: define void @main()
+// Verify inlining leaves only calls to "llvm." intrinsics
+// CHECK-NOT:   call {{[^@]*}} @{{[^l][^l][^v][^m][^\.]}}
 // CHECK: ret void

@llvmbot
Copy link
Member

llvmbot commented Sep 17, 2024

@llvm/pr-subscribers-hlsl

Author: Greg Roth (pow2clk)

Changes

The Alwaysinline change made the mangled form of entry points get removed. The StructuredBuffer-subscript.hlsl test was introduced in the meantime depending on that version of the entry point. This revises it in the same way as RWBuffer-subscript

Follow up to #89282


Full diff: https://github.com/llvm/llvm-project/pull/109023.diff

1 Files Affected:

  • (modified) clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl (+3-2)
diff --git a/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl b/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl
index 9bd885d94d7e75..155749ec4f94a9 100644
--- a/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/StructuredBuffer-subscript.hlsl
@@ -11,6 +11,7 @@ void main(unsigned GI : SV_GroupIndex) {
 // Even at -O0 the subscript operators get inlined. The -O0 IR is a bit messy
 // and confusing to follow so the match here is pretty weak.
 
-// CHECK: define internal void @"?main@@YAXI@Z"
-// CHECK-NOT: call
+// CHECK: define void @main()
+// Verify inlining leaves only calls to "llvm." intrinsics
+// CHECK-NOT:   call {{[^@]*}} @{{[^l][^l][^v][^m][^\.]}}
 // CHECK: ret void

@pow2clk pow2clk merged commit f4fe26d into llvm:main Sep 17, 2024
7 of 8 checks passed
@pow2clk pow2clk deleted the hlsl_inline_followup branch September 17, 2024 17:45
thurstond added a commit that referenced this pull request Sep 17, 2024
#109023)"

This reverts commit f4fe26d.

Reason: 4a63f4d reverted "[HLSL] set alwaysinline on HLSL functions (#106588)" due to a buildbot failure; this test (which builds upon the reverted patch) also needs to be reverted.
thurstond added a commit that referenced this pull request Sep 17, 2024
…ne (#109023)"

This reverts commit da03d17.

I mistakenly reverted this fix-forward.
thurstond added a commit that referenced this pull request Sep 17, 2024
This reverts commit 4a63f4d.

It was reverted because of a buildbot breakage, but the fix-forward has
landed (#109023).
hamphet pushed a commit to hamphet/llvm-project that referenced this pull request Sep 18, 2024
…109023)

The Alwaysinline change made the mangled form of entry points get
removed. The StructuredBuffer-subscript.hlsl test was introduced in the
meantime depending on that version of the entry point. This revises it
in the same way as RWBuffer-subscript

Follow up to llvm#89282
hamphet pushed a commit to hamphet/llvm-project that referenced this pull request Sep 18, 2024
llvm#109023)"

This reverts commit f4fe26d.

Reason: 4a63f4d reverted "[HLSL] set alwaysinline on HLSL functions (llvm#106588)" due to a buildbot failure; this test (which builds upon the reverted patch) also needs to be reverted.
hamphet pushed a commit to hamphet/llvm-project that referenced this pull request Sep 18, 2024
…ne (llvm#109023)"

This reverts commit da03d17.

I mistakenly reverted this fix-forward.
hamphet pushed a commit to hamphet/llvm-project that referenced this pull request Sep 18, 2024
This reverts commit 4a63f4d.

It was reverted because of a buildbot breakage, but the fix-forward has
landed (llvm#109023).
tmsri pushed a commit to tmsri/llvm-project that referenced this pull request Sep 19, 2024
…109023)

The Alwaysinline change made the mangled form of entry points get
removed. The StructuredBuffer-subscript.hlsl test was introduced in the
meantime depending on that version of the entry point. This revises it
in the same way as RWBuffer-subscript

Follow up to llvm#89282
tmsri pushed a commit to tmsri/llvm-project that referenced this pull request Sep 19, 2024
llvm#109023)"

This reverts commit f4fe26d.

Reason: 4a63f4d reverted "[HLSL] set alwaysinline on HLSL functions (llvm#106588)" due to a buildbot failure; this test (which builds upon the reverted patch) also needs to be reverted.
tmsri pushed a commit to tmsri/llvm-project that referenced this pull request Sep 19, 2024
…ne (llvm#109023)"

This reverts commit da03d17.

I mistakenly reverted this fix-forward.
tmsri pushed a commit to tmsri/llvm-project that referenced this pull request Sep 19, 2024
This reverts commit 4a63f4d.

It was reverted because of a buildbot breakage, but the fix-forward has
landed (llvm#109023).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category HLSL HLSL Language Support
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants