mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 12:50:00 +00:00
[PowerPC] Add some missing VSX bitcast patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205352 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f2dc47ce99
commit
4a6c0afc52
@ -758,6 +758,8 @@ def : Pat<(fma (fneg v4f32:$A), v4f32:$C, v4f32:$B),
|
||||
def : Pat<(fma v4f32:$A, (fneg v4f32:$C), v4f32:$B),
|
||||
(XVNMSUBASP $B, $C, $A)>;
|
||||
|
||||
def : Pat<(v2f64 (bitconvert v4f32:$A)),
|
||||
(COPY_TO_REGCLASS $A, VSRC)>;
|
||||
def : Pat<(v2f64 (bitconvert v4i32:$A)),
|
||||
(COPY_TO_REGCLASS $A, VSRC)>;
|
||||
def : Pat<(v2f64 (bitconvert v8i16:$A)),
|
||||
@ -765,6 +767,8 @@ def : Pat<(v2f64 (bitconvert v8i16:$A)),
|
||||
def : Pat<(v2f64 (bitconvert v16i8:$A)),
|
||||
(COPY_TO_REGCLASS $A, VSRC)>;
|
||||
|
||||
def : Pat<(v4f32 (bitconvert v2f64:$A)),
|
||||
(COPY_TO_REGCLASS $A, VRRC)>;
|
||||
def : Pat<(v4i32 (bitconvert v2f64:$A)),
|
||||
(COPY_TO_REGCLASS $A, VRRC)>;
|
||||
def : Pat<(v8i16 (bitconvert v2f64:$A)),
|
||||
@ -772,6 +776,8 @@ def : Pat<(v8i16 (bitconvert v2f64:$A)),
|
||||
def : Pat<(v16i8 (bitconvert v2f64:$A)),
|
||||
(COPY_TO_REGCLASS $A, VRRC)>;
|
||||
|
||||
def : Pat<(v2i64 (bitconvert v4f32:$A)),
|
||||
(COPY_TO_REGCLASS $A, VSRC)>;
|
||||
def : Pat<(v2i64 (bitconvert v4i32:$A)),
|
||||
(COPY_TO_REGCLASS $A, VSRC)>;
|
||||
def : Pat<(v2i64 (bitconvert v8i16:$A)),
|
||||
@ -779,6 +785,8 @@ def : Pat<(v2i64 (bitconvert v8i16:$A)),
|
||||
def : Pat<(v2i64 (bitconvert v16i8:$A)),
|
||||
(COPY_TO_REGCLASS $A, VSRC)>;
|
||||
|
||||
def : Pat<(v4f32 (bitconvert v2i64:$A)),
|
||||
(COPY_TO_REGCLASS $A, VRRC)>;
|
||||
def : Pat<(v4i32 (bitconvert v2i64:$A)),
|
||||
(COPY_TO_REGCLASS $A, VRRC)>;
|
||||
def : Pat<(v8i16 (bitconvert v2i64:$A)),
|
||||
|
@ -641,3 +641,11 @@ define <2 x i32> @test80(i32 %v) {
|
||||
; CHECK: blr
|
||||
}
|
||||
|
||||
define <2 x double> @test81(<4 x float> %b) {
|
||||
%w = bitcast <4 x float> %b to <2 x double>
|
||||
ret <2 x double> %w
|
||||
|
||||
; CHECK-LABEL: @test81
|
||||
; CHECK: blr
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user