Skip to content

Commit

Permalink
[llvm][CodeGen] Avoid implicit cast of TypeSize to integer in `initAc…
Browse files Browse the repository at this point in the history
…tions`.

Reviewers: sdesmalen, efriedma

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77317
  • Loading branch information
Francesco Petrogalli committed Apr 6, 2020
1 parent c09acd5 commit 53b7abd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/TargetLoweringBase.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 53b7abd

Please sign in to comment.