Revert "Revert "Mark vastart_save_xmm_regs as changing EFLAGS""
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 17 Dec 2013 15:54:45 +0000 (15:54 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 17 Dec 2013 15:54:45 +0000 (15:54 +0000)
commitc69e3920ddc1a15cbfecd689ba5f2404c1de5268
tree5404e1d6f0dab48810e5c27d67a632c2db43228d
parentce6d31427fa8478917bbd9c57bf1968908c87b94
Revert "Revert "Mark vastart_save_xmm_regs as changing EFLAGS""

This reverts commit r197481, recommiting r197469 with an extra fix.

The vastart_save_xmm_regs pseudo-instruction expands to a test and a
branch, so it modifies EFLAGS.  Mark it so, or else the scheduler might
place it in the middle of another test+branch.

This fixes a bug exposed by r192750, which changed the initial scheduler
to source-order as part of enabling the MI Scheduler for X86.

This re-commit changes the VASTART_SAVE_XMM_REGS custom inserter not to
try to save %flags, and adds a test that catches the bad behavior of
r197469.

<rdar://problem/15627766>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197503 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrCompiler.td
test/CodeGen/X86/vaargs.ll [new file with mode: 0644]
test/CodeGen/X86/vastart-defs-eflags.ll [new file with mode: 0644]