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

23000 Commits

Author SHA1 Message Date
Evan Cheng
e0a6cf78f8 Back out fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2) for now.
It's causing an infinite loop compiling ldecod on x86 / Darwin.

llvm-svn: 26544
2006-03-05 07:30:16 +00:00
Chris Lattner
827e3f62b0 Add some simple copysign folds
llvm-svn: 26543
2006-03-05 05:30:57 +00:00
Chris Lattner
4b4b3e6cbb Codegen copysign[f] into a FCOPYSIGN node
llvm-svn: 26542
2006-03-05 05:09:38 +00:00
Chris Lattner
6b0947c277 Copysign needs to be expanded everywhere. Note that Alpha and IA64 should
implement copysign as a native op if they have it.

llvm-svn: 26541
2006-03-05 05:08:37 +00:00
Chris Lattner
9f589d65a1 Add a copysign node
llvm-svn: 26540
2006-03-05 05:06:40 +00:00
Chris Lattner
55fbd49ca9 add a note for something evan noticed
llvm-svn: 26539
2006-03-05 01:15:18 +00:00
Chris Lattner
43e9ec760b Make vector narrowing more effective, implementing
Transforms/InstCombine/vec_narrow.ll.  This add support for narrowing
extract_element(insertelement) also.

llvm-svn: 26538
2006-03-05 00:22:33 +00:00
Chris Lattner
1acc82fcb2 new testcase for vector narrowing.
llvm-svn: 26537
2006-03-05 00:21:28 +00:00
Chris Lattner
7d2423c91f Implemented.
llvm-svn: 26536
2006-03-04 23:33:44 +00:00
Chris Lattner
cd57ff4fb6 fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)

This allows us to compile CodeGen/PowerPC/addi-reassoc.ll into:

_test1:
        slwi r2, r4, 4
        add r2, r2, r3
        lwz r3, 36(r2)
        blr
_test2:
        mulli r2, r4, 5
        add r2, r2, r3
        lbz r2, 11(r2)
        extsb r3, r2
        blr

instead of:

_test1:
        addi r2, r4, 2
        slwi r2, r2, 4
        add r2, r3, r2
        lwz r3, 4(r2)
        blr
_test2:
        addi r2, r4, 2
        mulli r2, r2, 5
        add r2, r3, r2
        lbz r2, 1(r2)
        extsb r3, r2
        blr

llvm-svn: 26535
2006-03-04 23:33:26 +00:00
Chris Lattner
69ca9936f4 new testcase
llvm-svn: 26534
2006-03-04 23:31:49 +00:00
Chris Lattner
805838e63e Fix a crash compiling Obsequi
llvm-svn: 26529
2006-03-04 21:48:01 +00:00
Chris Lattner
1c66dfe04b new testcase
llvm-svn: 26525
2006-03-04 09:35:02 +00:00
Chris Lattner
7694fbc4bb Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B).
Testcase here: Transforms/Reassociate/mulfactor.ll

llvm-svn: 26524
2006-03-04 09:31:13 +00:00
Chris Lattner
35dbbc5676 Add a note
llvm-svn: 26523
2006-03-04 08:44:51 +00:00
Chris Lattner
9cc0d5a2d7 Regenerate
llvm-svn: 26522
2006-03-04 07:53:41 +00:00
Chris Lattner
b780a1ecdc Don't use invalidated iterators!
llvm-svn: 26521
2006-03-04 07:53:16 +00:00
Evan Cheng
65b5c2c680 Add an entry
llvm-svn: 26520
2006-03-04 07:49:50 +00:00
Chris Lattner
f526a4e5f6 Canonicalize (X+C1)*C2 -> X*C2+C1*C2
This implements Transforms/InstCombine/add.ll:test31

llvm-svn: 26519
2006-03-04 06:04:02 +00:00
Chris Lattner
bcc0646e6a new testcase
llvm-svn: 26518
2006-03-04 06:02:36 +00:00
Evan Cheng
2b45c57663 MEMSET / MEMCPY lowering bugs: we can't issue a single WORD / DWORD version of
rep/stos and rep/mov if the count is not a constant. We could do
  rep/stosl; and $count, 3; rep/stosb
For now, I will lower them to memset / memcpy calls. We will revisit this after
a little bit experiment.

Also need to take care of the trailing bytes even if the count is a constant.
Since the max. number of trailing bytes are 3, we will simply issue loads /
stores.

llvm-svn: 26517
2006-03-04 02:48:56 +00:00
Jeff Cohen
f38145b73d Keep Visual Studio happy.
llvm-svn: 26516
2006-03-04 02:19:46 +00:00
Chris Lattner
0d3abd353b Be more conservative with our symbolic alias analysis. In particular,
don't assume that A[1][0] and A[0][i] can't alias.  "i" might be out of
range, or even negative.  This fixes a miscompilation of 188.ammp (which
does bad pointer tricks) with the new CFE.

Testcase here: Analysis/BasicAA/2006-03-03-BadArraySubscript.ll

llvm-svn: 26515
2006-03-04 02:06:34 +00:00
Chris Lattner
c4f37e60bb new testcase
llvm-svn: 26514
2006-03-04 02:05:07 +00:00
Chris Lattner
de8c7d8ae2 add a note
llvm-svn: 26513
2006-03-04 01:19:34 +00:00
Evan Cheng
f2a0107221 Typo
llvm-svn: 26512
2006-03-04 01:12:00 +00:00
Chris Lattner
e10b6e1ec0 New testcase, make sure nate doesn't vanish
llvm-svn: 26511
2006-03-04 00:47:12 +00:00
Chris Lattner
4f01eca6ad Spec change: the size of a memset/memcpy/memmove is not required to be aligned
to the alignment argument.

llvm-svn: 26510
2006-03-04 00:02:10 +00:00
Jim Laskey
dc6f528739 Added support for dwarf block data entries.
llvm-svn: 26509
2006-03-03 21:00:14 +00:00
Chris Lattner
a31ef8a613 Silence a warning.
llvm-svn: 26508
2006-03-03 19:34:28 +00:00
Evan Cheng
dd0a62e4c7 Add another test case for instruction scheduling.
llvm-svn: 26507
2006-03-03 18:58:09 +00:00
Chris Lattner
2c6a3f04e9 Unbreak autouprade of llvm.sqrt, simplify some code.
llvm-svn: 26506
2006-03-03 16:31:22 +00:00
Jim Laskey
f915b6b08b Adding basic structure support.
llvm-svn: 26505
2006-03-03 15:06:57 +00:00
Evan Cheng
4afe769361 Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR.
llvm-svn: 26504
2006-03-03 07:01:07 +00:00
Evan Cheng
0c445855f2 Number of NodeTypes now exceeds 128.
llvm-svn: 26503
2006-03-03 06:58:59 +00:00
Evan Cheng
4ddc3b2c54 SDOperand::isOperand should not be a forwarding. It must check *this against N's operands.
llvm-svn: 26502
2006-03-03 06:42:32 +00:00
Evan Cheng
183b913508 Added isOperand(N): true if this is an operand of N
llvm-svn: 26501
2006-03-03 06:24:54 +00:00
Evan Cheng
b91460b269 A bit more tweaking
llvm-svn: 26500
2006-03-03 06:23:43 +00:00
Chris Lattner
d2068344fc Fix pasteo
llvm-svn: 26499
2006-03-03 06:13:41 +00:00
Jeff Cohen
ee1a26dc07 Fix VC++ compilation errors.
llvm-svn: 26498
2006-03-03 03:25:07 +00:00
Chris Lattner
c8db4dd179 remove a bunch of long-dead testing code
llvm-svn: 26497
2006-03-03 02:34:28 +00:00
Chris Lattner
eb2918b4d2 initial checkin of the intrinsic description file
llvm-svn: 26496
2006-03-03 02:33:15 +00:00
Chris Lattner
0b3c1c1fe2 initial implementation of intrinsic parsing
llvm-svn: 26495
2006-03-03 02:32:46 +00:00
Robert Bocchino
5a5c750102 Implemented -quiet feature for analyze
llvm-svn: 26494
2006-03-03 02:12:04 +00:00
Evan Cheng
7d66f13ccf Move #include "llvm/CodeGen/AsmPrinter.h" to top since it's the interface.
llvm-svn: 26493
2006-03-03 02:04:29 +00:00
Chris Lattner
b878804a5f remove out of date comment
llvm-svn: 26492
2006-03-03 02:04:07 +00:00
Chris Lattner
596d4baad0 update comment
llvm-svn: 26491
2006-03-03 01:55:49 +00:00
Chris Lattner
af9919716a Split the valuetypes out of Target.td into ValueTypes.td
llvm-svn: 26490
2006-03-03 01:55:26 +00:00
Chris Lattner
24ae77c8c6 pass -Illvm/include to tblgen
llvm-svn: 26489
2006-03-03 01:54:54 +00:00
Chris Lattner
33112d0936 Split this out of Target.td
llvm-svn: 26488
2006-03-03 01:54:11 +00:00