[X86] Remove offset of 8 from the call to FuseInst for UNPCKLPDrr folding added in r365287.

This was copy/pasted from above and I forgot to change it. We just
need the default offset of 0 here.

Fixes PR42616.

llvm-svn: 366011
This commit is contained in:
Craig Topper 2019-07-14 04:13:33 +00:00
parent 124cae7d3f
commit 9450b0084a
2 changed files with 12 additions and 1 deletions

View File

@ -4641,7 +4641,7 @@ MachineInstr *X86InstrInfo::foldMemoryOperandCustom(
unsigned RCSize = TRI.getRegSizeInBits(*RC) / 8;
if ((Size == 0 || Size >= 16) && RCSize >= 16 && Align < 16) {
MachineInstr *NewMI =
FuseInst(MF, X86::MOVHPDrm, OpNum, MOs, InsertPt, MI, *this, 8);
FuseInst(MF, X86::MOVHPDrm, OpNum, MOs, InsertPt, MI, *this);
return NewMI;
}
}

View File

@ -0,0 +1,11 @@
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=sse2 | FileCheck %s
define <2 x double> @pr42616(<2 x double> %a0, <2 x double> %a1, <2 x double>* %p) {
;CHECK-LABEL: pr42616
;CHECK: movhpd (%esp), {{%xmm[0-9][0-9]*}} {{.*#+}} 16-byte Folded Reload
%1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"()
%2 = load <2 x double>, <2 x double>* %p, align 1
%3 = shufflevector <2 x double> %a1, <2 x double> %2, <2 x i32> <i32 2, i32 0>
%4 = fadd <2 x double> %a0, %3
ret <2 x double> %4
}