| 1 |
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s |
| 2 |
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} |
| 3 |
|
| 4 |
; Test that duplicate align information does not result in SPIR-V validation |
| 5 |
; errors due to duplicate Alignment Decorations. |
| 6 |
|
| 7 |
;CHECK: OpDecorate %[[#Var:]] Alignment |
| 8 |
;CHECK: %[[#Var]] = OpVariable %[[#]] |
| 9 |
|
| 10 |
define spir_func void @f() { |
| 11 |
%res = alloca i16, align 2, !spirv.Decorations !1 |
| 12 |
ret void |
| 13 |
} |
| 14 |
|
| 15 |
!1 = !{!2} |
| 16 |
!2 = !{i32 44, i32 2} |