From: Francesco Petrogalli Date: Mon, 6 Apr 2020 18:25:17 +0000 (+0100) Subject: [llvm][CodeGen] Avoid implicit cast of TypeSize to integer in `initActions`. X-Git-Tag: llvmorg-12-init~9896 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53b7abdd238c89346e5516928af675e5ca973124;p=platform%2Fupstream%2Fllvm.git [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 --- 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);