You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
; CHECK: warning: {{.+}} <@SLMGV = addrspace(3) {{.+}}>: a volatile variable must reside in private address space
18
+
@SLMGV = addrspace(3) global <2 x i8> undef #0
19
+
20
+
; CHECK: warning: {{.+}} @GV {{.+}} a volatile variable may only be used in genx.vload/genx.vstore intrinsics and volatile loads/stores instructions
21
+
@GV = global <16 x i32> zeroinitializer, align64 #1
22
+
@ALIAS = global <16 x i32> addrspace(1)* addrspacecast (<16 x i32>* @GVto <16 x i32> addrspace(1)*)
23
+
24
+
@INVALID = global <16 x float> zeroinitializer, align64 #2
25
+
@VALID = global <16 x float> zeroinitializer, align64 #3
26
+
27
+
defineinternal spir_func void@foo() {
28
+
; CHECK: warning: {{.+}} %cst = {{.+}} a volatile variable may only be used in genx.vload/genx.vstore intrinsics and volatile loads/stores instructions
29
+
%cst = addrspacecast <16 x float>* @INVALIDto <16 x float> addrspace(4)*
30
+
31
+
; CHECK-NOT: warning
32
+
%ld.ic = tailcall <16 x float> @llvm.genx.vload.v16f32.p0v16f32(<16 x float>* @VALID)
33
+
callvoid@llvm.genx.vstore.v16f32.p0v16f32(<16 x float> %ld.ic, <16 x float>* @VALID)
34
+
%ld.inst = loadvolatile <16 x float>, <16 x float>* @VALID
35
+
storevolatile <16 x float> %ld.inst, <16 x float>* @VALID
36
+
retvoid
37
+
}
38
+
39
+
declare <16 x float> @llvm.genx.vload.v16f32.p0v16f32(<16 x float>*)
40
+
declarevoid@llvm.genx.vstore.v16f32.p0v16f32(<16 x float>, <16 x float>*)
0 commit comments