1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[PowerPC] Implement Vector Splat Immediate Builtins in Clang

Implements builtins for the following prototypes:
  vector signed int vec_splati (const signed int);
  vector float vec_splati (const float);
  vector double vec_splatid (const float);
  vector signed int vec_splati_ins (vector signed int, const unsigned int,
                                    const signed int);
  vector unsigned int vec_splati_ins (vector unsigned int, const unsigned int,
                                      const unsigned int);
  vector float vec_splati_ins (vector float, const unsigned int, const float);

Differential Revision: https://reviews.llvm.org/D82520
This commit is contained in:
Biplob Mishra 2020-07-06 18:49:19 -05:00 committed by Lei Huang
parent 77b45c8014
commit ff0e91295b

View File

@ -286,3 +286,21 @@ define dso_local double @testDoubleZeroScalar() local_unnamed_addr {
entry: entry:
ret double 0.000000e+00 ret double 0.000000e+00
} }
define dso_local <4 x i32> @vec_splati() local_unnamed_addr {
; CHECK-LABEL: vec_splati:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xxspltiw vs34, -17
; CHECK-NEXT: blr
entry:
ret <4 x i32> <i32 -17, i32 -17, i32 -17, i32 -17>
}
define dso_local <2 x double> @vec_splatid() local_unnamed_addr {
; CHECK-LABEL: vec_splatid:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xxspltidp vs34, 1065353216
; CHECK-NEXT: blr
entry:
ret <2 x double> <double 1.000000e+00, double 1.000000e+00>
}