@@ -441,7 +441,7 @@ SDValue SelectionDAGLegalize::OptimizeFloatStore(StoreSDNode* ST) {
441
441
bitcastToAPInt ().zextOrTrunc (32 ),
442
442
SDLoc (CFP), MVT::i32 );
443
443
return DAG.getStore (Chain, dl, Con, Ptr, ST->getPointerInfo (),
444
- ST->getOriginalAlign (), MMOFlags, AAInfo);
444
+ ST->getBaseAlign (), MMOFlags, AAInfo);
445
445
}
446
446
447
447
if (CFP->getValueType (0 ) == MVT::f64 &&
@@ -451,7 +451,7 @@ SDValue SelectionDAGLegalize::OptimizeFloatStore(StoreSDNode* ST) {
451
451
SDValue Con = DAG.getConstant (CFP->getValueAPF ().bitcastToAPInt ().
452
452
zextOrTrunc (64 ), SDLoc (CFP), MVT::i64 );
453
453
return DAG.getStore (Chain, dl, Con, Ptr, ST->getPointerInfo (),
454
- ST->getOriginalAlign (), MMOFlags, AAInfo);
454
+ ST->getBaseAlign (), MMOFlags, AAInfo);
455
455
}
456
456
457
457
if (TLI.isTypeLegal (MVT::i32 ) && !ST->isVolatile ()) {
@@ -465,11 +465,11 @@ SDValue SelectionDAGLegalize::OptimizeFloatStore(StoreSDNode* ST) {
465
465
std::swap (Lo, Hi);
466
466
467
467
Lo = DAG.getStore (Chain, dl, Lo, Ptr, ST->getPointerInfo (),
468
- ST->getOriginalAlign (), MMOFlags, AAInfo);
468
+ ST->getBaseAlign (), MMOFlags, AAInfo);
469
469
Ptr = DAG.getMemBasePlusOffset (Ptr, TypeSize::getFixed (4 ), dl);
470
470
Hi = DAG.getStore (Chain, dl, Hi, Ptr,
471
471
ST->getPointerInfo ().getWithOffset (4 ),
472
- ST->getOriginalAlign (), MMOFlags, AAInfo);
472
+ ST->getBaseAlign (), MMOFlags, AAInfo);
473
473
474
474
return DAG.getNode (ISD::TokenFactor, dl, MVT::Other, Lo, Hi);
475
475
}
@@ -525,7 +525,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
525
525
" Can only promote stores to same size type" );
526
526
Value = DAG.getNode (ISD::BITCAST, dl, NVT, Value);
527
527
SDValue Result = DAG.getStore (Chain, dl, Value, Ptr, ST->getPointerInfo (),
528
- ST->getOriginalAlign (), MMOFlags, AAInfo);
528
+ ST->getBaseAlign (), MMOFlags, AAInfo);
529
529
ReplaceNode (SDValue (Node, 0 ), Result);
530
530
break ;
531
531
}
@@ -548,7 +548,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
548
548
Value = DAG.getZeroExtendInReg (Value, dl, StVT);
549
549
SDValue Result =
550
550
DAG.getTruncStore (Chain, dl, Value, Ptr, ST->getPointerInfo (), NVT,
551
- ST->getOriginalAlign (), MMOFlags, AAInfo);
551
+ ST->getBaseAlign (), MMOFlags, AAInfo);
552
552
ReplaceNode (SDValue (Node, 0 ), Result);
553
553
} else if (!StVT.isVector () && !isPowerOf2_64 (StWidth.getFixedValue ())) {
554
554
// If not storing a power-of-2 number of bits, expand as two stores.
@@ -571,7 +571,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
571
571
// TRUNCSTORE:i24 X -> TRUNCSTORE:i16 X, TRUNCSTORE@+2:i8 (srl X, 16)
572
572
// Store the bottom RoundWidth bits.
573
573
Lo = DAG.getTruncStore (Chain, dl, Value, Ptr, ST->getPointerInfo (),
574
- RoundVT, ST->getOriginalAlign (), MMOFlags, AAInfo);
574
+ RoundVT, ST->getBaseAlign (), MMOFlags, AAInfo);
575
575
576
576
// Store the remaining ExtraWidth bits.
577
577
IncrementSize = RoundWidth / 8 ;
@@ -583,7 +583,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
583
583
TLI.getShiftAmountTy (Value.getValueType (), DL)));
584
584
Hi = DAG.getTruncStore (Chain, dl, Hi, Ptr,
585
585
ST->getPointerInfo ().getWithOffset (IncrementSize),
586
- ExtraVT, ST->getOriginalAlign (), MMOFlags, AAInfo);
586
+ ExtraVT, ST->getBaseAlign (), MMOFlags, AAInfo);
587
587
} else {
588
588
// Big endian - avoid unaligned stores.
589
589
// TRUNCSTORE:i24 X -> TRUNCSTORE:i16 (srl X, 8), TRUNCSTORE@+2:i8 X
@@ -593,7 +593,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
593
593
DAG.getConstant (ExtraWidth, dl,
594
594
TLI.getShiftAmountTy (Value.getValueType (), DL)));
595
595
Hi = DAG.getTruncStore (Chain, dl, Hi, Ptr, ST->getPointerInfo (), RoundVT,
596
- ST->getOriginalAlign (), MMOFlags, AAInfo);
596
+ ST->getBaseAlign (), MMOFlags, AAInfo);
597
597
598
598
// Store the remaining ExtraWidth bits.
599
599
IncrementSize = RoundWidth / 8 ;
@@ -602,7 +602,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
602
602
Ptr.getValueType ()));
603
603
Lo = DAG.getTruncStore (Chain, dl, Value, Ptr,
604
604
ST->getPointerInfo ().getWithOffset (IncrementSize),
605
- ExtraVT, ST->getOriginalAlign (), MMOFlags, AAInfo);
605
+ ExtraVT, ST->getBaseAlign (), MMOFlags, AAInfo);
606
606
}
607
607
608
608
// The order of the stores doesn't matter.
@@ -638,16 +638,15 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
638
638
if (TLI.isTypeLegal (StVT)) {
639
639
Value = DAG.getNode (ISD::TRUNCATE, dl, StVT, Value);
640
640
Result = DAG.getStore (Chain, dl, Value, Ptr, ST->getPointerInfo (),
641
- ST->getOriginalAlign (), MMOFlags, AAInfo);
641
+ ST->getBaseAlign (), MMOFlags, AAInfo);
642
642
} else {
643
643
// The in-memory type isn't legal. Truncate to the type it would promote
644
644
// to, and then do a truncstore.
645
645
Value = DAG.getNode (ISD::TRUNCATE, dl,
646
646
TLI.getTypeToTransformTo (*DAG.getContext (), StVT),
647
647
Value);
648
- Result =
649
- DAG.getTruncStore (Chain, dl, Value, Ptr, ST->getPointerInfo (), StVT,
650
- ST->getOriginalAlign (), MMOFlags, AAInfo);
648
+ Result = DAG.getTruncStore (Chain, dl, Value, Ptr, ST->getPointerInfo (),
649
+ StVT, ST->getBaseAlign (), MMOFlags, AAInfo);
651
650
}
652
651
653
652
ReplaceNode (SDValue (Node, 0 ), Result);
@@ -753,7 +752,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
753
752
754
753
SDValue Result = DAG.getExtLoad (NewExtType, dl, Node->getValueType (0 ),
755
754
Chain, Ptr, LD->getPointerInfo (), NVT,
756
- LD->getOriginalAlign (), MMOFlags, AAInfo);
755
+ LD->getBaseAlign (), MMOFlags, AAInfo);
757
756
758
757
Ch = Result.getValue (1 ); // The chain.
759
758
@@ -792,7 +791,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
792
791
// EXTLOAD:i24 -> ZEXTLOAD:i16 | (shl EXTLOAD@+2:i8, 16)
793
792
// Load the bottom RoundWidth bits.
794
793
Lo = DAG.getExtLoad (ISD::ZEXTLOAD, dl, Node->getValueType (0 ), Chain, Ptr,
795
- LD->getPointerInfo (), RoundVT, LD->getOriginalAlign (),
794
+ LD->getPointerInfo (), RoundVT, LD->getBaseAlign (),
796
795
MMOFlags, AAInfo);
797
796
798
797
// Load the remaining ExtraWidth bits.
@@ -801,7 +800,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
801
800
DAG.getMemBasePlusOffset (Ptr, TypeSize::getFixed (IncrementSize), dl);
802
801
Hi = DAG.getExtLoad (ExtType, dl, Node->getValueType (0 ), Chain, Ptr,
803
802
LD->getPointerInfo ().getWithOffset (IncrementSize),
804
- ExtraVT, LD->getOriginalAlign (), MMOFlags, AAInfo);
803
+ ExtraVT, LD->getBaseAlign (), MMOFlags, AAInfo);
805
804
806
805
// Build a factor node to remember that this load is independent of
807
806
// the other one.
@@ -821,7 +820,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
821
820
// EXTLOAD:i24 -> (shl EXTLOAD:i16, 8) | ZEXTLOAD@+2:i8
822
821
// Load the top RoundWidth bits.
823
822
Hi = DAG.getExtLoad (ExtType, dl, Node->getValueType (0 ), Chain, Ptr,
824
- LD->getPointerInfo (), RoundVT, LD->getOriginalAlign (),
823
+ LD->getPointerInfo (), RoundVT, LD->getBaseAlign (),
825
824
MMOFlags, AAInfo);
826
825
827
826
// Load the remaining ExtraWidth bits.
@@ -830,7 +829,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
830
829
DAG.getMemBasePlusOffset (Ptr, TypeSize::getFixed (IncrementSize), dl);
831
830
Lo = DAG.getExtLoad (ISD::ZEXTLOAD, dl, Node->getValueType (0 ), Chain, Ptr,
832
831
LD->getPointerInfo ().getWithOffset (IncrementSize),
833
- ExtraVT, LD->getOriginalAlign (), MMOFlags, AAInfo);
832
+ ExtraVT, LD->getBaseAlign (), MMOFlags, AAInfo);
834
833
835
834
// Build a factor node to remember that this load is independent of
836
835
// the other one.
0 commit comments