- The SPIR-V spec requires that OpConstantComposite must not reference spec constant operands. When a composite contains non-constant constitued, OpSpecConstantComposite should be emitted instead of OpConstantComposite - Avoid creating function pointer types when the SPV_INTEL_function_pointers extension is unavailable, falling back to i8 as the pointee type - Re-enable spirv-val validation in tests that previously failed due to this issue, and un-XFAIL the block_w_struct_return and global_block transcoding tests related to #60133 fixes #186756
17 lines
847 B
LLVM
17 lines
847 B
LLVM
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
|
|
; CHECK-DAG: %[[TyInt64:.*]] = OpTypeInt 64 0
|
|
; CHECK-DAG: %[[TyInt64Ptr:.*]] = OpTypePointer {{[a-zA-Z]+}} %[[TyInt64]]
|
|
; CHECK-DAG: %[[TyStruct:.*]] = OpTypeStruct %[[TyInt64Ptr]] %[[TyInt64Ptr]]
|
|
; CHECK-DAG: %[[ConstStruct:.*]] = OpSpecConstantComposite %[[TyStruct]] %[[ConstField:.*]] %[[ConstField]]
|
|
; CHECK-DAG: %[[TyStructPtr:.*]] = OpTypePointer {{[a-zA-Z]+}} %[[TyStruct]]
|
|
; CHECK-DAG: OpVariable %[[TyStructPtr]] {{[a-zA-Z]+}} %[[ConstStruct]]
|
|
|
|
@a = addrspace(1) constant i64 42
|
|
@struct = addrspace(1) global {ptr addrspace(1), ptr addrspace(1)} { ptr addrspace(1) @a, ptr addrspace(1) @a }
|
|
|
|
define spir_kernel void @foo() {
|
|
ret void
|
|
}
|