[llvm] [NFC] Apply absorption rule to boolean expression (PR #91540)

Danny Mösch via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 01:19:38 PDT 2024


https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/91540

>From a8e6a0594ae53c6f4772748f0dca9e9cf676f473 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Danny=20M=C3=B6sch?= <danny.moesch at icloud.com>
Date: Wed, 8 May 2024 23:53:14 +0200
Subject: [PATCH] [BOLT][NFC] Apply absorption rule to boolean expression

---
 bolt/include/bolt/Passes/IndirectCallPromotion.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bolt/include/bolt/Passes/IndirectCallPromotion.h b/bolt/include/bolt/Passes/IndirectCallPromotion.h
index adc58d70ec0f4..8ec160b867cf8 100644
--- a/bolt/include/bolt/Passes/IndirectCallPromotion.h
+++ b/bolt/include/bolt/Passes/IndirectCallPromotion.h
@@ -104,7 +104,7 @@ class IndirectCallPromotion : public BinaryFunctionPass {
   struct Location {
     MCSymbol *Sym{nullptr};
     uint64_t Addr{0};
-    bool isValid() const { return Sym || (!Sym && Addr != 0); }
+    bool isValid() const { return Sym || Addr != 0; }
     Location() {}
     explicit Location(MCSymbol *Sym) : Sym(Sym) {}
     explicit Location(uint64_t Addr) : Addr(Addr) {}



More information about the llvm-commits mailing list