[llvm] 1029fd0 - [NFC][ValueTracking] Simplify check in llvm::isBitwiseValue() (#65817)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 8 17:24:08 PDT 2023
Author: Tyler Lanphear
Date: 2023-09-08T17:24:04-07:00
New Revision: 1029fd028c193bce89e80d25128ffd78df5b6178
URL: https://github.com/llvm/llvm-project/commit/1029fd028c193bce89e80d25128ffd78df5b6178
DIFF: https://github.com/llvm/llvm-project/commit/1029fd028c193bce89e80d25128ffd78df5b6178.diff
LOG: [NFC][ValueTracking] Simplify check in llvm::isBitwiseValue() (#65817)
Change `!isNonZero()` to `isZero()` for a minor readability improvement.
Added:
Modified:
llvm/lib/Analysis/ValueTracking.cpp
Removed:
################################################################################
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