[PATCH] D31350: AMDGPU : Fix common dominator of two incoming blocks terminates with uniform branch issue.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 18:34:13 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:393
+                                                        N->getIDom()->getBlock();
+          if (IPostDom != NULL) {
+            for (auto I = IPostDom->getBasicBlock()->begin(); isa<PHINode>(I); ++I) {
----------------
rampitec wrote:
> Please use nullptr instead of NULL.
if (IPostDom)


================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:395
+            for (auto I = IPostDom->getBasicBlock()->begin(); isa<PHINode>(I); ++I) {
+              if (!cast<PHINode>(I)->hasConstantValue()) {
+                DEBUG(dbgs() << "Not fixing PHI for uniform branch: " << MI << '\n');
----------------
This isn't going to do anything. PHINodes are IR constructs


Repository:
  rL LLVM

https://reviews.llvm.org/D31350





More information about the llvm-commits mailing list