| 1 |
; RUN: %if spirv-tools %{ llc -O0 -verify-machineinstrs -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} |
| 2 |
; This test checks the OpDecorate MIR is generated after the associated |
| 3 |
; vreg definition in the case of an array size declared through this lowering. |
| 4 |
|
| 5 |
define spir_func i32 @foo() { |
| 6 |
entry: |
| 7 |
%var = alloca i64 |
| 8 |
br label %block |
| 9 |
|
| 10 |
block: |
| 11 |
call void @llvm.memset.p0.i64(ptr align 8 %var, i8 0, i64 24, i1 false) |
| 12 |
ret i32 0 |
| 13 |
} |
| 14 |
|
| 15 |
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) |