aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorFrancesco Petrogalli <francesco.petrogalli@arm.com>2020-04-06 19:25:17 +0100
committerFrancesco Petrogalli <francesco.petrogalli@arm.com>2020-04-06 19:46:11 +0100
commit53b7abdd238c89346e5516928af675e5ca973124 (patch)
treebd3a068f09f446e7f7b1eec2fc5ab8aaa3cd92fb /llvm/lib/CodeGen/TargetLoweringBase.cpp
parentc09acd5dd1472e73d5c33250ced5b9a805ea8f4a (diff)
downloadllvm-53b7abdd238c89346e5516928af675e5ca973124.zip
llvm-53b7abdd238c89346e5516928af675e5ca973124.tar.gz
llvm-53b7abdd238c89346e5516928af675e5ca973124.tar.bz2
[llvm][CodeGen] Avoid implicit cast of TypeSize to integer in `initActions`.
Reviewers: sdesmalen, efriedma Reviewed By: efriedma Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77317
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 e5caec4..6dc26dd 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -614,7 +614,7 @@ void TargetLoweringBase::initActions() {
std::end(TargetDAGCombineArray), 0);
for (MVT VT : MVT::fp_valuetypes()) {
- MVT IntVT = MVT::getIntegerVT(VT.getSizeInBits());
+ MVT IntVT = MVT::getIntegerVT(VT.getSizeInBits().getFixedSize());
if (IntVT.isValid()) {
setOperationAction(ISD::ATOMIC_SWAP, VT, Promote);
AddPromotedToType(ISD::ATOMIC_SWAP, VT, IntVT);