Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions llvm/test/Assembler/scalable-vector-struct.ll
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; ifndef INTEL_SYCL_OPAQUEPOINTER_READY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we remove the code inside ifndef. Can you please clarify?

Thanks

Copy link
Contributor Author

@jsji jsji Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was guarded because we were only testing typed pointer (the test can only be run in typed pointer mode). This PR ported the testcase into opaque pointer, so we now can remove the guard to let it run.

; RUN: opt -passes=verify -S < %s 2>&1 | FileCheck %s
; endif

%struct.test = type { <vscale x 1 x i32>, <vscale x 1 x i32> }

define <vscale x 1 x i32> @load(%struct.test* %x) {
define <vscale x 1 x i32> @load(ptr %x) {
; CHECK-LABEL: define <vscale x 1 x i32> @load
; CHECK-SAME: (ptr [[X:%.*]]) {
; CHECK-NEXT: [[A:%.*]] = load [[STRUCT_TEST:%.*]], ptr [[X]], align 4
; CHECK-NEXT: [[B:%.*]] = extractvalue [[STRUCT_TEST]] [[A]], 1
; CHECK-NEXT: ret <vscale x 1 x i32> [[B]]
;
%a = load %struct.test, %struct.test* %x
%a = load %struct.test, ptr %x
%b = extractvalue %struct.test %a, 1
ret <vscale x 1 x i32> %b
}

define void @store(%struct.test* %x, <vscale x 1 x i32> %y, <vscale x 1 x i32> %z) {
define void @store(ptr %x, <vscale x 1 x i32> %y, <vscale x 1 x i32> %z) {
; CHECK-LABEL: define void @store
; CHECK-SAME: (ptr [[X:%.*]], <vscale x 1 x i32> [[Y:%.*]], <vscale x 1 x i32> [[Z:%.*]]) {
; CHECK-NEXT: [[A:%.*]] = insertvalue [[STRUCT_TEST:%.*]] undef, <vscale x 1 x i32> [[Y]], 0
Expand All @@ -27,6 +25,6 @@ define void @store(%struct.test* %x, <vscale x 1 x i32> %y, <vscale x 1 x i32> %
;
%a = insertvalue %struct.test undef, <vscale x 1 x i32> %y, 0
%b = insertvalue %struct.test %a, <vscale x 1 x i32> %z, 1
store %struct.test %b, %struct.test* %x
store %struct.test %b, ptr %x
ret void
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
; This test checks that the Local Accessor to Shared Memory pass runs with the
; `amdgcn-amd-amdhsa` triple, but not with `amdgcn-amd-amdpal`.
; ifndef INTEL_SYCL_OPAQUEPOINTER_READY
; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck --check-prefix=CHECK-VALID %s
; RUN: llc -mtriple=amdgcn-amd-amdpal < %s | FileCheck --check-prefix=CHECK-INVALID %s
; end

; ModuleID = 'local-accessor-to-shared-memory-triple.ll'
source_filename = "local-accessor-to-shared-memory-triple.ll"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
; This test checks that the Local Accessor to Shared Memory pass runs with the
; `amdgcn-amd-amdhsa` triple and does not if the option is not present.
; ifndef INTEL_SYCL_OPAQUEPOINTER_READY
; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck --check-prefix=CHECK-OPT %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck --check-prefix=CHECK-OPT %s
; end

; ModuleID = 'local-accessor-to-shared-memory-valid-triple.ll'
source_filename = "local-accessor-to-shared-memory-valid-triple.ll"
Expand Down
Loading