[llvm] 53b7abd - [llvm][CodeGen] Avoid implicit cast of TypeSize to integer in `initActions`.

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 11:47:16 PDT 2020


Author: Francesco Petrogalli
Date: 2020-04-06T19:46:11+01:00
New Revision: 53b7abdd238c89346e5516928af675e5ca973124

URL: https://github.com/llvm/llvm-project/commit/53b7abdd238c89346e5516928af675e5ca973124
DIFF: https://github.com/llvm/llvm-project/commit/53b7abdd238c89346e5516928af675e5ca973124.diff

LOG: [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

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetLoweringBase.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index e5caec418158..6dc26dd37513 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);


        


More information about the llvm-commits mailing list