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:
parent
77b45c8014
commit
ff0e91295b
@ -286,3 +286,21 @@ define dso_local double @testDoubleZeroScalar() local_unnamed_addr {
|
||||
entry:
|
||||
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>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user