[llvm] [SelectionDAG] Use unaligned store to move AVX registers onto stack for `extractelement` (PR #78422)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 07:37:00 PST 2024


================
@@ -1377,6 +1378,20 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
   }
 }
 
+// Helper function that generates an MMO that considers the alignment of the
+// stack, and the size of the stack object
+static MachineMemOperand *getStackAlignedMMO(SDValue StackPtr,
+                                             MachineFunction &MF) {
+  auto &MFI = MF.getFrameInfo();
+  int FI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
----------------
RKSimon wrote:

`int FI = cast<FrameIndexSDNode>(StackPtr)->getIndex();`

https://github.com/llvm/llvm-project/pull/78422


More information about the llvm-commits mailing list