mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
fix PR8900, a shuffle miscompilation. Patch by Nadav Rotem!
llvm-svn: 122921
This commit is contained in:
parent
0caa2500c0
commit
3ef9db5cd4
@ -5597,9 +5597,9 @@ def : Pat<(v4f32 (X86Unpckhps VR128:$src1, VR128:$src2)),
|
|||||||
|
|
||||||
// Shuffle with UNPCKLPD
|
// Shuffle with UNPCKLPD
|
||||||
def : Pat<(v2f64 (X86Unpcklpd VR128:$src1, (memopv2f64 addr:$src2))),
|
def : Pat<(v2f64 (X86Unpcklpd VR128:$src1, (memopv2f64 addr:$src2))),
|
||||||
(VUNPCKLPSrm VR128:$src1, addr:$src2)>, Requires<[HasAVX]>;
|
(VUNPCKLPDrm VR128:$src1, addr:$src2)>, Requires<[HasAVX]>;
|
||||||
def : Pat<(v2f64 (X86Unpcklpd VR128:$src1, (memopv2f64 addr:$src2))),
|
def : Pat<(v2f64 (X86Unpcklpd VR128:$src1, (memopv2f64 addr:$src2))),
|
||||||
(UNPCKLPSrm VR128:$src1, addr:$src2)>;
|
(UNPCKLPDrm VR128:$src1, addr:$src2)>;
|
||||||
|
|
||||||
def : Pat<(v2f64 (X86Unpcklpd VR128:$src1, VR128:$src2)),
|
def : Pat<(v2f64 (X86Unpcklpd VR128:$src1, VR128:$src2)),
|
||||||
(VUNPCKLPDrr VR128:$src1, VR128:$src2)>, Requires<[HasAVX]>;
|
(VUNPCKLPDrr VR128:$src1, VR128:$src2)>, Requires<[HasAVX]>;
|
||||||
@ -5608,9 +5608,9 @@ def : Pat<(v2f64 (X86Unpcklpd VR128:$src1, VR128:$src2)),
|
|||||||
|
|
||||||
// Shuffle with UNPCKHPD
|
// Shuffle with UNPCKHPD
|
||||||
def : Pat<(v2f64 (X86Unpckhpd VR128:$src1, (memopv2f64 addr:$src2))),
|
def : Pat<(v2f64 (X86Unpckhpd VR128:$src1, (memopv2f64 addr:$src2))),
|
||||||
(VUNPCKLPSrm VR128:$src1, addr:$src2)>, Requires<[HasAVX]>;
|
(VUNPCKHPDrm VR128:$src1, addr:$src2)>, Requires<[HasAVX]>;
|
||||||
def : Pat<(v2f64 (X86Unpckhpd VR128:$src1, (memopv2f64 addr:$src2))),
|
def : Pat<(v2f64 (X86Unpckhpd VR128:$src1, (memopv2f64 addr:$src2))),
|
||||||
(UNPCKLPSrm VR128:$src1, addr:$src2)>;
|
(UNPCKHPDrm VR128:$src1, addr:$src2)>;
|
||||||
|
|
||||||
def : Pat<(v2f64 (X86Unpckhpd VR128:$src1, VR128:$src2)),
|
def : Pat<(v2f64 (X86Unpckhpd VR128:$src1, VR128:$src2)),
|
||||||
(VUNPCKHPDrr VR128:$src1, VR128:$src2)>, Requires<[HasAVX]>;
|
(VUNPCKHPDrr VR128:$src1, VR128:$src2)>, Requires<[HasAVX]>;
|
||||||
|
@ -192,3 +192,16 @@ entry:
|
|||||||
; CHECK: test15:
|
; CHECK: test15:
|
||||||
; CHECK: movhlps %xmm1, %xmm0
|
; CHECK: movhlps %xmm1, %xmm0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; PR8900
|
||||||
|
; CHECK: test16:
|
||||||
|
; CHECK: unpcklpd
|
||||||
|
; CHECK: ret
|
||||||
|
|
||||||
|
define <2 x double> @test16(<4 x double> * nocapture %srcA, <2 x double>* nocapture %dst) {
|
||||||
|
%i5 = getelementptr inbounds <4 x double>* %srcA, i32 3
|
||||||
|
%i6 = load <4 x double>* %i5, align 32
|
||||||
|
%i7 = shufflevector <4 x double> %i6, <4 x double> undef, <2 x i32> <i32 0, i32 2>
|
||||||
|
ret <2 x double> %i7
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user