[PATCH] D30827: [mips][msa] Disable commutativity for dpadd_[su].df instructions

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 06:18:58 PDT 2017


sdardis added a comment.

Hi, this patch is technically correct but it misses the case that the second and third operands to dpadd_(s|u).[hwd] are commutable.

Unfortunately, the instruction definition has the typical tied format of (set MSA128DOpnd:$wd, (int_mips_dpadd_s_d MSA128DOpnd:$wd_in, MSA128WOpnd:$ws, MSA128WOpnd:$wt). The two address pass commutes the $wd_in and $ws.

Rather than removing the isCommutable class from those instructions, can you have a look at implementing TargetInstrInfo::commuteInstructionImpl for MIPS and handling these cases there?

Thanks,
Simon


https://reviews.llvm.org/D30827





More information about the llvm-commits mailing list