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