[llvm] [NFC][SimplifyCFG] Simplify operators for the combined predicate in `mergeConditionalStoreToAddress` (PR #155058)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 13:28:20 PDT 2025


================
@@ -4418,13 +4420,11 @@ static bool mergeConditionalStoreToAddress(
   IRBuilder<> QB(PostBB, PostBBFirst);
   QB.SetCurrentDebugLocation(PostBBFirst->getStableDebugLoc());
 
-  Value *PPred = PStore->getParent() == PTB ? PCond : QB.CreateNot(PCond);
-  Value *QPred = QStore->getParent() == QTB ? QCond : QB.CreateNot(QCond);
+  InvertPCond = (PStore->getParent() == PTB) ^ InvertPCond;
----------------
mtrofin wrote:

Oh true!

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


More information about the llvm-commits mailing list