[PATCH] D14897: [X86] Fix several issues related to X86's psadbw instruction.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 21 09:51:32 PST 2015


RKSimon added a comment.

In http://reviews.llvm.org/D14897#294583, @congh wrote:

> In http://reviews.llvm.org/D14897#294562, @RKSimon wrote:
>
> > Thanks for looking at this! Any idea why there is so much commutation in the tests?
>
>
> I think probably it is because I marked this operation as commutable?


Ah! I see now - only the int_x86_avx2_psad_bw pattern was marked as commutable.


================
Comment at: lib/Target/X86/X86InstrSSE.td:4096
@@ -4101,1 +4095,3 @@
+defm PSADBW : PDI_binop_rm2<0xF6, "psadbw", X86psadbw, v2i64, v16i8, VR128,
+                            loadv2i64, i128mem, SSE_INTALU_ITINS_P, 1>;
 
----------------
congh wrote:
> RKSimon wrote:
> > Shouldn't loadv2i64 be memopv2i64?
> I just copied the following several lines for VPMULUDQ and replaced some strings. I think they are similar, and I am new to this language. I will update it to memopv2i64 if you think this makes more sense.
I meant just the SSE implementation (PSADBW) - VPSADBWY can use the loadv*i64 refs - that will match (V)PMULUDQ


http://reviews.llvm.org/D14897





More information about the llvm-commits mailing list