[PATCH] D15093: Fix the assert in Annotate the loop in SIAnnotateControlFlow pass when the loop terminator condition is a constant.
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 08:59:11 PST 2015
tstellarAMD added inline comments.
================
Comment at: lib/Target/AMDGPU/SIAnnotateControlFlow.cpp:276-278
@@ +275,5 @@
+ // Insert IfBreak before TERM for constant COND.
+ } else if (isa<ConstantInt>(Cond)) {
+ Value *Args[] = { Cond, Broken };
+ return CallInst::Create(IfBreak, Args, "", Term);
+
----------------
Usually getting a branch on constant in the SIAnnotateControlFlow means that there is a bug in the StructurizeCFG pass.
There is no harm in handling this here, but I think it may just be covering over a bug in the structurizer pass.
http://reviews.llvm.org/D15093
More information about the llvm-commits
mailing list