[X86][VARARG] Assign MMO earlier to avoid prolog insert point been sunk across VASTAR...
authorPhoebe Wang <pengfei.wang@intel.com>
Wed, 3 Nov 2021 01:29:52 +0000 (09:29 +0800)
committerPhoebe Wang <pengfei.wang@intel.com>
Wed, 3 Nov 2021 02:13:32 +0000 (10:13 +0800)
commit8f101971b6d54e2fc470e853e413fd01cfff20b5
tree76cb92ba9b1e930fd1c40cfbf4dfffe3ea05241a
parent5cbec88cbf1c8d06030b84ebf17f5eebc3e3f1f9
[X86][VARARG] Assign MMO earlier to avoid prolog insert point been sunk across VASTART_SAVE_XMM_REGS

The changes in D80163 defered the assignment of MachineMemOperand (MMO)
until the X86ExpandPseudo pass. This will result in crash due to prolog
insert point been sunk across the pseudo instruction VASTART_SAVE_XMM_REGS.

Moving the assignment to the creation of the node can avoid the problem.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D112859
llvm/lib/Target/X86/X86ExpandPseudo.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/lib/Target/X86/X86InstrInfo.td
llvm/test/CodeGen/X86/vaargs-prolog-insert.ll