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 @@ -3475,8 +3475,8 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
3475
3475
LLT MemTy = MMO.getMemoryType ();
3476
3476
MachineFunction &MF = MIRBuilder.getMF ();
3477
3477
3478
- unsigned MemSizeInBits = MemTy.getSizeInBits ();
3479
- unsigned MemStoreSizeInBits = 8 * MemTy.getSizeInBytes ();
3478
+ TypeSize MemSizeInBits = MemTy.getSizeInBits ();
3479
+ TypeSize MemStoreSizeInBits = MemTy.getSizeInBytes (). multiplyCoefficientBy ( 8 );
3480
3480
3481
3481
if (MemSizeInBits != MemStoreSizeInBits) {
3482
3482
if (MemTy.isVector ())
@@ -3540,7 +3540,7 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerLoad(GAnyLoad &LoadMI) {
3540
3540
3541
3541
if (!isPowerOf2_32 (MemSizeInBits)) {
3542
3542
// This load needs splitting into power of 2 sized loads.
3543
- LargeSplitSize = llvm::bit_floor (MemSizeInBits);
3543
+ LargeSplitSize = llvm::bit_floor (MemSizeInBits. getKnownMinValue () );
3544
3544
SmallSplitSize = MemSizeInBits - LargeSplitSize;
3545
3545
} else {
3546
3546
// 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