Skip to content

Commit 9028c03

Browse files
committed
[X86] Fix the Predicates on MMX_PSHUFWri/PSHUFWmi to include SSE1 in addition to MMX.
These instructions weren't in the initial version of MMX, but were added when SSE1 was introduced. We already have the intrinsic named correctly to include sse and the frontened header enforces sse. We have one place in the backend where we DAG combine to this intrinsic, but that's also qualified. So don't know of anything currently broken unless someone writes their own IR and doesn't set the sse feature.
1 parent e1de2b7 commit 9028c03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/X86/X86InstrMMX.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ defm MMX_PACKUSWB : MMXI_binop_rm_int<0x67, "packuswb", int_x86_mmx_packuswb,
472472
defm MMX_PSHUFB : SS3I_binop_rm_int_mm<0x00, "pshufb", int_x86_ssse3_pshuf_b,
473473
SchedWriteVarShuffle.MMX>;
474474

475+
let Predicates = [HasMMX, HasSSE1] in {
475476
def MMX_PSHUFWri : MMXIi8<0x70, MRMSrcReg,
476477
(outs VR64:$dst), (ins VR64:$src1, u8imm:$src2),
477478
"pshufw\t{$src2, $src1, $dst|$dst, $src1, $src2}",
@@ -485,6 +486,7 @@ def MMX_PSHUFWmi : MMXIi8<0x70, MRMSrcMem,
485486
(int_x86_sse_pshuf_w (load_mmx addr:$src1),
486487
timm:$src2))]>,
487488
Sched<[SchedWriteShuffle.MMX.Folded]>;
489+
}
488490

489491
// -- Conversion Instructions
490492
defm MMX_CVTPS2PI : sse12_cvt_pint<0x2D, VR128, VR64, int_x86_sse_cvtps2pi,

0 commit comments

Comments
 (0)