Merging r259840 on top of r259178:
authorHans Wennborg <hans@hanshq.net>
Fri, 5 Feb 2016 00:55:39 +0000 (00:55 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 5 Feb 2016 00:55:39 +0000 (00:55 +0000)
commit9be4dc8ab20a009ed5f24610888421ba84f8ec65
tree5ae5380ddf3811365e905446752e91cf34cafa1d
parent12d60e9e7c149a7d333e277dfbe25a720c88c585
Merging r259840 on top of r259178:

------------------------------------------------------------------------
r259178 | echristo | 2016-01-28 23:20:30 -0800 (Thu, 28 Jan 2016) | 1 line

Refactor common code for PPC fast isel load immediate selection.
------------------------------------------------------------------------

------------------------------------------------------------------------
r259840 | nemanjai | 2016-02-04 15:14:42 -0800 (Thu, 04 Feb 2016) | 7 lines

Fix for PR 26356

Using the load immediate only when the immediate (whether signed or unsigned)
can fit in a 16-bit signed field. Namely, from -32768 to 32767 for signed and
0 to 65535 for unsigned. This patch also ensures that we sign-extend under the
right conditions.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259858 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFastISel.cpp
test/CodeGen/PowerPC/pr26356.ll [new file with mode: 0644]