x86-32: PUSHF/POPF use/def EFLAGS
authorJF Bastien <jfb@google.com>
Tue, 16 Dec 2014 20:15:45 +0000 (20:15 +0000)
committerJF Bastien <jfb@google.com>
Tue, 16 Dec 2014 20:15:45 +0000 (20:15 +0000)
commit50b88354512d8a6e2f0ab1b746e1a6811f147d19
tree974ba3b3f4e3674bfc61f11e2abc19a8bcf925ef
parent192487e3799d3db4b2d5f0770246f60f65cebaa3
x86-32: PUSHF/POPF use/def EFLAGS

Summary: As a side-quest for D6629 jvoung pointed out that I should use -verify-machineinstrs and this found a bug in x86-32's handling of EFLAGS for PUSHF/POPF. This patch fixes the use/def, and adds -verify-machineinstrs to all x86 tests which contain 'EFLAGS'. One exception: this patch leaves inline-asm-fpstack.ll as-is because it fails -verify-machineinstrs in a way unrelated to EFLAGS. This patch also modifies cmpxchg-clobber-flags.ll along the lines of what D6629 already does by also testing i386.

Test Plan: ninja check

Reviewers: t.p.northover, jvoung

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6687

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224359 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
lib/Target/X86/X86InstrInfo.td
test/CodeGen/X86/2012-01-16-mfence-nosse-flags.ll
test/CodeGen/X86/clobber-fi0.ll
test/CodeGen/X86/cmov.ll
test/CodeGen/X86/cmpxchg-clobber-flags.ll
test/CodeGen/X86/coalescer-dce.ll
test/CodeGen/X86/misched-copy.ll
test/CodeGen/X86/misched-crash.ll
test/CodeGen/X86/norex-subreg.ll
test/CodeGen/X86/peep-test-2.ll
test/CodeGen/X86/phys_subreg_coalesce-3.ll
test/CodeGen/X86/pre-ra-sched.ll
test/CodeGen/X86/remat-phys-dead.ll
test/CodeGen/X86/sink-hoist.ll
test/CodeGen/X86/vaargs.ll