xref: /llvm-project/llvm/test/Bitcode/upgrade-vector-splice-intrinsic.ll (revision bfc0317153dca75137fba00b5c28758d6f720963)
1; RUN: opt -S < %s | FileCheck %s
2; RUN: llvm-as %s -o - | llvm-dis | FileCheck %s
3
4define <8 x half> @splice_fixed(<8 x half> %a, <8 x half> %b) {
5; CHECK-LABEL: @splice_fixed
6; CHECK: %res = call <8 x half> @llvm.vector.splice.v8f16(<8 x half> %a, <8 x half> %b, i32 2)
7
8  %res = call <8 x half> @llvm.experimental.vector.splice.v8f16(<8 x half> %a, <8 x half> %b, i32 2)
9  ret <8 x half> %res
10}
11
12define <vscale x 8 x half> @splice_scalable(<vscale x 8 x half> %a, <vscale x 8 x half> %b) {
13; CHECK-LABEL: @splice_scalable
14; CHECK: %res = call <vscale x 8 x half> @llvm.vector.splice.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, i32 2)
15
16  %res = call <vscale x 8 x half> @llvm.experimental.vector.splice.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, i32 2)
17  ret <vscale x 8 x half> %res
18}
19
20declare <8 x half> @llvm.experimental.vector.splice.v8f16(<8 x half>, <8 x half>, i32 immarg)
21; CHECK: declare <8 x half> @llvm.vector.splice.v8f16(<8 x half>, <8 x half>, i32 immarg)
22
23declare <vscale x 8 x half> @llvm.experimental.vector.splice.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, i32 immarg)
24; CHECK: declare <vscale x 8 x half> @llvm.vector.splice.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, i32 immarg)
25