[llvm][CodeGen] Avoid implicit cast of TypeSize to integer in `initActions`.
authorFrancesco Petrogalli <francesco.petrogalli@arm.com>
Mon, 6 Apr 2020 18:25:17 +0000 (19:25 +0100)
committerFrancesco Petrogalli <francesco.petrogalli@arm.com>
Mon, 6 Apr 2020 18:46:11 +0000 (19:46 +0100)
Reviewers: sdesmalen, efriedma

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77317

llvm/lib/CodeGen/TargetLoweringBase.cpp

index e5caec4..6dc26dd 100644 (file)
@@ -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);