forked from OSchip/llvm-project
17 lines
463 B
LLVM
17 lines
463 B
LLVM
;; uint8 foo(uint8 c, unsigned i) {
|
|
;; c[i] = 42;
|
|
;; return c;
|
|
;; }
|
|
|
|
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
|
|
|
|
; CHECK: %[[#TypeInt:]] = OpTypeInt 32
|
|
; CHECK: %[[#TypeVector:]] = OpTypeVector %[[#TypeInt]] 8
|
|
; CHECK: %[[#]] = OpVectorInsertDynamic %[[#TypeVector]]
|
|
|
|
define spir_func <8 x i32> @foo(<8 x i32> %c, i32 %i) local_unnamed_addr {
|
|
entry:
|
|
%vecins = insertelement <8 x i32> %c, i32 42, i32 %i
|
|
ret <8 x i32> %vecins
|
|
}
|