[PATCH] D89703: [SVE][ValueTracking] Clarify TypeSize comparisons in llvm/lib/Transforms
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 08:37:05 PDT 2020
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp:2023
return RHS->getType()->isIntegerTy() && !LHS->getType()->isIntegerTy();
- return RHS->getType()->getPrimitiveSizeInBits() <
- LHS->getType()->getPrimitiveSizeInBits();
+ return TypeSize::isKnownLT(RHS->getType()->getPrimitiveSizeInBits(),
+ LHS->getType()->getPrimitiveSizeInBits());
----------------
I think it's safe to use getFixedSize() here instead of TypeSize::isKnownLT because we know from the checks just above that these types must be integer types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89703/new/
https://reviews.llvm.org/D89703
More information about the llvm-commits
mailing list