Skip to content

Commit 78ab554

Browse files
committed
Fix OpenCL tests.
1 parent d48e439 commit 78ab554

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ void RequirementHandler::initAvailableCapabilitiesForOpenCL(
660660
// Add the min requirements for different OpenCL and SPIR-V versions.
661661
addAvailableCaps({Capability::Addresses, Capability::Float16Buffer,
662662
Capability::Kernel, Capability::Vector16,
663-
Capability::Groups, Capability::GenericPointer});
663+
Capability::Groups, Capability::GenericPointer,
664+
Capability::StorageImageReadWithoutFormat});
664665
if (ST.hasOpenCLFullProfile())
665666
addAvailableCaps({Capability::Int64, Capability::Int64Atomics});
666667
if (ST.hasOpenCLImageSupport()) {

llvm/test/CodeGen/SPIRV/read_image.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
22

3+
; CHECK-SPIRV: OpCapability StorageImageReadWithoutFormat
4+
35
; CHECK-SPIRV: %[[#IntTy:]] = OpTypeInt
46
; CHECK-SPIRV: %[[#IVecTy:]] = OpTypeVector %[[#IntTy]]
57
; CHECK-SPIRV: %[[#FloatTy:]] = OpTypeFloat

llvm/test/CodeGen/SPIRV/transcoding/OpImageReadMS.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
22

3+
; CHECK-SPIRV: OpCapability StorageImageReadWithoutFormat
34
; CHECK-SPIRV: %[[#]] = OpImageRead %[[#]] %[[#]] %[[#]] Sample %[[#]]
45

56
define spir_kernel void @sample_test(target("spirv.Image", void, 1, 0, 0, 1, 0, 0, 0) %source, i32 %sampler, <4 x float> addrspace(1)* nocapture %results) {

0 commit comments

Comments
 (0)