[PATCH] D31000: AMDGPU: Fix handling of constant phi input loop conditions

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 14:24:38 PDT 2017


cfang added inline comments.


================
Comment at: lib/Target/AMDGPU/SIAnnotateControlFlow.cpp:298
+  if (isa<Constant>(Cond)) {
+    Instruction *Insert = Cond == BoolTrue ?
+      Term : L->getHeader()->getTerminator();
----------------
Do you think for all constant "Cond" cases, the if.break intrinsics should be inserted to loop header? Not just Cond==BoolTrue? 

Initially, we insert in the TERM just to resolve an unhandled assert!   


https://reviews.llvm.org/D31000





More information about the llvm-commits mailing list