[PATCH] D68970: AMDGPU: Fix infinite searches in SIFixSGPRCopies

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 02:37:13 PDT 2019


nhaehnle added a comment.

Thanks for tracking that down. I agree with Stas that SmallSet should be a better choice here. Also some minor comments on the tests, apart from that looks good to me.



================
Comment at: llvm/test/CodeGen/AMDGPU/fix-sgpr-copies.mir:70-73
+registers:
+  - { id: 0, class: sgpr_64 }
+  - { id: 1, class: vreg_64 }
+  - { id: 2, class: sgpr_64 }
----------------
You should be able to remove this and instead write `%2:sgpr_64 = PHI ...` below.


================
Comment at: llvm/test/CodeGen/AMDGPU/fix-sgpr-copies.mir:99-103
+registers:
+  - { id: 0, class: vgpr_32 }
+  - { id: 1, class: sgpr_32 }
+  - { id: 2, class: sgpr_32 }
+  - { id: 3, class: vreg_64 }
----------------
Analogous to above, you should be able to remove this by adding the register class constraints to the defining instruction below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68970





More information about the llvm-commits mailing list