@@ -441,7 +441,7 @@ SDValue SelectionDAGLegalize::OptimizeFloatStore(StoreSDNode* ST) {
441441 bitcastToAPInt ().zextOrTrunc (32 ),
442442 SDLoc (CFP), MVT::i32 );
443443 return DAG.getStore (Chain, dl, Con, Ptr, ST->getPointerInfo (),
444- ST->getOriginalAlign (), MMOFlags, AAInfo);
444+ ST->getBaseAlign (), MMOFlags, AAInfo);
445445 }
446446
447447 if (CFP->getValueType (0 ) == MVT::f64 &&
@@ -451,7 +451,7 @@ SDValue SelectionDAGLegalize::OptimizeFloatStore(StoreSDNode* ST) {
451451 SDValue Con = DAG.getConstant (CFP->getValueAPF ().bitcastToAPInt ().
452452 zextOrTrunc (64 ), SDLoc (CFP), MVT::i64 );
453453 return DAG.getStore (Chain, dl, Con, Ptr, ST->getPointerInfo (),
454- ST->getOriginalAlign (), MMOFlags, AAInfo);
454+ ST->getBaseAlign (), MMOFlags, AAInfo);
455455 }
456456
457457 if (TLI.isTypeLegal (MVT::i32 ) && !ST->isVolatile ()) {
@@ -465,11 +465,11 @@ SDValue SelectionDAGLegalize::OptimizeFloatStore(StoreSDNode* ST) {
465465 std::swap (Lo, Hi);
466466
467467 Lo = DAG.getStore (Chain, dl, Lo, Ptr, ST->getPointerInfo (),
468- ST->getOriginalAlign (), MMOFlags, AAInfo);
468+ ST->getBaseAlign (), MMOFlags, AAInfo);
469469 Ptr = DAG.getMemBasePlusOffset (Ptr, TypeSize::getFixed (4 ), dl);
470470 Hi = DAG.getStore (Chain, dl, Hi, Ptr,
471471 ST->getPointerInfo ().getWithOffset (4 ),
472- ST->getOriginalAlign (), MMOFlags, AAInfo);
472+ ST->getBaseAlign (), MMOFlags, AAInfo);
473473
474474 return DAG.getNode (ISD::TokenFactor, dl, MVT::Other, Lo, Hi);
475475 }
@@ -525,7 +525,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
525525 " Can only promote stores to same size type" );
526526 Value = DAG.getNode (ISD::BITCAST, dl, NVT, Value);
527527 SDValue Result = DAG.getStore (Chain, dl, Value, Ptr, ST->getPointerInfo (),
528- ST->getOriginalAlign (), MMOFlags, AAInfo);
528+ ST->getBaseAlign (), MMOFlags, AAInfo);
529529 ReplaceNode (SDValue (Node, 0 ), Result);
530530 break ;
531531 }
@@ -548,7 +548,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
548548 Value = DAG.getZeroExtendInReg (Value, dl, StVT);
549549 SDValue Result =
550550 DAG.getTruncStore (Chain, dl, Value, Ptr, ST->getPointerInfo (), NVT,
551- ST->getOriginalAlign (), MMOFlags, AAInfo);
551+ ST->getBaseAlign (), MMOFlags, AAInfo);
552552 ReplaceNode (SDValue (Node, 0 ), Result);
553553 } else if (!StVT.isVector () && !isPowerOf2_64 (StWidth.getFixedValue ())) {
554554 // If not storing a power-of-2 number of bits, expand as two stores.
@@ -571,7 +571,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
571571 // TRUNCSTORE:i24 X -> TRUNCSTORE:i16 X, TRUNCSTORE@+2:i8 (srl X, 16)
572572 // Store the bottom RoundWidth bits.
573573 Lo = DAG.getTruncStore (Chain, dl, Value, Ptr, ST->getPointerInfo (),
574- RoundVT, ST->getOriginalAlign (), MMOFlags, AAInfo);
574+ RoundVT, ST->getBaseAlign (), MMOFlags, AAInfo);
575575
576576 // Store the remaining ExtraWidth bits.
577577 IncrementSize = RoundWidth / 8 ;
@@ -583,7 +583,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
583583 TLI.getShiftAmountTy (Value.getValueType (), DL)));
584584 Hi = DAG.getTruncStore (Chain, dl, Hi, Ptr,
585585 ST->getPointerInfo ().getWithOffset (IncrementSize),
586- ExtraVT, ST->getOriginalAlign (), MMOFlags, AAInfo);
586+ ExtraVT, ST->getBaseAlign (), MMOFlags, AAInfo);
587587 } else {
588588 // Big endian - avoid unaligned stores.
589589 // TRUNCSTORE:i24 X -> TRUNCSTORE:i16 (srl X, 8), TRUNCSTORE@+2:i8 X
@@ -593,7 +593,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
593593 DAG.getConstant (ExtraWidth, dl,
594594 TLI.getShiftAmountTy (Value.getValueType (), DL)));
595595 Hi = DAG.getTruncStore (Chain, dl, Hi, Ptr, ST->getPointerInfo (), RoundVT,
596- ST->getOriginalAlign (), MMOFlags, AAInfo);
596+ ST->getBaseAlign (), MMOFlags, AAInfo);
597597
598598 // Store the remaining ExtraWidth bits.
599599 IncrementSize = RoundWidth / 8 ;
@@ -602,7 +602,7 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
602602 Ptr.getValueType ()));
603603 Lo = DAG.getTruncStore (Chain, dl, Value, Ptr,
604604 ST->getPointerInfo ().getWithOffset (IncrementSize),
605- ExtraVT, ST->getOriginalAlign (), MMOFlags, AAInfo);
605+ ExtraVT, ST->getBaseAlign (), MMOFlags, AAInfo);
606606 }
607607
608608 // The order of the stores doesn't matter.
@@ -638,16 +638,15 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
638638 if (TLI.isTypeLegal (StVT)) {
639639 Value = DAG.getNode (ISD::TRUNCATE, dl, StVT, Value);
640640 Result = DAG.getStore (Chain, dl, Value, Ptr, ST->getPointerInfo (),
641- ST->getOriginalAlign (), MMOFlags, AAInfo);
641+ ST->getBaseAlign (), MMOFlags, AAInfo);
642642 } else {
643643 // The in-memory type isn't legal. Truncate to the type it would promote
644644 // to, and then do a truncstore.
645645 Value = DAG.getNode (ISD::TRUNCATE, dl,
646646 TLI.getTypeToTransformTo (*DAG.getContext (), StVT),
647647 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);
651650 }
652651
653652 ReplaceNode (SDValue (Node, 0 ), Result);
@@ -753,7 +752,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
753752
754753 SDValue Result = DAG.getExtLoad (NewExtType, dl, Node->getValueType (0 ),
755754 Chain, Ptr, LD->getPointerInfo (), NVT,
756- LD->getOriginalAlign (), MMOFlags, AAInfo);
755+ LD->getBaseAlign (), MMOFlags, AAInfo);
757756
758757 Ch = Result.getValue (1 ); // The chain.
759758
@@ -792,7 +791,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
792791 // EXTLOAD:i24 -> ZEXTLOAD:i16 | (shl EXTLOAD@+2:i8, 16)
793792 // Load the bottom RoundWidth bits.
794793 Lo = DAG.getExtLoad (ISD::ZEXTLOAD, dl, Node->getValueType (0 ), Chain, Ptr,
795- LD->getPointerInfo (), RoundVT, LD->getOriginalAlign (),
794+ LD->getPointerInfo (), RoundVT, LD->getBaseAlign (),
796795 MMOFlags, AAInfo);
797796
798797 // Load the remaining ExtraWidth bits.
@@ -801,7 +800,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
801800 DAG.getMemBasePlusOffset (Ptr, TypeSize::getFixed (IncrementSize), dl);
802801 Hi = DAG.getExtLoad (ExtType, dl, Node->getValueType (0 ), Chain, Ptr,
803802 LD->getPointerInfo ().getWithOffset (IncrementSize),
804- ExtraVT, LD->getOriginalAlign (), MMOFlags, AAInfo);
803+ ExtraVT, LD->getBaseAlign (), MMOFlags, AAInfo);
805804
806805 // Build a factor node to remember that this load is independent of
807806 // the other one.
@@ -821,7 +820,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
821820 // EXTLOAD:i24 -> (shl EXTLOAD:i16, 8) | ZEXTLOAD@+2:i8
822821 // Load the top RoundWidth bits.
823822 Hi = DAG.getExtLoad (ExtType, dl, Node->getValueType (0 ), Chain, Ptr,
824- LD->getPointerInfo (), RoundVT, LD->getOriginalAlign (),
823+ LD->getPointerInfo (), RoundVT, LD->getBaseAlign (),
825824 MMOFlags, AAInfo);
826825
827826 // Load the remaining ExtraWidth bits.
@@ -830,7 +829,7 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
830829 DAG.getMemBasePlusOffset (Ptr, TypeSize::getFixed (IncrementSize), dl);
831830 Lo = DAG.getExtLoad (ISD::ZEXTLOAD, dl, Node->getValueType (0 ), Chain, Ptr,
832831 LD->getPointerInfo ().getWithOffset (IncrementSize),
833- ExtraVT, LD->getOriginalAlign (), MMOFlags, AAInfo);
832+ ExtraVT, LD->getBaseAlign (), MMOFlags, AAInfo);
834833
835834 // Build a factor node to remember that this load is independent of
836835 // the other one.
0 commit comments