fix materialization of one bit constants and global values which are accessed through
authorReed Kotler <rkotler@mips.com>
Thu, 7 Aug 2014 22:09:01 +0000 (22:09 +0000)
committerReed Kotler <rkotler@mips.com>
Thu, 7 Aug 2014 22:09:01 +0000 (22:09 +0000)
commitcf76da912c5aa51df4bdb1e57dec3748e5ec8ff4
tree3384d4aa401f893a6737f157fbf160456d2a6dac
parentaa5b9c0f6f3a99f955fe0ded13d61d7eb4e1a0b5
fix materialization of one bit constants and global values which are accessed through
a base GOT entry.

Summary:
get tip of tree mips fast-isel to pass test-suite

Two bugs were fixed:

1) one bit booleans were treated as 1 bit signed integers and so the literal '1' could become sign extended.
2) mips uses got for pic but in certain cases, as with string constants for example, many items can be referenced from the same got entry and this case was not handled properly.

Test Plan: test-suite

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: mcrosier

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

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