For X86, change load/dec-or-inc/store into dec-or-inc, respectively.
authorJoel Jones <joel_k_jones@apple.com>
Thu, 29 Mar 2012 00:37:47 +0000 (00:37 +0000)
committerJoel Jones <joel_k_jones@apple.com>
Thu, 29 Mar 2012 00:37:47 +0000 (00:37 +0000)
commitc367a3eb7376c37c50f0313063481f5b5bb04f04
treeea288f4fe59fe7912bdae5557bb2d607a29e5c36
parent8b4c502098d8a8aee52f2251db5614d9d26c83e2
For X86, change load/dec-or-inc/store into dec-or-inc, respectively.

This is a code change to add support for changing instruction sequences of the form:

  load
  inc/dec of 8/16/32/64 bits
  store

into the appropriate X86 inc/dec through memory instruction:

  inc[qlwb] / dec[qlwb]

The checks that were in X86DAGToDAGISel::Select(SDNode *Node)>>ISD::STORE have been extracted to isLoadIncOrDecStore and reworked to use the better
named wrappers for getOperand(unsigned) (e.g. getOffset()) and replaced Chain.getNode() with LoadNode.  The comments have also been expanded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153617 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
test/CodeGen/X86/dec-eflags-lower.ll [deleted file]
test/CodeGen/X86/rd-mod-wr-eflags.ll [new file with mode: 0644]