================ @@ -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; ---------------- mahtohappy wrote:
Even I had my doubts about it, but the testcase this issue had seems to give correct results on executions(output) with the changes and from my understanding the changes are correct. I'm hoping the the original author or reviewer will take a look. From my side, I'll try to regenerate all the patterns in the testcase in c file and execute and see if they're giving correct output on execution. https://github.com/llvm/llvm-project/pull/72522 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits