http://llvm.org/bugs/show_bug.cgi?id=9009
Summary: Cannot select X86ISD::MOVLPS for v4:i32
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=6027)
--> (http://llvm.org/bugs/attachment.cgi?id=6027)
Test for movlps failure
In code generation there is missing selection for MOVLPS instruction when 2
sources are VREG and destination is V4I32.
To reproduce it run llc from trunk on attached .ll file.
Attached are bugpoint reduced test.
The fix is rather simple and therefore inlined. Please note that it also
addresses the same problem for movddup.
Index: lib/Target/X86/X86InstrSSE.td
===================================================================
--- lib/Target/X86/X86InstrSSE.td (revision 2546)
+++ lib/Target/X86/X86InstrSSE.td (working copy)
@@ -5963,6 +5963,9 @@
def : Pat<(v4f32 (X86Movlps VR128:$src1, VR128:$src2)),
(MOVSDrr VR128:$src1, (EXTRACT_SUBREG (v4f32 VR128:$src2),
sub_sd))>;
+def : Pat<(v4i32 (X86Movlps VR128:$src1, VR128:$src2)),
+ (MOVSDrr VR128:$src1, (EXTRACT_SUBREG (v4i32 VR128:$src2),
sub_sd))>;
+
// Shuffle with MOVLPD
def : Pat<(v2f64 (X86Movlpd VR128:$src1, (load addr:$src2))),
(MOVLPDrm VR128:$src1, addr:$src2)>;
Index: lib/Target/X86/X86InstrSSE.td
===================================================================
--- lib/Target/X86/X86InstrSSE.td (revision 2546)
+++ lib/Target/X86/X86InstrSSE.td (working copy)
@@ -5904,6 +5904,8 @@
(MOVLHPSrr VR128:$src, VR128:$src)>;
def : Pat<(v4f32 (X86Movddup VR128:$src)),
(MOVLHPSrr VR128:$src, VR128:$src)>;
+def : Pat<(v4i32 (X86Movddup VR128:$src)),
+ (MOVLHPSrr VR128:$src, VR128:$src)>;
def : Pat<(v2f64 (X86Movddup VR128:$src)),
(UNPCKLPDrr VR128:$src, VR128:$src)>;
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs