x86: preserve flags when folding atomic operations
authorJF Bastien <jfb@google.com>
Thu, 15 Oct 2015 18:24:52 +0000 (18:24 +0000)
committerJF Bastien <jfb@google.com>
Thu, 15 Oct 2015 18:24:52 +0000 (18:24 +0000)
commit4b6405d130b43a12b69805d8fc23aa6c4c1755a5
tree85544dc608d9b26224b01544411daf521bddb8ed
parent8b9371cdcf72e0ae62dfd2a1fb9c84536543fe5f
x86: preserve flags when folding atomic operations

D4796 taught LLVM to fold some atomic integer operations into a single
instruction. The pattern was unaware that the instructions clobbered
flags. I fixed some of this issue in D13680 but had missed INC/DEC.

This patch adds the missing EFLAGS definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250438 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrCompiler.td
test/CodeGen/X86/atomic-flags.ll