diff options
author | David Sherwood <david.sherwood@arm.com> | 2020-09-29 12:08:40 +0100 |
---|---|---|
committer | David Sherwood <david.sherwood@arm.com> | 2020-10-19 08:30:31 +0100 |
commit | 35a531fb456a5d8f68cf153ca2c35c7170b9b92f (patch) | |
tree | 5e4e49c071900e8d711b08db1e4e2ed3bbd03d1f /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 7579941d8b02af995e152a453da9b9cc0cc205e7 (diff) | |
download | llvm-35a531fb456a5d8f68cf153ca2c35c7170b9b92f.zip llvm-35a531fb456a5d8f68cf153ca2c35c7170b9b92f.tar.gz llvm-35a531fb456a5d8f68cf153ca2c35c7170b9b92f.tar.bz2 |
[SVE][CodeGen][NFC] Replace TypeSize comparison operators with their scalar equivalents
In certain places in llvm/lib/CodeGen we were relying upon the TypeSize
comparison operators when in fact the code was only ever expecting
either scalar values or fixed width vectors. I've changed some of these
places to use the equivalent scalar operator.
Differential Revision: https://reviews.llvm.org/D88482
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index f073416..f7dd4b3 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1301,7 +1301,7 @@ void TargetLoweringBase::computeRegisterProperties( MVT SVT = (MVT::SimpleValueType) nVT; // Promote vectors of integers to vectors with the same number // of elements, with a wider element type. - if (SVT.getScalarSizeInBits() > EltVT.getSizeInBits() && + if (SVT.getScalarSizeInBits() > EltVT.getFixedSizeInBits() && SVT.getVectorElementCount() == EC && isTypeLegal(SVT)) { TransformToType[i] = SVT; RegisterTypeForVT[i] = SVT; |