1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 16:33:37 +01:00
Commit Graph

606 Commits

Author SHA1 Message Date
Dale Johannesen
f9ca7b6094 Change all floating constants that are not exactly
representable to use hex format.

llvm-svn: 41722
2007-09-05 17:50:36 +00:00
Dan Gohman
794fa1f8f7 Convert tests using "| wc -l | grep ..." to use the count script.
llvm-svn: 41097
2007-08-15 13:36:28 +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
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
34cf98c558 It's safe to fold not of fcmp.
llvm-svn: 40870
2007-08-06 20:04:16 +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
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
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
Lauro Ramos Venancio
abf6c6d469 Fix a bug in GetKnownAlignment of packed structs.
llvm-svn: 40649
2007-07-31 20:13:21 +00:00
Chris Lattner
b4bf211c23 This xform isn't safe, removing it.
llvm-svn: 40378
2007-07-21 21:27:27 +00:00
Dan Gohman
87107326f6 Optimize alignment of loads and stores.
llvm-svn: 40102
2007-07-20 16:34:21 +00:00
Chris Lattner
96a035fce7 rename function to avoid llvm-upgrade warning
llvm-svn: 39895
2007-07-16 04:09:00 +00:00
Chris Lattner
f6a91d74e0 Implement shift-simplify.ll:test[45].
First teach instcombine that sign bit checks only demand the 
sign bit, this allows simplify demanded bits to hack on 
expressions better.

Second, teach instcombine that ashr is useless if only the
sign bit is demanded.

llvm-svn: 39880
2007-07-15 20:54:51 +00:00
Chris Lattner
9cb8da1cb8 Implement shift-simplify.ll:test3, turning:
(X << 31) <s 0  --> (X&1) != 0

This happens dozens of times in the CFE.

llvm-svn: 39879
2007-07-15 20:42:37 +00:00
John Criswell
57e5ed4b5a Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Chris Lattner
cbb352b293 new testcase miscompiled by instcombine, reduced from perl
llvm-svn: 37691
2007-06-21 18:09:25 +00:00
Chris Lattner
8ac4acdd56 add vector versions of this test
llvm-svn: 37588
2007-06-15 06:22:32 +00:00
Chris Lattner
85890d8d1d testcase for PR1510
llvm-svn: 37583
2007-06-15 05:57:20 +00:00
Lauro Ramos Venancio
fa558c0028 Add a test for PR1499.
llvm-svn: 37473
2007-06-06 17:10:02 +00:00
Chris Lattner
01212372fa new testcase
llvm-svn: 37255
2007-05-19 06:50:37 +00:00
Chris Lattner
e76dccb73f New testcase that crashes instcombine
llvm-svn: 37056
2007-05-15 00:15:49 +00:00
Chris Lattner
6b1afe375c new testcase that crashes instcombine
llvm-svn: 36983
2007-05-11 05:55:38 +00:00
Chris Lattner
b9b16cbf97 remove an old xfailed test
llvm-svn: 36810
2007-05-05 22:42:02 +00:00
Chris Lattner
cfda811d3c un-xfail this.
llvm-svn: 36808
2007-05-05 22:41:13 +00:00
Chris Lattner
b87e09b424 new testacse for PR1384
llvm-svn: 36774
2007-05-05 01:59:05 +00:00
Chris Lattner
2962e58a4b new testcase
llvm-svn: 36520
2007-04-28 00:54:45 +00:00
Reid Spencer
df17fa8ef9 For PR1319:
Remove && from the end of the lines to prevent tests from throwing run
lines into the background. Also, clean up places where the same command
is run multiple times by using a temporary file.

llvm-svn: 36142
2007-04-16 17:36:08 +00:00
Reid Spencer
cdd728cca2 For PR1319:
Make use of the END. facility on all files > 1K so that we aren't wasting CPU
cycles searching for RUN: lines that we'll never find.

llvm-svn: 36059
2007-04-15 07:38:21 +00:00
Reid Spencer
62f02ddbee Fix this test in a slightly more obvious way.
llvm-svn: 36058
2007-04-15 07:37:04 +00:00
Zhou Sheng
9c1e008fb1 This test case is incorrect. Remove it.
llvm-svn: 36048
2007-04-15 05:59:49 +00:00
Reid Spencer
5f05a7274c Keep lines a reasonable length.
llvm-svn: 36043
2007-04-15 04:54:53 +00:00
Jeff Cohen
bfa3b15332 Patch supplied by gabor.
llvm-svn: 36042
2007-04-15 03:09:23 +00:00
Chris Lattner
55da343f44 new testcase
llvm-svn: 36039
2007-04-15 01:00:37 +00:00
Owen Anderson
4543ee2ff9 XFAIL this for now.
llvm-svn: 36036
2007-04-14 23:57:41 +00:00
Chris Lattner
3aad941557 new testcase
llvm-svn: 36024
2007-04-14 23:00:51 +00:00
Reid Spencer
cfa86314dd Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.

llvm-svn: 36022
2007-04-14 22:51:29 +00:00
Chris Lattner
89b4e282d6 manually upgrade test. Add a new test2. I have no way to see if this works
because of the tclification.  :(

llvm-svn: 36019
2007-04-14 22:27:33 +00:00
Reid Spencer
8b3b77e30c This test should have been updated with llvm 1.7!
llvm-svn: 36014
2007-04-14 20:21:37 +00:00
Reid Spencer
c49d7dd886 For PR1319:
Upgrade tests to work with new llvm.exp version of llvm_runtest.

llvm-svn: 36013
2007-04-14 20:13:02 +00:00
Reid Spencer
c3793d33d1 This test needs to use egrep.
llvm-svn: 36012
2007-04-14 20:02:51 +00:00
Reid Spencer
1b945f943e Fix a test test llvm.exp found.
llvm-svn: 36006
2007-04-14 18:33:31 +00:00
Reid Spencer
42b10c8238 bool -> i1 (found by llvm.exp)
llvm-svn: 36005
2007-04-14 18:30:06 +00:00
Reid Spencer
78a3955c01 Fix a syntax error that llvm.exp found.
llvm-svn: 36004
2007-04-14 18:28:16 +00:00
Reid Spencer
c8edc6280f Fix an "already-upgraded" test that llvm.exp found.
llvm-svn: 36003
2007-04-14 18:26:02 +00:00
Chris Lattner
1d90754cf7 testcase for PR1201
llvm-svn: 35980
2007-04-14 00:19:36 +00:00
Reid Spencer
56b310ae49 Make the llvm-runtest function much more amenable by eliminating all the
global variables that needed to be passed in. This makes it possible to
add new global variables with only a couple changes (Makefile and llvm-dg.exp)
instead of touching every single dg.exp file.

llvm-svn: 35918
2007-04-11 19:56:59 +00:00
Chris Lattner
ec844dd102 adjust test
llvm-svn: 35907
2007-04-11 16:04:04 +00:00
Chris Lattner
0a1e870a6b sext of compares.
llvm-svn: 35892
2007-04-11 06:57:54 +00:00
Chris Lattner
3ea6010b67 new testcase
llvm-svn: 35889
2007-04-11 06:52:24 +00:00
Chris Lattner
5d7cf88b9a new testcase
llvm-svn: 35851
2007-04-09 23:51:49 +00:00
Chris Lattner
34065e8986 new testcase for PR1304
llvm-svn: 35791
2007-04-09 01:37:35 +00:00
Chris Lattner
4fd4438601 new testcase for PR1286
llvm-svn: 35787
2007-04-09 01:10:13 +00:00
Chris Lattner
ebcaddce4b this xform is correct, not an xfail
llvm-svn: 35766
2007-04-08 08:02:39 +00:00
Chris Lattner
3146667442 tweak this to test the right thing.
llvm-svn: 35762
2007-04-08 07:52:40 +00:00
Chris Lattner
769c8c5bc7 new testcase, should simplify down to a xor/and/xor sequence.
llvm-svn: 35759
2007-04-08 07:45:36 +00:00
Chris Lattner
d76ec48916 new testcase, update old one.
llvm-svn: 35699
2007-04-06 18:56:54 +00:00
Jeff Cohen
a42a5cc03c Any add is wrong, regardless of type.
llvm-svn: 35671
2007-04-04 20:40:44 +00:00
Jeff Cohen
20800076a6 Get it right...
llvm-svn: 35670
2007-04-04 20:35:31 +00:00
Dale Johannesen
66c0a2b9e6 Test for transformConstExprCastCall fix.
llvm-svn: 35669
2007-04-04 19:18:16 +00:00
Jeff Cohen
bf47c569c7 Add new test.
llvm-svn: 35664
2007-04-04 16:11:23 +00:00
Chris Lattner
2083adbfb8 new testcase for PR1253
llvm-svn: 35611
2007-04-03 01:45:32 +00:00
Chris Lattner
d4258ba56c fix this testcase so it passes
llvm-svn: 35604
2007-04-02 20:46:28 +00:00
Chris Lattner
095caddb5e creative way to add one.
llvm-svn: 35583
2007-04-02 05:35:08 +00:00
Reid Spencer
09cacde5c5 Fix illegal assembly syntax.
llvm-svn: 35581
2007-04-02 03:24:47 +00:00
Reid Spencer
ff0b24925c Add a test case to make sure that constant folding of the bit counting
intrinsics works.

llvm-svn: 35577
2007-04-02 01:45:31 +00:00
Reid Spencer
81c0ac434f Revert the name changes for llvm.bswap to allow (and test) llvm-upgrade of
this intrinsic.

llvm-svn: 35566
2007-04-02 00:51:15 +00:00
Reid Spencer
f5e95d339f For PR1297:
Update these test cases to use proper signatures for bswap which is now
and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32
since both the parameter and the result or of type "iAny". Also, the
bit counting intrinsics changed to always return i32.

llvm-svn: 35548
2007-04-01 07:36:28 +00:00
Chris Lattner
f8977023f4 New testcase
llvm-svn: 35535
2007-04-01 05:34:53 +00:00
Reid Spencer
50ee6b8557 Remove use of implementation keyword.
llvm-svn: 35412
2007-03-28 02:38:26 +00:00
Chris Lattner
648d359fae don't use 'not' when we can use a positive test
llvm-svn: 35402
2007-03-28 01:43:43 +00:00
Reid Spencer
f7af7d74e6 new test case for PR1280
llvm-svn: 35401
2007-03-28 01:43:35 +00:00
Reid Spencer
f1f6ade2b5 For PR1280:
Remove test cases for and/xor/add -> trunc/sext that use bit widths that
the targets cannot code gen.

llvm-svn: 35399
2007-03-28 01:35:28 +00:00
Reid Spencer
9d912513d1 Another test case for PR1271 where bad shift masks were generated.
llvm-svn: 35372
2007-03-26 23:48:52 +00:00
Reid Spencer
5bc306e0ea Fix this test case to match output after a bug was fixed.
llvm-svn: 35359
2007-03-26 18:04:38 +00:00
Duncan Sands
c0e64ed143 Fix testsuite hang.
llvm-svn: 35355
2007-03-26 10:59:13 +00:00
Reid Spencer
e2ada5822c Test case for PR1271 involving construction of a bad mask to replace a
shift instruction.

llvm-svn: 35349
2007-03-26 05:32:16 +00:00
Reid Spencer
c48255bfcf Add a test case for PR1271 (necessary, but not sufficient).
llvm-svn: 35343
2007-03-25 21:30:41 +00:00
Chris Lattner
c5657ac790 new testcase
llvm-svn: 35340
2007-03-25 20:42:40 +00:00
Reid Spencer
4887aba89f Remove the last vestiges of this directory.
llvm-svn: 35309
2007-03-24 23:07:49 +00:00
Reid Spencer
a450c790e7 Add more test cases for APIntified InstCombine.
llvm-svn: 35288
2007-03-23 21:57:47 +00:00
Reid Spencer
eebf90ce0b Add test case for testing InstCombine with arbitrary precision integer
types. These tests mimic the integer test cases in the normal InstCombine
test suite but use "strange" integer bit widths.

Most tests written by Zhou Sheng, a few by me.

llvm-svn: 35284
2007-03-23 20:48:34 +00:00
Reid Spencer
91c2777f40 Make this test actually match the generated code.
llvm-svn: 35263
2007-03-22 02:53:05 +00:00
Reid Spencer
8862d80d67 Test case for PR1248
llvm-svn: 35251
2007-03-22 00:49:40 +00:00
Reid Spencer
923f6b31d4 Make this test a little simpler/faster.
llvm-svn: 35193
2007-03-19 23:36:19 +00:00
Reid Spencer
86f1c2f59d Add test case for PR1261, currently XFAILed.
llvm-svn: 35192
2007-03-19 23:28:16 +00:00
Chris Lattner
6d1afd847e new testcase
llvm-svn: 35144
2007-03-18 22:50:57 +00:00
Chris Lattner
0f75a6cc7f testcase for PR1244
llvm-svn: 35081
2007-03-13 14:25:35 +00:00
Reid Spencer
649c1d51a2 Add a test case for a particular udiv/select transform.
llvm-svn: 34935
2007-03-05 22:51:08 +00:00
Chris Lattner
f05abaca7c new testcase
llvm-svn: 34918
2007-03-05 00:01:38 +00:00
Chris Lattner
e1179e62fb new testcase: instcombine should remove all the casts.
llvm-svn: 34869
2007-03-03 05:24:06 +00:00
Chris Lattner
a167e8f27b instcombine doesn't do CSE, simplify unrelated detail
llvm-svn: 34867
2007-03-03 02:27:02 +00:00
Chris Lattner
f222a6e498 testcase for pr1217
llvm-svn: 34545
2007-02-24 01:03:11 +00:00
Chris Lattner
1d2922dbb4 fix this testcase
llvm-svn: 34530
2007-02-23 19:39:24 +00:00
Andrew Lenharth
72869dad9c missed cast elimination
llvm-svn: 34490
2007-02-22 15:17:45 +00:00
Chris Lattner
1abc8d2f00 update to new t-d strings.
llvm-svn: 34290
2007-02-15 00:54:16 +00:00
Andrew Lenharth
9e5f0274d8 This really only affects pointers in high memory, and only llvm 1.9, but make a regression for it anyway
llvm-svn: 34014
2007-02-07 22:23:47 +00:00
Reid Spencer
1b85bb46ae Prepare for PR411
llvm-svn: 33865
2007-02-04 02:11:13 +00:00
Reid Spencer
591bfa1e0b Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Chris Lattner
49d3308f43 new testcase for serious code pessimization
llvm-svn: 33770
2007-02-01 22:29:26 +00:00
Reid Spencer
82293f34de For PR411:
Update these tests to not use the same name even though the type of the
value differs. After PR411 hits, type planes will be gone and it will be
illegal for a name to be used twice, regardless of type.

llvm-svn: 33660
2007-01-30 16:16:01 +00:00
Chris Lattner
1c1eaa542d Testcase for an instcombine miscompilation reduced by Anton.
llvm-svn: 33590
2007-01-27 23:07:12 +00:00
Reid Spencer
6a31ec1259 For PR761:
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.

For PR645:
Make global names use the @ prefix.

For llvm-upgrade changes:
Fix test cases or completely remove use of llvm-upgrade for test cases
that cannot survive the new renaming or upgrade capabilities.

llvm-svn: 33533
2007-01-26 08:25:06 +00:00
Chris Lattner
f457b999c7 new testcase that causes instcombine to infinitely loop
llvm-svn: 33342
2007-01-18 22:16:03 +00:00
Reid Spencer
4572ce85b0 Regression is gone, don't try to find it on clean target.
llvm-svn: 33296
2007-01-17 07:59:14 +00:00