[llvm-commits] [PATCH] miscompile due to incorrect MOVSS pattern

Tanya Lattner lattner at apple.com
Tue Aug 9 22:52:10 PDT 2011


I believe the following X86 pattern is incorrect:
def : Pat<(X86Movss VR128:$src1,
                    (bc_v4i32 (v2i64 (load addr:$src2)))),
          (MOVLPSrm VR128:$src1, addr:$src2)>;

This matches a MOVSS dag with a MOVLPS instruction. However, MOVSS will replace only the low 32 bits of the register, while the MOVLPS instruction will replace the low 64 bits.

I've added my test case that illustrates the bug and also modified the one that was already present.

Bruno - You seem to have added this pattern, so let me know if this is supposed to use some other instruction. It's not clear what you're trying to achieve with this pattern, so  my patch just removes it.

Thanks,
Tanya

-------------- next part --------------
A non-text attachment was scrubbed...
Name: badMOVSSpat.patch
Type: application/octet-stream
Size: 2463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110809/43f7ec4c/attachment.obj>


More information about the llvm-commits mailing list