1 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s
3 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
4 target triple = "aarch64"
6 @important_val = extern_weak dso_local global i32, align 4
8 ; CHECK-LABEL: define <vscale x 4 x i32> @const_shufflevector(
9 ; CHECK: <vscale x 4 x i32> zeroinitializer
11 define <vscale x 4 x i32> @const_shufflevector() {
12 ret <vscale x 4 x i32> shufflevector (<vscale x 4 x i32> zeroinitializer,
13 <vscale x 4 x i32> undef,
14 <vscale x 4 x i32> zeroinitializer)
17 ; CHECK-LABEL: define <vscale x 4 x i32> @const_shufflevector_ex()
18 ; CHECK: <vscale x 4 x i32> zeroinitializer
20 define <vscale x 4 x i32> @const_shufflevector_ex() {
21 ret <vscale x 4 x i32> shufflevector (<vscale x 2 x i32> zeroinitializer,
22 <vscale x 2 x i32> undef,
23 <vscale x 4 x i32> zeroinitializer)
26 ; CHECK-LABEL: define <vscale x 4 x i32> @non_const_shufflevector(
27 ; CHECK: %res = shufflevector <vscale x 4 x i32>
29 define <vscale x 4 x i32> @non_const_shufflevector(<vscale x 4 x i32> %lhs,
30 <vscale x 4 x i32> %rhs) {
31 %res = shufflevector <vscale x 4 x i32> %lhs,
32 <vscale x 4 x i32> %rhs,
33 <vscale x 4 x i32> zeroinitializer
35 ret <vscale x 4 x i32> %res
38 ; CHECK-LABEL: define <vscale x 4 x i32> @const_select()
39 ; CHECK: select <vscale x 4 x i1>
41 define <vscale x 4 x i32> @const_select() {
42 %s = select <vscale x 4 x i1> insertelement
43 (<vscale x 4 x i1> undef, i1 true, i32 0),
44 <vscale x 4 x i32> zeroinitializer,
45 <vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i32 1, i32 0)
46 ret <vscale x 4 x i32> %s