diff options
author | Caroline Concatto <caroline.concatto@arm.com> | 2020-10-16 09:21:28 +0100 |
---|---|---|
committer | Caroline Concatto <caroline.concatto@arm.com> | 2020-10-23 09:15:17 +0100 |
commit | 241563647555e48cfa96146dd19d00e5aadbc518 (patch) | |
tree | d51924961612e635dc04675b42e73e5e4af4774c /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | |
parent | ffc0f577dac7097facc6b3e254c0ff73a723738f (diff) | |
download | llvm-241563647555e48cfa96146dd19d00e5aadbc518.zip llvm-241563647555e48cfa96146dd19d00e5aadbc518.tar.gz llvm-241563647555e48cfa96146dd19d00e5aadbc518.tar.bz2 |
[SVE]Clarify TypeSize comparisons in llvm/lib/Transforms
Use isKnownXY comparators when one of the operands can be with
scalable vectors or getFixedSize() for all the other cases.
This patch also does bug fixes for getPrimitiveSizeInBits by using
getFixedSize() near the places with the TypeSize comparison.
Differential Revision: https://reviews.llvm.org/D89703
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index 74196fb..83d2b6f 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -2020,8 +2020,8 @@ SCEVExpander::replaceCongruentIVs(Loop *L, const DominatorTree *DT, // Put pointers at the back and make sure pointer < pointer = false. if (!LHS->getType()->isIntegerTy() || !RHS->getType()->isIntegerTy()) return RHS->getType()->isIntegerTy() && !LHS->getType()->isIntegerTy(); - return RHS->getType()->getPrimitiveSizeInBits() < - LHS->getType()->getPrimitiveSizeInBits(); + return RHS->getType()->getPrimitiveSizeInBits().getFixedSize() < + LHS->getType()->getPrimitiveSizeInBits().getFixedSize(); }); unsigned NumElim = 0; |