aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2020-10-01 12:48:07 +0100
committerDavid Sherwood <david.sherwood@arm.com>2020-10-02 07:47:31 +0100
commitb8ce6a67568ba16683a2b1a5e8ebd28d5d537874 (patch)
treec5828b283e4a8de2c8b11c6086e5a7d53ab2e65c /llvm/lib/CodeGen/TargetLoweringBase.cpp
parentafb4e0f289ac6d020faafda078642a3716629abd (diff)
downloadllvm-b8ce6a67568ba16683a2b1a5e8ebd28d5d537874.zip
llvm-b8ce6a67568ba16683a2b1a5e8ebd28d5d537874.tar.gz
llvm-b8ce6a67568ba16683a2b1a5e8ebd28d5d537874.tar.bz2
[SVE][CodeGen] Add new EVT/MVT getFixedSizeInBits() functions
When we know that a particular type is always going to be fixed width we have so far been writing code like this: getSizeInBits().getFixedSize() Since we are doing this in quite a few places now it seems to make sense to add a new helper function that allows us to replace these calls with a single getFixedSizeInBits() call. Differential Revision: https://reviews.llvm.org/D88649
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 84b596b..ead52b8 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -615,7 +615,7 @@ void TargetLoweringBase::initActions() {
std::end(TargetDAGCombineArray), 0);
for (MVT VT : MVT::fp_valuetypes()) {
- MVT IntVT = MVT::getIntegerVT(VT.getSizeInBits().getFixedSize());
+ MVT IntVT = MVT::getIntegerVT(VT.getFixedSizeInBits());
if (IntVT.isValid()) {
setOperationAction(ISD::ATOMIC_SWAP, VT, Promote);
AddPromotedToType(ISD::ATOMIC_SWAP, VT, IntVT);