[PATCH] D22055: AMDGPU: Fix verifier error with kill intrinsic

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 12:15:01 PDT 2016


arsenm closed this revision.
arsenm added a comment.

r275203


================
Comment at: lib/Target/AMDGPU/SILowerControlFlow.cpp:217
@@ -216,2 +216,3 @@
+  if (MF->getFunction()->getCallingConv() != CallingConv::AMDGPU_PS ||
       !shouldSkip(&MBB, &MBB.getParent()->back()))
     return false;
----------------
nhaehnle wrote:
> I think the first argument to shouldSkip should be the successor MBB.
> 
> That said, shouldSkip itself is a bit broken as a heuristic since it doesn't seem to follow successors itself, so perhaps it makes sense to fix this separately.
Yes, shouldSkip makes no sense as it is. I'm working on shouldSkip separately, moving it to a separate pass so this will all be changing anyway

================
Comment at: lib/Target/AMDGPU/SILowerControlFlow.cpp:235
@@ -231,2 +234,3 @@
 
-  MBB.addSuccessor(RemainderBB);
+  SkipBB->addSuccessor(&*BBInsertPt);
+  MBB.addSuccessor(SkipBB);
----------------
nhaehnle wrote:
> The SkipBB shouldn't have any successors, should it?
I was treating it as a fall through block but I guess it shouldn't need it


http://reviews.llvm.org/D22055





More information about the llvm-commits mailing list