[PATCH] D77317: [llvm][CodeGen] Avoid implicit cast of TypeSize to integer in `initActions`.

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 11:58:52 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG53b7abdd238c: [llvm][CodeGen] Avoid implicit cast of TypeSize to integer in `initActions`. (authored by fpetrogalli).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77317/new/

https://reviews.llvm.org/D77317

Files:
  llvm/lib/CodeGen/TargetLoweringBase.cpp


Index: llvm/lib/CodeGen/TargetLoweringBase.cpp
===================================================================
--- llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -614,7 +614,7 @@
             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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77317.255428.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200406/de4fcaab/attachment.bin>


More information about the llvm-commits mailing list