Chris Lattner [Tue, 4 Apr 2006 17:21:22 +0000 (17:21 +0000)]
Move isShuffleLegal from TLI to Legalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27398
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 4 Apr 2006 17:20:45 +0000 (17:20 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27397
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 4 Apr 2006 06:11:42 +0000 (06:11 +0000)]
Signed shr by a constant is not the same as sdiv by 2^k
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27395
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 4 Apr 2006 03:04:07 +0000 (03:04 +0000)]
cmpps / cmppd encoding bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27393
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 4 Apr 2006 01:40:06 +0000 (01:40 +0000)]
Fix the types for these intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27392
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 4 Apr 2006 01:02:22 +0000 (01:02 +0000)]
Constant fold bitconvert(undef)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27391
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 4 Apr 2006 00:25:10 +0000 (00:25 +0000)]
Allow targets to have fine grained control over which types various ops get
promoted to, if they desire.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27389
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 4 Apr 2006 00:10:53 +0000 (00:10 +0000)]
Compact some intrinsic definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27388
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 4 Apr 2006 00:05:13 +0000 (00:05 +0000)]
Plug in the byte and short splats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27387
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 23:58:04 +0000 (23:58 +0000)]
Revert accidentally committed hunks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27386
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 23:55:43 +0000 (23:55 +0000)]
Make sure to mark unsupported SCALAR_TO_VECTOR operations as expand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27385
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 3 Apr 2006 23:49:17 +0000 (23:49 +0000)]
Some SSE1 intrinsics: min, max, sqrt, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27384
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 23:14:49 +0000 (23:14 +0000)]
revert previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27383
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 3 Apr 2006 22:30:54 +0000 (22:30 +0000)]
Use movlpd to: store lower f64 extracted from v2f64.
Use movhpd to: store upper f64 extracted from v2f64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27382
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 22:03:29 +0000 (22:03 +0000)]
Force use of a frame-pointer if there is anything on the stack that is aligned
more than the OS keeps the stack aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27381
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 21:39:57 +0000 (21:39 +0000)]
The stack alignment is now computed dynamically, just verify it is correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27380
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 21:39:03 +0000 (21:39 +0000)]
Remove unused method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27379
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 21:38:39 +0000 (21:38 +0000)]
Keep track of max stack alignment as objects are added. Remove an obsolete method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27378
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 3 Apr 2006 20:53:28 +0000 (20:53 +0000)]
- More efficient extract_vector_elt with shuffle and movss, movsd, movd, etc.
- Some bug fixes and naming inconsistency fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27377
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 19:28:50 +0000 (19:28 +0000)]
Align vectors to the size in bytes, not bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27376
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 17:29:28 +0000 (17:29 +0000)]
Add a missing check, this fixes UnitTests/Vector/sumarray.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 17:21:50 +0000 (17:21 +0000)]
Add a missing check, which broke a bunch of vector tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27374
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 17:20:06 +0000 (17:20 +0000)]
shrinkify intrinsics more by using some local classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 15:58:28 +0000 (15:58 +0000)]
Add the full set of min/max instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27372
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 3 Apr 2006 15:43:07 +0000 (15:43 +0000)]
Add some classes to make it easier to define intrinsics. Add min/max intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27371
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 3 Apr 2006 04:19:17 +0000 (04:19 +0000)]
support x * (c1 + c2) where c1 and c2 are pow2s. special case for c2 == 4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27370
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 3 Apr 2006 04:14:39 +0000 (04:14 +0000)]
test powers of 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27369
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 3 Apr 2006 03:18:59 +0000 (03:18 +0000)]
mul by const conversion sequences. more coming soon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27368
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 3 Apr 2006 03:16:50 +0000 (03:16 +0000)]
back this out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27367
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 3 Apr 2006 03:16:09 +0000 (03:16 +0000)]
test some more mul by constant removal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27366
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 2 Apr 2006 21:47:07 +0000 (21:47 +0000)]
Make sure mul by constant 5 is turned into a s4addq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27365
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 2 Apr 2006 21:42:45 +0000 (21:42 +0000)]
This should be a win of every arch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27364
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 2 Apr 2006 21:08:39 +0000 (21:08 +0000)]
This makes McCat/12-IOtest go 8x faster or so
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27363
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 2 Apr 2006 20:13:57 +0000 (20:13 +0000)]
This will be needed soon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27362
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 2 Apr 2006 14:34:26 +0000 (14:34 +0000)]
For PR722:
Change the check for llvm-gcc from using LLVMGCCDIR to LLVMGCC. This checks
for the actual tool rather than the directory in which the tool resides. In
the case of this bug, it is possible that the directory exists but that the
tools in that directory do not. This fix should avoid the makefile from
erroneously proceeding without the actual tools being available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27361
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 07:20:00 +0000 (07:20 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27360
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 06:26:07 +0000 (06:26 +0000)]
Inform the dag combiner that the predicate compares only return a low bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27359
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 06:19:46 +0000 (06:19 +0000)]
relax assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27358
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 06:15:09 +0000 (06:15 +0000)]
Allow targets to compute masked bits for intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27357
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 06:11:11 +0000 (06:11 +0000)]
Add a little dag combine to compile this:
int %AreSecondAndThirdElementsBothNegative(<4 x float>* %in) {
entry:
%tmp1 = load <4 x float>* %in ; <<4 x float>> [#uses=1]
%tmp = tail call int %llvm.ppc.altivec.vcmpgefp.p( int 1, <4 x float> < float 0x7FF8000000000000, float 0.
000000e+00, float 0.
000000e+00, float 0x7FF8000000000000 >, <4 x float> %tmp1 ) ; <int> [#uses=1]
%tmp = seteq int %tmp, 0 ; <bool> [#uses=1]
%tmp3 = cast bool %tmp to int ; <int> [#uses=1]
ret int %tmp3
}
into this:
_AreSecondAndThirdElementsBothNegative:
mfspr r2, 256
oris r4, r2, 49152
mtspr 256, r4
li r4, lo16(LCPI1_0)
lis r5, ha16(LCPI1_0)
lvx v0, 0, r3
lvx v1, r5, r4
vcmpgefp. v0, v1, v0
mfcr r3, 2
rlwinm r3, r3, 27, 31, 31
mtspr 256, r2
blr
instead of this:
_AreSecondAndThirdElementsBothNegative:
mfspr r2, 256
oris r4, r2, 49152
mtspr 256, r4
li r4, lo16(LCPI1_0)
lis r5, ha16(LCPI1_0)
lvx v0, 0, r3
lvx v1, r5, r4
vcmpgefp. v0, v1, v0
mfcr r3, 2
rlwinm r3, r3, 27, 31, 31
xori r3, r3, 1
cntlzw r3, r3
srwi r3, r3, 5
mtspr 256, r2
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27356
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 05:43:13 +0000 (05:43 +0000)]
vector casts of casts are eliminable. Transform this:
%tmp = cast <4 x uint> %tmp to <4 x int> ; <<4 x int>> [#uses=1]
%tmp = cast <4 x int> %tmp to <4 x float> ; <<4 x float>> [#uses=1]
into:
%tmp = cast <4 x uint> %tmp to <4 x float> ; <<4 x float>> [#uses=1]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27355
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 05:40:28 +0000 (05:40 +0000)]
vector casts never reinterpret bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27354
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 05:37:12 +0000 (05:37 +0000)]
Allow transforming this:
%tmp = cast <4 x uint>* %testData to <4 x int>* ; <<4 x int>*> [#uses=1]
%tmp = load <4 x int>* %tmp ; <<4 x int>> [#uses=1]
to this:
%tmp = load <4 x uint>* %testData ; <<4 x uint>> [#uses=1]
%tmp = cast <4 x uint> %tmp to <4 x int> ; <<4 x int>> [#uses=1]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27353
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 05:30:25 +0000 (05:30 +0000)]
Turn altivec lvx/stvx intrinsics into loads and stores. This allows the
elimination of one load from this:
int AreSecondAndThirdElementsBothNegative( vector float *in ) {
#define QNaN 0x7FC00000
const vector unsigned int testData = (vector unsigned int)( QNaN, 0, 0, QNaN );
vector float test = vec_ld( 0, (float*) &testData );
return ! vec_any_ge( test, *in );
}
Now generating:
_AreSecondAndThirdElementsBothNegative:
mfspr r2, 256
oris r4, r2, 49152
mtspr 256, r4
li r4, lo16(LCPI1_0)
lis r5, ha16(LCPI1_0)
addi r6, r1, -16
lvx v0, r5, r4
stvx v0, 0, r6
lvx v1, 0, r3
vcmpgefp. v0, v0, v1
mfcr r3, 2
rlwinm r3, r3, 27, 31, 31
xori r3, r3, 1
cntlzw r3, r3
srwi r3, r3, 5
mtspr 256, r2
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27352
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 05:28:54 +0000 (05:28 +0000)]
Remove done item
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27351
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sun, 2 Apr 2006 05:20:53 +0000 (05:20 +0000)]
Fix tablegen related dependencies in Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27350
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 05:06:04 +0000 (05:06 +0000)]
Implement promotion for EXTRACT_VECTOR_ELT, allowing v16i8 multiplies to work with PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27349
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 03:59:11 +0000 (03:59 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 03:57:31 +0000 (03:57 +0000)]
Implement the Expand action for binary vector operations to break the binop
into elements and operate on each piece. This allows generic vector integer
multiplies to work on PPC, though the generated code is horrible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27347
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 03:41:14 +0000 (03:41 +0000)]
Intrinsics that just load from memory can be treated like loads: they don't
have to serialize against each other. This allows us to schedule lvx's
across each other, for example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27346
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 03:35:30 +0000 (03:35 +0000)]
Adjust the Intrinsics.gen interface a little bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27345
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 03:35:01 +0000 (03:35 +0000)]
Adjust to change in Intrinsics.gen interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27344
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 03:25:57 +0000 (03:25 +0000)]
Constant fold all of the vector binops. This allows us to compile this:
"vector unsigned char mergeLowHigh = (vector unsigned char)
( 8, 9, 10, 11, 16, 17, 18, 19, 12, 13, 14, 15, 20, 21, 22, 23 );
vector unsigned char mergeHighLow = vec_xor( mergeLowHigh, vec_splat_u8(8));"
aka:
void %test2(<16 x sbyte>* %P) {
store <16 x sbyte> cast (<4 x int> xor (<4 x int> cast (<16 x ubyte> < ubyte 8, ubyte 9, ubyte 10, ubyte 11, ubyte 16, ubyte 17, ubyte 18, ubyte 19, ubyte 12, ubyte 13, ubyte 14, ubyte 15, ubyte 20, ubyte 21, ubyte 22, ubyte 23 > to <4 x int>), <4 x int> cast (<16 x sbyte> < sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8, sbyte 8 > to <4 x int>)) to <16 x sbyte>), <16 x sbyte> * %P
ret void
}
into this:
_test2:
mfspr r2, 256
oris r4, r2, 32768
mtspr 256, r4
li r4, lo16(LCPI2_0)
lis r5, ha16(LCPI2_0)
lvx v0, r5, r4
stvx v0, 0, r3
mtspr 256, r2
blr
instead of this:
_test2:
mfspr r2, 256
oris r4, r2, 49152
mtspr 256, r4
li r4, lo16(LCPI2_0)
lis r5, ha16(LCPI2_0)
vspltisb v0, 8
lvx v1, r5, r4
vxor v0, v1, v0
stvx v0, 0, r3
mtspr 256, r2
blr
... which occurs here:
http://developer.apple.com/hardware/ve/calcspeed.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27343
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 03:07:27 +0000 (03:07 +0000)]
Add a new -view-legalize-dags command line option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27342
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 02:53:43 +0000 (02:53 +0000)]
Implement constant folding of bit_convert of arbitrary constant vbuild_vector nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27341
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 02:51:27 +0000 (02:51 +0000)]
These entries already exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27340
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 02:41:18 +0000 (02:41 +0000)]
Add some missing node names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27339
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 02:28:52 +0000 (02:28 +0000)]
simplify this method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27338
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 01:47:20 +0000 (01:47 +0000)]
New note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27337
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 01:38:28 +0000 (01:38 +0000)]
Constant fold casts from things like <4 x int> -> <4 x uint>, likewise int<->fp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27336
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 00:43:36 +0000 (00:43 +0000)]
Custom lower all BUILD_VECTOR's so that we can compile vec_splat_u8(8) into
"vspltisb v0, 8" instead of a constant pool load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27335
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 00:24:45 +0000 (00:24 +0000)]
Prefer larger register classes over smaller ones when a register occurs in
multiple register classes. This fixes PowerPC/2006-04-01-FloatDoubleExtend.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27334
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 2 Apr 2006 00:23:59 +0000 (00:23 +0000)]
New testcase that crashes the compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27333
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 23:17:11 +0000 (23:17 +0000)]
add valuemapper support for inline asm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27332
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 22:41:47 +0000 (22:41 +0000)]
Implement vnot using VNOR instead of using 'vspltisb v0, -1' and vxor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27331
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 22:05:01 +0000 (22:05 +0000)]
Fix InstCombine/2006-04-01-InfLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27330
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 22:04:40 +0000 (22:04 +0000)]
New testcase that caused instcombine to infinitely loop (with my recent
patch), distilled from Applications/JM/ldecod
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27329
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 08:03:55 +0000 (08:03 +0000)]
Fold A^(B&A) -> (B&A)^A
Fold (B&A)^A == ~B & A
This implements InstCombine/xor.ll:test2[56]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27328
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 08:02:51 +0000 (08:02 +0000)]
new testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27327
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 04:48:52 +0000 (04:48 +0000)]
Fix Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll and
PR726 by performing consistent signed division, not consistent unsigned
division when evaluating scev's. Do not touch udivs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27326
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 04:47:17 +0000 (04:47 +0000)]
new testcase for PR726
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27325
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 1 Apr 2006 04:08:29 +0000 (04:08 +0000)]
ADd a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27324
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 23:01:56 +0000 (23:01 +0000)]
If we can look through vector operations to find the scalar version of an
extract_element'd value, do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27323
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 22:41:56 +0000 (22:41 +0000)]
Shrinkify some more intrinsic definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27322
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 31 Mar 2006 22:35:14 +0000 (22:35 +0000)]
An entry about packed type alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27321
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 22:34:05 +0000 (22:34 +0000)]
Pull operand asm string into base class, shrinkifying intrinsic definitions.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27320
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 31 Mar 2006 22:33:42 +0000 (22:33 +0000)]
TargetData.cpp::getTypeInfo() was returning alignment of element type as the
alignment of a packed type. This is obviously wrong. Added a workaround that
returns the size of the packed type as its alignment. The correct fix would
be to return a target dependent alignment value provided via TargetLowering
(or some other interface).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27319
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 22:16:43 +0000 (22:16 +0000)]
Delete identity shuffles, implementing CodeGen/Generic/vector-identity-shuffle.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27317
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 22:16:19 +0000 (22:16 +0000)]
An identity shuffle shouldn't generate any permute code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27316
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 21:57:36 +0000 (21:57 +0000)]
Fix 80 column violations :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27315
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 31 Mar 2006 21:55:24 +0000 (21:55 +0000)]
Use a X86 target specific node X86ISD::PINSRW instead of a mal-formed
INSERT_VECTOR_ELT to insert a 16-bit value in a 128-bit vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27314
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 21:54:11 +0000 (21:54 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27313
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 21:53:49 +0000 (21:53 +0000)]
Generalize the previous binary operator support and add a string concatenation
operation. This implements Regression/TableGen/strconcat.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27312
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 21:53:01 +0000 (21:53 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27311
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 31 Mar 2006 21:29:33 +0000 (21:29 +0000)]
Added support for SSE3 horizontal ops: haddp{s|d} and hsub{s|d}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27310
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 31 Mar 2006 21:28:46 +0000 (21:28 +0000)]
Added haddp{s|d} and hsubp{s|d} intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27309
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 21:19:06 +0000 (21:19 +0000)]
fix a pasto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27308
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 20:00:35 +0000 (20:00 +0000)]
Add vperm support for all datatypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27307
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 19:52:36 +0000 (19:52 +0000)]
Rearrange code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27306
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 19:48:58 +0000 (19:48 +0000)]
Add, sub and shuffle are legal for all vector types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27305
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 31 Mar 2006 19:22:53 +0000 (19:22 +0000)]
Add support to use pextrw and pinsrw to extract and insert a word element
from a 128-bit vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27304
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 31 Mar 2006 19:21:16 +0000 (19:21 +0000)]
Add vector_extract and vector_insert nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27303
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 19:00:22 +0000 (19:00 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27302
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 18:31:40 +0000 (18:31 +0000)]
constant fold extractelement with undef operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27301
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 18:25:14 +0000 (18:25 +0000)]
extractelement(undef,x) -> undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27300
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 18:22:37 +0000 (18:22 +0000)]
Do not endian swap split vector loads. This fixes UnitTests/Vector/sumarray-dbl on PPC.
Now all UnitTests/Vector/* tests pass on PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27299
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 18:20:46 +0000 (18:20 +0000)]
Do not endian swap the operands to a store if the operands came from a vector.
This fixes UnitTests/Vector/simple.c with altivec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27298
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 18:10:41 +0000 (18:10 +0000)]
Remove dead *extloads. This allows us to codegen vector.ll:test_extract_elt
to:
test_extract_elt:
alloc r3 = ar.pfs,0,1,0,0
adds r8 = 12, r32
;;
ldfs f8 = [r8]
mov ar.pfs = r3
br.ret.sptk.many rp
instead of:
test_extract_elt:
alloc r3 = ar.pfs,0,1,0,0
adds r8 = 28, r32
adds r9 = 24, r32
adds r10 = 20, r32
adds r11 = 16, r32
;;
ldfs f6 = [r8]
;;
ldfs f6 = [r9]
adds r8 = 12, r32
adds r9 = 8, r32
adds r14 = 4, r32
;;
ldfs f6 = [r10]
;;
ldfs f6 = [r11]
ldfs f8 = [r8]
;;
ldfs f6 = [r9]
;;
ldfs f6 = [r14]
;;
ldfs f6 = [r32]
mov ar.pfs = r3
br.ret.sptk.many rp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27297
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 18:06:18 +0000 (18:06 +0000)]
Delete dead loads in the dag. This allows us to compile
vector.ll:test_extract_elt2 into:
_test_extract_elt2:
lfd f1, 32(r3)
blr
instead of:
_test_extract_elt2:
lfd f0, 56(r3)
lfd f0, 48(r3)
lfd f0, 40(r3)
lfd f1, 32(r3)
lfd f0, 24(r3)
lfd f0, 16(r3)
lfd f0, 8(r3)
lfd f0, 0(r3)
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27296
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 31 Mar 2006 17:59:16 +0000 (17:59 +0000)]
Make this test harder, always check generic x86 and SSE-enabled x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27295
91177308-0d34-0410-b5e6-
96231b3b80d8