diff options
author | Philip Reames <preames@rivosinc.com> | 2022-10-31 11:15:48 -0700 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2022-10-31 11:16:14 -0700 |
commit | 93798fb740d342a90c47aa547656bae8dd47d017 (patch) | |
tree | d69b65754b7fdeef3aa0120d3dec24bf5bf95c3e /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 295500d57bbd50f4e374819e0c5777aee2adf7f0 (diff) | |
download | llvm-93798fb740d342a90c47aa547656bae8dd47d017.zip llvm-93798fb740d342a90c47aa547656bae8dd47d017.tar.gz llvm-93798fb740d342a90c47aa547656bae8dd47d017.tar.bz2 |
Address post commit style comment from 087bb0f
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index b137cd2..0606ce7 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -1206,13 +1206,14 @@ static void computeKnownBitsFromOperator(const Operator *I, // Handle cast from vector integer type to scalar or vector integer. auto *SrcVecTy = dyn_cast<FixedVectorType>(SrcTy); if (!SrcVecTy || !SrcVecTy->getElementType()->isIntegerTy() || - !I->getType()->isIntOrIntVectorTy()) + !I->getType()->isIntOrIntVectorTy() || + isa<ScalableVectorType>(I->getType())) break; // Look through a cast from narrow vector elements to wider type. // Examples: v4i32 -> v2i64, v3i8 -> v24 unsigned SubBitWidth = SrcVecTy->getScalarSizeInBits(); - if (BitWidth % SubBitWidth == 0 && !isa<ScalableVectorType>(I->getType())) { + if (BitWidth % SubBitWidth == 0) { // Known bits are automatically intersected across demanded elements of a // vector. So for example, if a bit is computed as known zero, it must be // zero across all demanded elements of the vector. |