[PATCH] D82551: [AMDGPU] Don't combine DPP if DPP register is used more than once per instruction

Valery Pykhtin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 03:46:02 PDT 2020


vpykhtin marked an inline comment as done.
vpykhtin added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp:517-520
+
+    if (Src0 && Src1 && Src0->isReg() && Src1->isReg() &&
+        Src0->getReg() == Src1->getReg() &&
+        Src0->getSubReg() == Src1->getSubReg()) {
----------------
foad wrote:
> This looks technically OK now. I still think it would be cleaner to structure the code as:
> ```
> if (Use == Src0) {
>   // do it
> } else if (Use == Src1 && commutable && Src0 not identical to Src1) {
>   // commute and do it
> } else {
>   // fail
> }
> ```
> But I'll leave that up to your judgement.
I think currently we have better debug messages.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82551





More information about the llvm-commits mailing list