xref: /llvm-project/llvm/test/CodeGen/DirectX/RawBufferStore-error64.ll (revision 0e51b54b7ac02b0920e20b8ccae26b32bd6b6982)
1*0e51b54bSJustin Bogner; We use llc for this test so that we don't abort after the first error.
2*0e51b54bSJustin Bogner; RUN: not llc %s -o /dev/null 2>&1 | FileCheck %s
3*0e51b54bSJustin Bogner
4*0e51b54bSJustin Bognertarget triple = "dxil-pc-shadermodel6.2-compute"
5*0e51b54bSJustin Bogner
6*0e51b54bSJustin Bogner; Can't store 64 bit types directly until SM6.3 (byteaddressbuf.Store<int64_t4>)
7*0e51b54bSJustin Bogner; CHECK: error:
8*0e51b54bSJustin Bogner; CHECK-SAME: in function storev4f64_byte
9*0e51b54bSJustin Bogner; CHECK-SAME: Cannot create RawBufferStore operation: Invalid overload type
10*0e51b54bSJustin Bognerdefine void @storev4f64_byte(i32 %offset, <4 x double> %data) "hlsl.export" {
11*0e51b54bSJustin Bogner  %buffer = call target("dx.RawBuffer", i8, 1, 0, 0)
12*0e51b54bSJustin Bogner      @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_i8_0_0_0(
13*0e51b54bSJustin Bogner          i32 0, i32 0, i32 1, i32 0, i1 false)
14*0e51b54bSJustin Bogner
15*0e51b54bSJustin Bogner  call void @llvm.dx.resource.store.rawbuffer.v4i64(
16*0e51b54bSJustin Bogner      target("dx.RawBuffer", i8, 1, 0, 0) %buffer,
17*0e51b54bSJustin Bogner      i32 %offset, i32 0, <4 x double> %data)
18*0e51b54bSJustin Bogner
19*0e51b54bSJustin Bogner  ret void
20*0e51b54bSJustin Bogner}
21