Debian Codegraph @

flang/test/Lower/PowerPC/ppc-vec-splat-elem-order.f90

raw
1 ! RUN: %flang_fc1 -flang-experimental-hlfir -emit-llvm %s -fno-ppc-native-vector-element-order -triple ppc64le-unknown-linux -o - | FileCheck --check-prefixes="LLVMIR" %s
2 ! REQUIRES: target=powerpc{{.*}}
3
4 ! CHECK-LABEL: vec_splat_testf32i64
5 subroutine vec_splat_testf32i64(x)
6 vector(real(4)) :: x, y
7 y = vec_splat(x, 0_8)
8
9 ! LLVMIR: %[[x:.*]] = load <4 x float>, ptr %{{[0-9]}}, align 16
10 ! LLVMIR: %[[ele:.*]] = extractelement <4 x float> %[[x]], i64 3
11 ! LLVMIR: %[[ins:.*]] = insertelement <4 x float> undef, float %[[ele]], i32 0
12 ! LLVMIR: %[[y:.*]] = shufflevector <4 x float> %[[ins]], <4 x float> undef, <4 x i32> zeroinitializer
13 ! LLVMIR: store <4 x float> %[[y]], ptr %{{[0-9]}}, align 16
14 end subroutine vec_splat_testf32i64
15
16 ! CHECK-LABEL: vec_splat_testu8i16
17 subroutine vec_splat_testu8i16(x)
18 vector(unsigned(1)) :: x, y
19 y = vec_splat(x, 0_2)
20
21 ! LLVMIR: %[[x:.*]] = load <16 x i8>, ptr %{{[0-9]}}, align 16
22 ! LLVMIR: %[[ele:.*]] = extractelement <16 x i8> %[[x]], i16 15
23 ! LLVMIR: %[[ins:.*]] = insertelement <16 x i8> undef, i8 %[[ele]], i32 0
24 ! LLVMIR: %[[y:.*]] = shufflevector <16 x i8> %[[ins]], <16 x i8> undef, <16 x i32> zeroinitializer
25 ! LLVMIR: store <16 x i8> %[[y]], ptr %{{[0-9]}}, align 16
26 end subroutine vec_splat_testu8i16