Add load/store functionality
authorReed Kotler <rkotler@mips.com>
Mon, 16 Jun 2014 22:05:47 +0000 (22:05 +0000)
committerReed Kotler <rkotler@mips.com>
Mon, 16 Jun 2014 22:05:47 +0000 (22:05 +0000)
commit8b3a8d6343ae078a881abac4b5be067e74e5739a
treeacee7306f4e007ee9174fcee4a9a8577b8938e47
parent44d2cdcbf35d97b558198efa0861e0d289a657e6
Add load/store functionality

Summary:
This patches allows non conversions like i1=i2; where both are global ints.
In addition, arithmetic and other things start to work since fast-isel will use
existing patterns for non fast-isel from tablegen files where applicable.

In addition i8, i16 will work in this limited context for assignment without the need
for sign extension (zero or signed). It does not matter how i8 or i16 are loaded (zero or sign extended)
since only the 8 or 16 relevant bits are used and clang will ask for sign extension before using them in
arithmetic. This is all made more complete in forthcoming patches.

for example:
  int i, j=1, k=3;

  void foo() {
    i = j + k;
  }

Keep in mind that this pass is not enabled right now and is an experimental pass
It can only be enabled with a hidden option to llvm of -mips-fast-isel.

Test Plan: Run test-suite, loadstore2.ll and I will run some executable tests.

Reviewers: dsanders

Subscribers: mcrosier

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211061 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsFastISel.cpp
test/CodeGen/Mips/Fast-ISel/loadstore2.ll [new file with mode: 0644]