================
@@ -0,0 +1,14 @@
+; Test the case where we create a type in the entry block without having set 
it before.
----------------
maarquitos14 wrote:

Can we move this test under `extensions/SPV_INTEL_inline_assembly`, and add a 
new one that doesn't need the extension? Local testing triggers the bug with:
```
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - 
-filetype=obj | spirv-val %}

; CHECK-DAG: %[[#I32:]] = OpTypeInt 32 0
; CHECK-DAG: %[[#I64:]] = OpTypeInt 64 0
; CHECK: %[[#N:]] = OpFunctionParameter %[[#I32]]
; CHECK: %[[#LEN:]] = OpUConvert %[[#I64]] %[[#N]]
; CHECK: OpCopyMemorySized %[[#]] %[[#]] %[[#LEN]]

declare void @llvm.memcpy.p1.p1.i32(ptr addrspace(1), ptr addrspace(1), i32, i1)

define spir_func void @f(ptr addrspace(1) %p, ptr addrspace(1) %q, i32 %n) {
  call void @llvm.memcpy.p1.p1.i32(ptr addrspace(1) %p, ptr addrspace(1) %q, 
i32 %n, i1 false)
  ret void
}
```

https://github.com/llvm/llvm-project/pull/236948
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to