[SPARC] Cleanup handling of the Y/ASR registers.
authorJames Y Knight <jyknight@google.com>
Wed, 8 Jul 2015 16:25:12 +0000 (16:25 +0000)
committerJames Y Knight <jyknight@google.com>
Wed, 8 Jul 2015 16:25:12 +0000 (16:25 +0000)
commit8eb1aaac9c0c538d4dfb2cbf61a75cac0c18fcc1
tree5b78ec5fc7cc9fc6dd82250bcea22538659ad604
parentcf8f6a296fd5d40c6fafe655846be08f56720c97
[SPARC] Cleanup handling of the Y/ASR registers.

- Implement copying ASR to/from GPR regs.
- Mark ASRs as non-allocatable, so it won't try to arbitrarily use
  them inappropriately.
- Instead of inserting explicit WRASR/RDASR nodes in the MUL/DIV
  routines, just do normal register copies.
- Also...mark div as using Y, not just writing it.

Added a test case with some code which previously died with an
assertion failure (with -O0), or produced wrong code (otherwise).

(Third time's the charm?)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241686 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Sparc/SparcISelDAGToDAG.cpp
lib/Target/Sparc/SparcInstrInfo.cpp
lib/Target/Sparc/SparcInstrInfo.td
lib/Target/Sparc/SparcRegisterInfo.td
test/CodeGen/SPARC/basictest.ll
test/CodeGen/SPARC/multiple-div.ll [new file with mode: 0644]