File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
llvm/lib/CodeGen/GlobalISel Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3357,8 +3357,8 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
3357
3357
LLT MemTy = MMO.getMemoryType ();
3358
3358
MachineFunction &MF = MIRBuilder.getMF ();
3359
3359
3360
- unsigned MemSizeInBits = MemTy.getSizeInBits ();
3361
- unsigned MemStoreSizeInBits = 8 * MemTy.getSizeInBytes ();
3360
+ TypeSize MemSizeInBits = MemTy.getSizeInBits ();
3361
+ TypeSize MemStoreSizeInBits = MemTy.getSizeInBytes (). multiplyCoefficientBy ( 8 );
3362
3362
3363
3363
if (MemSizeInBits != MemStoreSizeInBits) {
3364
3364
if (MemTy.isVector ())
@@ -3422,7 +3422,7 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
3422
3422
3423
3423
if (!isPowerOf2_32 (MemSizeInBits)) {
3424
3424
// This load needs splitting into power of 2 sized loads.
3425
- LargeSplitSize = llvm::bit_floor (MemSizeInBits);
3425
+ LargeSplitSize = llvm::bit_floor (MemSizeInBits. getKnownMinValue () );
3426
3426
SmallSplitSize = MemSizeInBits - LargeSplitSize;
3427
3427
} else {
3428
3428
// This is already a power of 2, but we still need to split this in half.
You can’t perform that action at this time.
0 commit comments