-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 9009 |
| Resolution | FIXED |
| Resolved on | Jan 23, 2011 21:43 |
| Version | trunk |
| OS | All |
| Attachments | Test for movlps failure |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
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)>;