[PATCH] D80485: [DAGCombiner][PowerPC] Remove isMulhCheaperThanMulShift TLI hook. Use isOperationLegalOrCustom directly instead.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 13:16:31 PDT 2020


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/X86/pmulh.ll:492
 ; SSE2-NEXT:    pmulhw %xmm1, %xmm0
+; SSE2-NEXT:    punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
+; SSE2-NEXT:    psrad $16, %xmm2
----------------
I think we were just getting lucky before. The xmm2 source here is in machine IR as undef or implicit_def and its tied to the def. Same for the xmm1 on the punpckhwd instruction.

It was like that in the original code too. The original code managed to get scheduled better, but I think it was just luck with the node numbering in the DAG.

So I'm ok with it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80485/new/

https://reviews.llvm.org/D80485



More information about the llvm-commits mailing list