[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
Thu Apr 2 09:44:20 PDT 2020
fpetrogalli created this revision.
fpetrogalli added reviewers: sdesmalen, efriedma.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
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,9 @@
std::end(TargetDAGCombineArray), 0);
for (MVT VT : MVT::fp_valuetypes()) {
- MVT IntVT = MVT::getIntegerVT(VT.getSizeInBits());
+ TypeSize TS = VT.getSizeInBits();
+ assert(!TS.isScalable() && "Invalid TypeSize");
+ 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.254543.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200402/5b6c6da2/attachment.bin>
More information about the llvm-commits
mailing list