File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
llvm/lib/CodeGen/SelectionDAG Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9390,8 +9390,7 @@ SDValue DAGCombiner::mergeTruncStores(StoreSDNode *N) {
9390
9390
LLVMContext &Context = *DAG.getContext();
9391
9391
unsigned NumStores = Stores.size();
9392
9392
unsigned WideNumBits = NumStores * NarrowNumBits;
9393
- EVT WideVT = EVT::getIntegerVT(Context, WideNumBits);
9394
- if (WideVT != MVT::i16 && WideVT != MVT::i32 && WideVT != MVT::i64)
9393
+ if (WideNumBits != 16 && WideNumBits != 32 && WideNumBits != 64)
9395
9394
return SDValue();
9396
9395
9397
9396
// Check if all bytes of the source value that we are looking at are stored
@@ -9445,7 +9444,7 @@ SDValue DAGCombiner::mergeTruncStores(StoreSDNode *N) {
9445
9444
SourceValue = WideVal;
9446
9445
9447
9446
// Give up if the source value type is smaller than the store size.
9448
- if (SourceValue.getScalarValueSizeInBits() < WideVT.getScalarSizeInBits() )
9447
+ if (SourceValue.getScalarValueSizeInBits() < WideNumBits )
9449
9448
return SDValue();
9450
9449
}
9451
9450
@@ -9469,6 +9468,8 @@ SDValue DAGCombiner::mergeTruncStores(StoreSDNode *N) {
9469
9468
OffsetMap[Offset] = ByteOffsetFromBase;
9470
9469
}
9471
9470
9471
+ EVT WideVT = EVT::getIntegerVT(Context, WideNumBits);
9472
+
9472
9473
assert(FirstOffset != INT64_MAX && "First byte offset must be set");
9473
9474
assert(FirstStore && "First store must be set");
9474
9475
You can’t perform that action at this time.
0 commit comments