1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

4187 Commits

Author SHA1 Message Date
Evan Cheng
e79599dc2d Now capable of rematerializing coalesced live intervals.
llvm-svn: 41061
2007-08-13 23:54:16 +00:00
Dan Gohman
2390ff5060 When x86 addresses matching exceeds its recursion limit, check to
see if the base register is already occupied before assuming it can be
used. This fixes bogus code generation in the accompanying testcase.

llvm-svn: 41049
2007-08-13 20:03:06 +00:00
Chris Lattner
7dfec1ee54 Fix PR1607
llvm-svn: 41048
2007-08-13 18:42:37 +00:00
Chris Lattner
a41b2e2d2f test that the ptr-to-method is succefully eliminated, leaving just the vtable dispatch.
llvm-svn: 41047
2007-08-13 17:17:03 +00:00
Chris Lattner
cab9f1e32b oops, forgot to commit this.
llvm-svn: 41034
2007-08-12 16:55:14 +00:00
Chris Lattner
50f25115cd Transform a load from an undef/zero global into an undef/global even if we
have complex pointer manipulation going on.  This allows us to compile
stuff like this:

__m128i foo(__m128i x){
                static const unsigned int c_0[4] = { 0, 0, 0, 0 };
                __m128i v_Zero = _mm_loadu_si128((__m128i*)c_0);
                x  = _mm_unpacklo_epi8(x,  v_Zero);
                return x;
}

into:

_foo:
        xorps   %xmm1, %xmm1
        punpcklbw       %xmm1, %xmm0
        ret

llvm-svn: 41022
2007-08-11 18:48:48 +00:00
Christopher Lamb
6c79abee5d Fix test so it passes.
llvm-svn: 41012
2007-08-10 22:20:57 +00:00
Christopher Lamb
450f6815b9 Increase efficiency of sign_extend_inreg by using subregisters for truncation. As the README suggests sign_extend_subreg is selected to (sext(trunc)).
llvm-svn: 41010
2007-08-10 21:48:46 +00:00
Christopher Lamb
7196f0d724 Add 2-addr to 3-addr promotion code that allows 32-bit LEA to be used via subregisters when 16-bit LEA is disabled.
llvm-svn: 41007
2007-08-10 21:18:25 +00:00
Dan Gohman
232e8feb40 Add a test script for counting lines. This can be used instead of the
"| grep foo | wc -l | grep 2" idiom used by many tests, so that, for
example, tests don't mistakenly accept a count of 12 when 2 is
expected. Also, the new form is more consice: "| grep foo | count 2".

llvm-svn: 40988
2007-08-10 15:07:05 +00:00
Dan Gohman
f18e94535f Fix EXTRACT_ELEMENT, EXTRACT_SUBVECTOR, and EXTRACT_VECTOR_ELT to
use an intptr ValueType instead of i32 for the index operand in
getCopyToParts.

llvm-svn: 40987
2007-08-10 14:59:38 +00:00
Chris Lattner
3548932573 when we see a unaligned load from an insufficiently aligned global or
alloca, increase the alignment of the load, turning it into an aligned load.

This allows us to compile:

#include <xmmintrin.h>
__m128i foo(__m128i x){
 static const unsigned int c_0[4] = { 0, 0, 0, 0 };
	  __m128i v_Zero = _mm_loadu_si128((__m128i*)c_0);
  x  = _mm_unpacklo_epi8(x,  v_Zero);
  return x;
}

into:

_foo:
	punpcklbw	_c_0.5944, %xmm0
	ret
	.data
	.lcomm	_c_0.5944,16,4		# c_0.5944

instead of:

_foo:
	movdqu	_c_0.5944, %xmm1
	punpcklbw	%xmm1, %xmm0
	ret
	.data
	.lcomm	_c_0.5944,16,2		# c_0.5944

llvm-svn: 40971
2007-08-09 19:05:49 +00:00
Nick Lewycky
8543faa5fe Add reference to problem report.
llvm-svn: 40889
2007-08-07 12:27:03 +00:00
Chris Lattner
da9f76e17a Fix PR1577, a crash on invalid bug.
llvm-svn: 40874
2007-08-06 21:00:37 +00:00
Chandler Carruth
67d3119773 This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
llvm-svn: 40872
2007-08-06 20:57:16 +00:00
Nick Lewycky
34cf98c558 It's safe to fold not of fcmp.
llvm-svn: 40870
2007-08-06 20:04:16 +00:00
Nick Lewycky
9e45c33d84 Fix the dates on these tests. It's not September yet. Thanks Reid!
llvm-svn: 40869
2007-08-06 20:00:11 +00:00
Nick Lewycky
04447caa7b Let scalar-evolution analyze loops with an unsigned comparison for the exit
condition. Fixes 1597.

llvm-svn: 40867
2007-08-06 19:21:00 +00:00
Nick Lewycky
071a2c6a5e Don't assume it's safe to transform a loop just because it's dominated by any
comparison. Fixes bug 1598.

llvm-svn: 40866
2007-08-06 18:33:46 +00:00
Chris Lattner
38cfb16fe2 update for new domtree dump format
llvm-svn: 40857
2007-08-06 06:17:08 +00:00
Chris Lattner
f2a88ac82d allow this to pass on ppc hosts.
llvm-svn: 40846
2007-08-05 18:48:18 +00:00
Chandler Carruth
00e56b0e81 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Dale Johannesen
dda00eb44d Long double, part 1 of N. Support in IR.
llvm-svn: 40774
2007-08-03 01:03:46 +00:00
Dan Gohman
1afde4166e Fix the alignment requirements of several unpck and shuf instructions.
Generalize isPSHUFDMask and add a unary SHUFPD pattern so that SHUFPD's
memory operand alignment can be tested as well, with a fix to avoid
breaking MMX's use of isPSHUFDMask.

llvm-svn: 40756
2007-08-02 21:17:01 +00:00
Chris Lattner
4670f15d73 I don't have time to restore this functionality right now.
llvm-svn: 40743
2007-08-02 17:43:39 +00:00
Chris Lattner
f0f4024c46 Reduced testcase for PR1594
llvm-svn: 40740
2007-08-02 17:11:24 +00:00
Devang Patel
937b07fb5e Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA.

Fix dominance frontier update during loop unswitch. This fixes PR 1589, again

llvm-svn: 40737
2007-08-02 15:25:57 +00:00
Dan Gohman
a599a813d5 Mark the SSE and MMX load instructions that
X86InstrInfo::isReallyTriviallyReMaterializable knows how to handle
with the isReMaterializable flag so that it is given a chance to handle
them. Without hoisting constant-pool loads from loops this isn't very
visible, though it does keep CodeGen/X86/constant-pool-remat-0.ll from
making a copy of the constant pool on the stack.

llvm-svn: 40736
2007-08-02 14:27:55 +00:00
Chris Lattner
0111f62050 Enhance instcombine to be more aggressive about folding casts of
operations of casts.  This implements InstCombine/zext-fold.ll

llvm-svn: 40726
2007-08-02 06:11:14 +00:00
Evan Cheng
5a30bb6d47 Fix test.
llvm-svn: 40721
2007-08-02 05:04:16 +00:00
Chris Lattner
2cacb6cc56 Fix PR1575 and test/Transforms/CondProp/2007-08-01-InvalidRead.ll
llvm-svn: 40720
2007-08-02 04:47:05 +00:00
Christopher Lamb
9a2a58c818 Teach BasicAA about noalias parameter attributes, but do it correctly this time.
llvm-svn: 40711
2007-08-02 01:18:14 +00:00
Reid Spencer
329af05ad3 Make sure these tests pass for the right reasons (verifier error, rather than
failure to assemble).

llvm-svn: 40696
2007-08-01 23:07:36 +00:00
Devang Patel
51c61e730a Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA.

Fix dominance frontier update during loop unswitch. This fixes PR 1589.

llvm-svn: 40695
2007-08-01 22:23:50 +00:00
Evan Cheng
8183a284fd New test. Bogus implicit-def prevented a copy from being coalesced.
llvm-svn: 40690
2007-08-01 20:26:40 +00:00
Lauro Ramos Venancio
699e4b2dec Add a test for the load/store alignment.
llvm-svn: 40687
2007-08-01 20:07:59 +00:00
Lauro Ramos Venancio
1ef30713de Expand unaligned loads/stores when the target doesn't support them. (PR1548)
llvm-svn: 40682
2007-08-01 19:34:21 +00:00
Christopher Lamb
1787c27f13 Clean up C++ restrict test cases and add a test for restrict qualified methods.
llvm-svn: 40681
2007-08-01 18:48:29 +00:00
Chris Lattner
0b930d11c7 these tests aren't xfailed.
llvm-svn: 40680
2007-08-01 18:37:44 +00:00
Chris Lattner
5d3a429915 we're now handling this right :)
llvm-svn: 40675
2007-08-01 17:10:30 +00:00
Owen Anderson
86544141cf Forgot to update these files for the FastDSE changes.
llvm-svn: 40674
2007-08-01 16:53:51 +00:00
Owen Anderson
58e64df595 Rename FastDSE to just DSE.
llvm-svn: 40668
2007-08-01 06:36:51 +00:00
Evan Cheng
7a025bad7a Requires SSE2.
llvm-svn: 40657
2007-08-01 00:10:12 +00:00
Owen Anderson
9c996b3212 Fix a failure I accidentally caused in my last commit by mishandling the
removal of redundant phis.

llvm-svn: 40650
2007-07-31 20:18:28 +00:00
Lauro Ramos Venancio
abf6c6d469 Fix a bug in GetKnownAlignment of packed structs.
llvm-svn: 40649
2007-07-31 20:13:21 +00:00
Dan Gohman
e3464e6bec Change the x86 assembly output to use tab characters to separate the
mnemonics from their operands instead of single spaces. This makes the
assembly output a little more consistent with various other compilers
(f.e. GCC), and slightly easier to read. Also, update the regression
tests accordingly.

llvm-svn: 40648
2007-07-31 20:11:57 +00:00
Owen Anderson
d178c05c62 Fix a misoptimization in aha.
llvm-svn: 40642
2007-07-31 17:43:14 +00:00
Chris Lattner
6a2ec7bcc8 new testcase
llvm-svn: 40636
2007-07-31 16:18:25 +00:00
Christopher Lamb
5487dd14b4 Revert overly aggressive interpretation of noalias
llvm-svn: 40635
2007-07-31 16:18:07 +00:00
Devang Patel
1324500d25 Bunch of tests to check loop passes.
llvm-svn: 40629
2007-07-31 08:04:17 +00:00