[llvm] [NFC][ValueTracking] Simplify check in llvm::isBitwiseValue() (PR #65817)
Tyler Lanphear via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 8 15:25:24 PDT 2023
https://github.com/tylanphear created https://github.com/llvm/llvm-project/pull/65817:
Change `!isNonZero()` to `isZero()` for a minor readability improvement.
>From fed74645be52ee260261d50fdc1ae59400863a00 Mon Sep 17 00:00:00 2001
From: Tyler Lanphear <tyler.lanphear at intel.com>
Date: Fri, 8 Sep 2023 15:20:24 -0700
Subject: [PATCH] [NFC][ValueTracking] Simplify check in
llvm::isBitwiseValue().
Change `!isNonZero()` to `isZero()` for a minor readability
improvement.
---
llvm/lib/Analysis/ValueTracking.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 79198b09d310b80..c4153b824c37e0a 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -5315,7 +5315,7 @@ Value *llvm::isBytewiseValue(Value *V, const DataLayout &DL) {
return UndefInt8;
// Return Undef for zero-sized type.
- if (!DL.getTypeStoreSize(V->getType()).isNonZero())
+ if (DL.getTypeStoreSize(V->getType()).isZero())
return UndefInt8;
Constant *C = dyn_cast<Constant>(V);
More information about the llvm-commits
mailing list