2018-08-25 03:24:20 +08:00
|
|
|
; RUN: llc < %s -ppc-vsr-nums-as-vr -mtriple=powerpc64-unknown-linux-gnu \
|
2018-12-05 04:14:57 +08:00
|
|
|
; RUN: -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr8 -relocation-model=pic \
|
2018-08-25 03:24:20 +08:00
|
|
|
; RUN: | FileCheck %s
|
|
|
|
; RUN: llc < %s -ppc-vsr-nums-as-vr -mtriple=powerpc64le-unknown-linux-gnu \
|
2018-12-05 04:14:57 +08:00
|
|
|
; RUN: -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr8 -relocation-model=pic \
|
2018-08-25 03:24:20 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=CHECK-LE
|
2015-08-14 01:40:44 +08:00
|
|
|
|
|
|
|
; The build[csilf] functions simply test the scalar_to_vector handling with
|
|
|
|
; direct moves. This corresponds to the "insertelement" instruction. Subsequent
|
|
|
|
; to this, there will be a splat corresponding to the shufflevector.
|
|
|
|
|
2015-11-02 22:01:11 +08:00
|
|
|
@d = common global double 0.000000e+00, align 8
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-08-14 01:40:44 +08:00
|
|
|
define <16 x i8> @buildc(i8 zeroext %a) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%splat.splatinsert = insertelement <16 x i8> undef, i8 %a, i32 0
|
2015-08-14 01:40:44 +08:00
|
|
|
%splat.splat = shufflevector <16 x i8> %splat.splatinsert, <16 x i8> undef, <16 x i32> zeroinitializer
|
|
|
|
ret <16 x i8> %splat.splat
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: buildc
|
|
|
|
; CHECK: sldi r3, r3, 56
|
|
|
|
; CHECK: mtvsrd v2, r3
|
|
|
|
; CHECK-LE-LABEL: buildc
|
|
|
|
; CHECK-LE: mtvsrd f0, r3
|
|
|
|
; CHECK-LE: xxswapd v2, vs0
|
2015-08-14 01:40:44 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-08-14 01:40:44 +08:00
|
|
|
define <8 x i16> @builds(i16 zeroext %a) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%splat.splatinsert = insertelement <8 x i16> undef, i16 %a, i32 0
|
2015-08-14 01:40:44 +08:00
|
|
|
%splat.splat = shufflevector <8 x i16> %splat.splatinsert, <8 x i16> undef, <8 x i32> zeroinitializer
|
|
|
|
ret <8 x i16> %splat.splat
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: builds
|
|
|
|
; CHECK: sldi r3, r3, 48
|
|
|
|
; CHECK: mtvsrd v2, r3
|
|
|
|
; CHECK-LE-LABEL: builds
|
|
|
|
; CHECK-LE: mtvsrd f0, r3
|
|
|
|
; CHECK-LE: xxswapd v2, vs0
|
2015-08-14 01:40:44 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-08-14 01:40:44 +08:00
|
|
|
define <4 x i32> @buildi(i32 zeroext %a) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%splat.splatinsert = insertelement <4 x i32> undef, i32 %a, i32 0
|
2015-08-14 01:40:44 +08:00
|
|
|
%splat.splat = shufflevector <4 x i32> %splat.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer
|
|
|
|
ret <4 x i32> %splat.splat
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: buildi
|
|
|
|
; CHECK: mtvsrwz f0, r3
|
|
|
|
; CHECK: xxspltw v2, vs0, 1
|
|
|
|
; CHECK-LE-LABEL: buildi
|
|
|
|
; CHECK-LE: mtvsrwz f0, r3
|
|
|
|
; CHECK-LE: xxspltw v2, vs0, 1
|
2015-08-14 01:40:44 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-08-14 01:40:44 +08:00
|
|
|
define <2 x i64> @buildl(i64 %a) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%splat.splatinsert = insertelement <2 x i64> undef, i64 %a, i32 0
|
2015-08-14 01:40:44 +08:00
|
|
|
%splat.splat = shufflevector <2 x i64> %splat.splatinsert, <2 x i64> undef, <2 x i32> zeroinitializer
|
|
|
|
ret <2 x i64> %splat.splat
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: buildl
|
|
|
|
; CHECK: mtvsrd f0, r3
|
|
|
|
; CHECK-LE-LABEL: buildl
|
|
|
|
; CHECK-LE: mtvsrd f0, r3
|
|
|
|
; CHECK-LE: xxspltd v2, vs0, 0
|
2015-08-14 01:40:44 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-08-14 01:40:44 +08:00
|
|
|
define <4 x float> @buildf(float %a) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%splat.splatinsert = insertelement <4 x float> undef, float %a, i32 0
|
2015-08-14 01:40:44 +08:00
|
|
|
%splat.splat = shufflevector <4 x float> %splat.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
|
|
|
|
ret <4 x float> %splat.splat
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: buildf
|
|
|
|
; CHECK: xscvdpspn vs0, f1
|
|
|
|
; CHECK: xxspltw v2, vs0, 0
|
|
|
|
; CHECK-LE-LABEL: buildf
|
|
|
|
; CHECK-LE: xscvdpspn vs0, f1
|
|
|
|
; CHECK-LE: xxspltw v2, vs0, 0
|
2015-08-14 01:40:44 +08:00
|
|
|
}
|
2015-10-09 19:12:18 +08:00
|
|
|
|
2015-11-02 22:01:11 +08:00
|
|
|
; The optimization to remove stack operations from PPCDAGToDAGISel::Select
|
|
|
|
; should still trigger for v2f64, producing an lxvdsx.
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readonly
|
|
|
|
define <2 x double> @buildd() {
|
2015-11-02 22:01:11 +08:00
|
|
|
entry:
|
|
|
|
%0 = load double, double* @d, align 8
|
|
|
|
%splat.splatinsert = insertelement <2 x double> undef, double %0, i32 0
|
|
|
|
%splat.splat = shufflevector <2 x double> %splat.splatinsert, <2 x double> undef, <2 x i32> zeroinitializer
|
|
|
|
ret <2 x double> %splat.splat
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: buildd
|
|
|
|
; CHECK: ld r3, .LC0@toc@l(r3)
|
|
|
|
; CHECK: lxvdsx v2, 0, r3
|
|
|
|
; CHECK-LE-LABEL: buildd
|
|
|
|
; CHECK-LE: ld r3, .LC0@toc@l(r3)
|
|
|
|
; CHECK-LE: lxvdsx v2, 0, r3
|
2015-11-02 22:01:11 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc0(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 8, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: clrldi r3, r3, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc1(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 16, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 56, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc2(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 2
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 24, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc3(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 3
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 32, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 40, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc4(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 4
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 40, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc5(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 5
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 48, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 24, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc6(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 6
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 56, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc7(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 7
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: clrldi r3, r3, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 8, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc8(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 8
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc8
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 8, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc8
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: clrldi r3, r3, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc9(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 9
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc9
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 16, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc9
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 56, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc10(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 10
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc10
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 24, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc10
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc11(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 11
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc11
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 32, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc11
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 40, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc12(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 12
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc12
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 40, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc12
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc13(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 13
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc13
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 48, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc13
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 24, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc14(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 14
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc14
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 56, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc14
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getsc15(<16 x i8> %vsc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 15
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getsc15
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: clrldi r3, r3, 56
|
|
|
|
; CHECK: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsc15
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 8, 56
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc0(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 8, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: clrldi r3, r3, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc1(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 16, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 56, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc2(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 2
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 24, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc3(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 3
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 32, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 40, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc4(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 4
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 40, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc5(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 5
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 48, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 24, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc6(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 6
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 56, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc7(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 7
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: clrldi r3, r3, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 8, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc8(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 8
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc8
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 8, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc8
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: clrldi r3, r3, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc9(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 9
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc9
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 16, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc9
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 56, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc10(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 10
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc10
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 24, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc10
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc11(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 11
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc11
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 32, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc11
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 40, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc12(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 12
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc12
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 40, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc12
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc13(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 13
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc13
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 48, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc13
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 24, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc14(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 14
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc14
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 56, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc14
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getuc15(<16 x i8> %vuc) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 15
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
; CHECK-LABEL: @getuc15
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: clrldi r3, r3, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getuc15
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 8, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i8 @getvelsc(<16 x i8> %vsc, i32 signext %i) {
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: @getvelsc
|
|
|
|
; CHECK: andi. r4, r5, 8
|
|
|
|
; CHECK: li r3, 7
|
|
|
|
; CHECK: lvsl v3, 0, r4
|
|
|
|
; CHECK: andc r3, r3, r5
|
|
|
|
; CHECK: sldi r3, r3, 3
|
|
|
|
; CHECK: vperm v2, v2, v2, v3
|
|
|
|
; CHECK: mfvsrd r4, v2
|
|
|
|
; CHECK: srd r3, r4, r3
|
|
|
|
; CHECK: extsb r3, r3
|
|
|
|
; CHECK-LE-LABEL: @getvelsc
|
|
|
|
; CHECK-LE: li r3, 8
|
|
|
|
; CHECK-LE: andc r3, r3, r5
|
|
|
|
; CHECK-LE: lvsl v3, 0, r3
|
|
|
|
; CHECK-LE: li r3, 7
|
|
|
|
; CHECK-LE: and r3, r3, r5
|
|
|
|
; CHECK-LE: vperm v2, v2, v2, v3
|
|
|
|
; CHECK-LE: sldi r3, r3, 3
|
|
|
|
; CHECK-LE: mfvsrd r4, v2
|
|
|
|
; CHECK-LE: srd r3, r4, r3
|
|
|
|
; CHECK-LE: extsb r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vsc, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i8 @getveluc(<16 x i8> %vuc, i32 signext %i) {
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: @getveluc
|
|
|
|
; CHECK: andi. r4, r5, 8
|
|
|
|
; CHECK: li r3, 7
|
|
|
|
; CHECK: lvsl v3, 0, r4
|
|
|
|
; CHECK: andc r3, r3, r5
|
|
|
|
; CHECK: sldi r3, r3, 3
|
|
|
|
; CHECK: vperm v2, v2, v2, v3
|
|
|
|
; CHECK: mfvsrd r4, v2
|
|
|
|
; CHECK: srd r3, r4, r3
|
|
|
|
; CHECK: clrldi r3, r3, 5
|
|
|
|
; CHECK-LE-LABEL: @getveluc
|
|
|
|
; CHECK-LE: li r3, 8
|
|
|
|
; CHECK-LE: andc r3, r3, r5
|
|
|
|
; CHECK-LE: lvsl v3, 0, r3
|
|
|
|
; CHECK-LE: li r3, 7
|
|
|
|
; CHECK-LE: and r3, r3, r5
|
|
|
|
; CHECK-LE: vperm v2, v2, v2, v3
|
|
|
|
; CHECK-LE: sldi r3, r3, 3
|
|
|
|
; CHECK-LE: mfvsrd r4, v2
|
|
|
|
; CHECK-LE: srd r3, r4, r3
|
|
|
|
; CHECK-LE: clrldi r3, r3, 56
|
2015-10-09 19:12:18 +08:00
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <16 x i8> %vuc, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i8 %vecext
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss0(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 16, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: clrldi r3, r3, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss1(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 32, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss2(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 2
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 48, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss3(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 3
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: clrldi r3, r3, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss4(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 4
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 16, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: clrldi r3, r3, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss5(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 5
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 32, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss6(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 6
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 48, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getss7(<8 x i16> %vss) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 7
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getss7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: clrldi r3, r3, 48
|
|
|
|
; CHECK: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getss7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 48
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus0(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 16, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: clrldi r3, r3, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus1(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 32, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus2(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 2
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: rldicl r3, r3, 48, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus3(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 3
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
|
|
|
; CHECK: clrldi r3, r3, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus4(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 4
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 16, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus4
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: clrldi r3, r3, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus5(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 5
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 32, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus5
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 48, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus6(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 6
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: rldicl r3, r3, 48, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus6
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 32, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getus7(<8 x i16> %vus) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 7
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
; CHECK-LABEL: @getus7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, f0
|
|
|
|
; CHECK: clrldi r3, r3, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getus7
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
|
|
|
; CHECK-LE: rldicl r3, r3, 16, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i16 @getvelss(<8 x i16> %vss, i32 signext %i) {
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: @getvelss
|
|
|
|
; CHECK: andi. r4, r5, 4
|
|
|
|
; CHECK: li r3, 3
|
|
|
|
; CHECK: sldi r4, r4, 1
|
|
|
|
; CHECK: andc r3, r3, r5
|
|
|
|
; CHECK: lvsl v3, 0, r4
|
|
|
|
; CHECK: sldi r3, r3, 4
|
|
|
|
; CHECK: vperm v2, v2, v2, v3
|
|
|
|
; CHECK: mfvsrd r4, v2
|
|
|
|
; CHECK: srd r3, r4, r3
|
|
|
|
; CHECK: extsh r3, r3
|
|
|
|
; CHECK-LE-LABEL: @getvelss
|
|
|
|
; CHECK-LE: li r3, 4
|
|
|
|
; CHECK-LE: andc r3, r3, r5
|
|
|
|
; CHECK-LE: sldi r3, r3, 1
|
|
|
|
; CHECK-LE: lvsl v3, 0, r3
|
|
|
|
; CHECK-LE: li r3, 3
|
|
|
|
; CHECK-LE: and r3, r3, r5
|
|
|
|
; CHECK-LE: vperm v2, v2, v2, v3
|
|
|
|
; CHECK-LE: sldi r3, r3, 4
|
|
|
|
; CHECK-LE: mfvsrd r4, v2
|
|
|
|
; CHECK-LE: srd r3, r4, r3
|
|
|
|
; CHECK-LE: extsh r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vss, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i16 @getvelus(<8 x i16> %vus, i32 signext %i) {
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LABEL: @getvelus
|
|
|
|
; CHECK: andi. r4, r5, 4
|
|
|
|
; CHECK: li r3, 3
|
|
|
|
; CHECK: sldi r4, r4, 1
|
|
|
|
; CHECK: andc r3, r3, r5
|
|
|
|
; CHECK: lvsl v3, 0, r4
|
|
|
|
; CHECK: sldi r3, r3, 4
|
|
|
|
; CHECK: vperm v2, v2, v2, v3
|
|
|
|
; CHECK: mfvsrd r4, v2
|
|
|
|
; CHECK: srd r3, r4, r3
|
|
|
|
; CHECK: clrldi r3, r3, 48
|
|
|
|
; CHECK-LE-LABEL: @getvelus
|
|
|
|
; CHECK-LE: li r3, 4
|
|
|
|
; CHECK-LE: andc r3, r3, r5
|
|
|
|
; CHECK-LE: sldi r3, r3, 1
|
|
|
|
; CHECK-LE: lvsl v3, 0, r3
|
|
|
|
; CHECK-LE: li r3, 3
|
|
|
|
; CHECK-LE: and r3, r3, r5
|
|
|
|
; CHECK-LE: vperm v2, v2, v2, v3
|
|
|
|
; CHECK-LE: sldi r3, r3, 4
|
|
|
|
; CHECK-LE: mfvsrd r4, v2
|
|
|
|
; CHECK-LE: srd r3, r4, r3
|
|
|
|
; CHECK-LE: clrldi r3, r3, 48
|
2015-10-09 19:12:18 +08:00
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <8 x i16> %vus, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i16 %vecext
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i32 @getsi0(<4 x i32> %vsi) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vsi, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getsi0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxsldwi vs0, v2, v2, 3
|
|
|
|
; CHECK: mfvsrwz r3, f0
|
|
|
|
; CHECK: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsi0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxswapd vs0, v2
|
|
|
|
; CHECK-LE: mfvsrwz r3, f0
|
|
|
|
; CHECK-LE: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i32 @getsi1(<4 x i32> %vsi) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vsi, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getsi1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrwz r3, v2
|
|
|
|
; CHECK: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsi1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxsldwi vs0, v2, v2, 1
|
|
|
|
; CHECK-LE: mfvsrwz r3, f0
|
|
|
|
; CHECK-LE: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i32 @getsi2(<4 x i32> %vsi) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vsi, i32 2
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getsi2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxsldwi vs0, v2, v2, 1
|
|
|
|
; CHECK: mfvsrwz r3, f0
|
|
|
|
; CHECK: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsi2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrwz r3, v2
|
|
|
|
; CHECK-LE: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i32 @getsi3(<4 x i32> %vsi) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vsi, i32 3
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getsi3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxswapd vs0, v2
|
|
|
|
; CHECK: mfvsrwz r3, f0
|
|
|
|
; CHECK: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsi3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxsldwi vs0, v2, v2, 3
|
|
|
|
; CHECK-LE: mfvsrwz r3, f0
|
|
|
|
; CHECK-LE: extsw r3, r3
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i32 @getui0(<4 x i32> %vui) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vui, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getui0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxsldwi vs0, v2, v2, 3
|
|
|
|
; CHECK: mfvsrwz r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getui0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxswapd vs0, v2
|
|
|
|
; CHECK-LE: mfvsrwz r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i32 @getui1(<4 x i32> %vui) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vui, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getui1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrwz r3, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getui1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxsldwi vs0, v2, v2, 1
|
|
|
|
; CHECK-LE: mfvsrwz r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i32 @getui2(<4 x i32> %vui) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vui, i32 2
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getui2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxsldwi vs0, v2, v2, 1
|
|
|
|
; CHECK: mfvsrwz r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getui2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrwz r3, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i32 @getui3(<4 x i32> %vui) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vui, i32 3
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getui3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxswapd vs0, v2
|
|
|
|
; CHECK: mfvsrwz r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getui3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxsldwi vs0, v2, v2, 3
|
|
|
|
; CHECK-LE: mfvsrwz r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define signext i32 @getvelsi(<4 x i32> %vsi, i32 signext %i) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vsi, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getvelsi
|
|
|
|
; CHECK-LE-LABEL: @getvelsi
|
|
|
|
; FIXME: add check patterns when variable element extraction is implemented
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define zeroext i32 @getvelui(<4 x i32> %vui, i32 signext %i) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x i32> %vui, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i32 %vecext
|
|
|
|
; CHECK-LABEL: @getvelui
|
|
|
|
; CHECK-LE-LABEL: @getvelui
|
|
|
|
; FIXME: add check patterns when variable element extraction is implemented
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define i64 @getsl0(<2 x i64> %vsl) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x i64> %vsl, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i64 %vecext
|
|
|
|
; CHECK-LABEL: @getsl0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsl0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxswapd vs0, v2
|
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define i64 @getsl1(<2 x i64> %vsl) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x i64> %vsl, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i64 %vecext
|
|
|
|
; CHECK-LABEL: @getsl1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxswapd vs0, v2
|
|
|
|
; CHECK: mfvsrd r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getsl1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define i64 @getul0(<2 x i64> %vul) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x i64> %vul, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i64 %vecext
|
|
|
|
; CHECK-LABEL: @getul0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: mfvsrd r3, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getul0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxswapd vs0, v2
|
|
|
|
; CHECK-LE: mfvsrd r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define i64 @getul1(<2 x i64> %vul) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x i64> %vul, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i64 %vecext
|
|
|
|
; CHECK-LABEL: @getul1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxswapd vs0, v2
|
|
|
|
; CHECK: mfvsrd r3, f0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getul1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: mfvsrd r3, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define i64 @getvelsl(<2 x i64> %vsl, i32 signext %i) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x i64> %vsl, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i64 %vecext
|
|
|
|
; CHECK-LABEL: @getvelsl
|
|
|
|
; CHECK-LE-LABEL: @getvelsl
|
|
|
|
; FIXME: add check patterns when variable element extraction is implemented
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define i64 @getvelul(<2 x i64> %vul, i32 signext %i) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x i64> %vul, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret i64 %vecext
|
|
|
|
; CHECK-LABEL: @getvelul
|
|
|
|
; CHECK-LE-LABEL: @getvelul
|
|
|
|
; FIXME: add check patterns when variable element extraction is implemented
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define float @getf0(<4 x float> %vf) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x float> %vf, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret float %vecext
|
|
|
|
; CHECK-LABEL: @getf0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xscvspdpn f1, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getf0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxsldwi vs0, v2, v2, 3
|
|
|
|
; CHECK-LE: xscvspdpn f1, vs0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define float @getf1(<4 x float> %vf) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x float> %vf, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret float %vecext
|
|
|
|
; CHECK-LABEL: @getf1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxsldwi vs0, v2, v2, 1
|
|
|
|
; CHECK: xscvspdpn f1, vs0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getf1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxswapd vs0, v2
|
|
|
|
; CHECK-LE: xscvspdpn f1, vs0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define float @getf2(<4 x float> %vf) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x float> %vf, i32 2
|
2015-10-09 19:12:18 +08:00
|
|
|
ret float %vecext
|
|
|
|
; CHECK-LABEL: @getf2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxswapd vs0, v2
|
|
|
|
; CHECK: xscvspdpn f1, vs0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getf2
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxsldwi vs0, v2, v2, 1
|
|
|
|
; CHECK-LE: xscvspdpn f1, vs0
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define float @getf3(<4 x float> %vf) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x float> %vf, i32 3
|
2015-10-09 19:12:18 +08:00
|
|
|
ret float %vecext
|
|
|
|
; CHECK-LABEL: @getf3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxsldwi vs0, v2, v2, 3
|
|
|
|
; CHECK: xscvspdpn f1, vs0
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getf3
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xscvspdpn f1, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define float @getvelf(<4 x float> %vf, i32 signext %i) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <4 x float> %vf, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret float %vecext
|
|
|
|
; CHECK-LABEL: @getvelf
|
|
|
|
; CHECK-LE-LABEL: @getvelf
|
|
|
|
; FIXME: add check patterns when variable element extraction is implemented
|
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define double @getd0(<2 x double> %vd) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x double> %vd, i32 0
|
2015-10-09 19:12:18 +08:00
|
|
|
ret double %vecext
|
|
|
|
; CHECK-LABEL: @getd0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxlor f1, v2, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getd0
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxswapd vs1, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define double @getd1(<2 x double> %vd) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x double> %vd, i32 1
|
2015-10-09 19:12:18 +08:00
|
|
|
ret double %vecext
|
|
|
|
; CHECK-LABEL: @getd1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK: xxswapd vs1, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
; CHECK-LE-LABEL: @getd1
|
2018-08-25 03:24:20 +08:00
|
|
|
; CHECK-LE: xxlor f1, v2, v2
|
2015-10-09 19:12:18 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 00:04:53 +08:00
|
|
|
; Function Attrs: norecurse nounwind readnone
|
2015-10-09 19:12:18 +08:00
|
|
|
define double @getveld(<2 x double> %vd, i32 signext %i) {
|
|
|
|
entry:
|
2017-03-16 00:04:53 +08:00
|
|
|
%vecext = extractelement <2 x double> %vd, i32 %i
|
2015-10-09 19:12:18 +08:00
|
|
|
ret double %vecext
|
|
|
|
; CHECK-LABEL: @getveld
|
|
|
|
; CHECK-LE-LABEL: @getveld
|
|
|
|
; FIXME: add check patterns when variable element extraction is implemented
|
|
|
|
}
|