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 @@ -3399,8 +3399,8 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
3399
3399
LLT MemTy = MMO.getMemoryType ();
3400
3400
MachineFunction &MF = MIRBuilder.getMF ();
3401
3401
3402
- unsigned MemSizeInBits = MemTy.getSizeInBits ();
3403
- unsigned MemStoreSizeInBits = 8 * MemTy.getSizeInBytes ();
3402
+ TypeSize MemSizeInBits = MemTy.getSizeInBits ();
3403
+ TypeSize MemStoreSizeInBits = MemTy.getSizeInBytes (). multiplyCoefficientBy ( 8 );
3404
3404
3405
3405
if (MemSizeInBits != MemStoreSizeInBits) {
3406
3406
if (MemTy.isVector ())
@@ -3464,7 +3464,7 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
3464
3464
3465
3465
if (!isPowerOf2_32 (MemSizeInBits)) {
3466
3466
// This load needs splitting into power of 2 sized loads.
3467
- LargeSplitSize = llvm::bit_floor (MemSizeInBits);
3467
+ LargeSplitSize = llvm::bit_floor (MemSizeInBits. getKnownMinValue () );
3468
3468
SmallSplitSize = MemSizeInBits - LargeSplitSize;
3469
3469
} else {
3470
3470
// 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