OSDN Git Service

[X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())
authorRobin Morisset <morisset@google.com>
Wed, 8 Oct 2014 19:38:18 +0000 (19:38 +0000)
committerRobin Morisset <morisset@google.com>
Wed, 8 Oct 2014 19:38:18 +0000 (19:38 +0000)
commit48dfa127d7da3b9efa06dc1b89a25f09e927e7e9
tree4cb7c3c6ac2dbbdf6af908ac4ed191fcca9be8d1
parentb5b306e6a9524458844b98bca275cfe834c84cb6
[X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())

Summary:
I had forgotten to check for NotSlowIncDec in the patterns that can generate
inc/dec for the above pattern (added in D4796).
This currently applies to Atom Silvermont, KNL and SKX.

Test Plan: New checks on atomic_mi.ll

Reviewers: jfb, nadav

Subscribers: llvm-commits

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

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