[llvm] [SelectionDAG] Use unaligned store to move AVX registers onto stack for `extractelement` (PR #78422)
Danila Malyutin via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 09:08:53 PST 2024
================
@@ -1425,9 +1426,18 @@ SDValue SelectionDAGLegalize::ExpandExtractFromVectorThroughStack(SDValue Op) {
if (!Ch.getNode()) {
// Store the value to a temporary stack slot, then LOAD the returned part.
+ auto &MF = DAG.getMachineFunction();
+ auto &MFI = MF.getFrameInfo();
StackPtr = DAG.CreateStackTemporary(VecVT);
- Ch = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr,
- MachinePointerInfo());
+ int FI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
+ MachinePointerInfo PtrInfo =
+ MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FI);
+
+ MachineMemOperand *StoreMMO =
+ MF.getMachineMemOperand(PtrInfo, MachineMemOperand::MOStore,
----------------
danilaml wrote:
I believe instertelement has similar issue: https://godbolt.org/z/9nov9adeK
https://github.com/llvm/llvm-project/pull/78422
More information about the llvm-commits
mailing list