================
@@ -1087,8 +1087,20 @@ OpenMPIRBuilder::createCancel(const LocationDescription 
&Loc,
   auto *UI = Builder.CreateUnreachable();
 
   Instruction *ThenTI = UI, *ElseTI = nullptr;
-  if (IfCondition)
+  if (IfCondition) {
     SplitBlockAndInsertIfThenElse(IfCondition, UI, &ThenTI, &ElseTI);
+
+    // Even if the if condition evaluates to false, this should count as a
+    // cancellation point
+    Builder.SetInsertPoint(ElseTI);
+    auto ElseIP = Builder.saveIP();
----------------
Meinersbur wrote:

[style] [Don’t “almost always” use 
auto](https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable)

https://github.com/llvm/llvm-project/pull/164587
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to