[flang-commits] [llvm] [flang] [clang] [lldb] [libcxx] [openmp] [mlir] [libc] Fix Logical expression used for merged conditional if in FlattenCFG pass (PR #72522)

Matt Arsenault via flang-commits flang-commits at lists.llvm.org
Thu Nov 16 18:47:09 PST 2023


================
@@ -450,9 +450,9 @@ bool FlattenCFGOpt::MergeIfRegion(BasicBlock *BB, IRBuilder<> &Builder) {
     if (!CompareIfRegionBlock(IfTrue1, IfTrue2, SecondEntryBlock))
       return false;
   } else if (IfTrue1 == FirstEntryBlock) {
-    // The then-path is empty, so we must use "and" operation to combine the
+    // The else-path is empty, so we must use "or" operation to combine the
     // conditions.
-    CombineOp = BinaryOperator::And;
+    CombineOp = BinaryOperator::Or;
----------------
arsenm wrote:

Was this really just completely backwards?

https://github.com/llvm/llvm-project/pull/72522


More information about the flang-commits mailing list