Commit Graph

31162 Commits

Author SHA1 Message Date
Devang Patel eb44d8fb19 Update example notes to clarify system linker's role.
llvm-svn: 35597
2007-04-02 16:54:12 +00:00
Reid Spencer 3b40d3887b Regenerate.
llvm-svn: 35596
2007-04-02 15:41:39 +00:00
Reid Spencer 18c121d55d Check for .svn directories too to determine if a debug build is appropriate.
llvm-svn: 35595
2007-04-02 15:40:39 +00:00
Zhou Sheng 9bc8ab100d 1. Make use of APInt operation instead of using ConstantExpr::getXXX.
2. Use cheaper APInt methods.

llvm-svn: 35594
2007-04-02 13:45:30 +00:00
Zhou Sheng 56cda95658 Use uint32_t for bitwidth instead of unsigned.
llvm-svn: 35593
2007-04-02 08:20:41 +00:00
Chris Lattner 28e0e4e11e Pass the type of the store access, not the type of the store, into the
target hook.  This allows us to codegen a loop as:

LBB1_1: @cond_next
        mov r2, #0
        str r2, [r0, +r3, lsl #2]
        add r3, r3, #1
        cmn r3, #1
        bne LBB1_1      @cond_next

instead of:

LBB1_1: @cond_next
        mov r2, #0
        str r2, [r0], #+4
        add r3, r3, #1
        cmn r3, #1
        bne LBB1_1      @cond_next

This looks the same, but has one fewer induction variable (and therefore,
one fewer register) live in the loop.

llvm-svn: 35592
2007-04-02 06:34:44 +00:00
Chris Lattner be96c646dc new testcase.
llvm-svn: 35591
2007-04-02 06:33:10 +00:00
Chris Lattner 3e21eb7fd7 Fix a bug which caused us to never be able to use signed comparisons for
equality comparisons of a constant.  This allows us to codegen the 'sintzero'
loop in PR1288 as:

LBB1_1: ;cond_next
        li r4, 0
        addi r2, r2, 1
        stw r4, 0(r3)
        addi r3, r3, 4
        cmpwi cr0, r2, -1
        bne cr0, LBB1_1 ;cond_next

instead of:

LBB1_1: ;cond_next
        addi r2, r2, 1
        li r4, 0
        xoris r5, r2, 65535
        stw r4, 0(r3)
        addi r3, r3, 4
        cmplwi cr0, r5, 65535
        bne cr0, LBB1_1 ;cond_next

This implements CodeGen/PowerPC/compare-simm.ll, and also cuts 74
instructions out of kc++.

llvm-svn: 35590
2007-04-02 05:59:42 +00:00
Chris Lattner 745f59bfde new testcase
llvm-svn: 35589
2007-04-02 05:57:59 +00:00
Chris Lattner 9d5aacee92 Wrap long line
llvm-svn: 35588
2007-04-02 05:48:58 +00:00
Chris Lattner 50490d54f2 use more obvious function name.
llvm-svn: 35587
2007-04-02 05:42:22 +00:00
Chris Lattner a3e0bb4ebb Treat xor of signbit like an add.
llvm-svn: 35586
2007-04-02 05:41:38 +00:00
Chris Lattner d14447833a add a helper function.
llvm-svn: 35585
2007-04-02 05:41:00 +00:00
Chris Lattner b24acc7bee simplify (x+c)^signbit as (x+c+signbit), pointed out by PR1288. This implements
test/Transforms/InstCombine/xor.ll:test28

llvm-svn: 35584
2007-04-02 05:36:22 +00:00
Chris Lattner 2d81c6d706 creative way to add one.
llvm-svn: 35583
2007-04-02 05:35:08 +00:00
Chris Lattner 0a844d8df1 my patch fixed the fixme.
llvm-svn: 35582
2007-04-02 05:08:54 +00:00
Reid Spencer e51961b5ba Fix illegal assembly syntax.
llvm-svn: 35581
2007-04-02 03:24:47 +00:00
Reid Spencer f361c4f4f8 bwsap -> bswap
llvm-svn: 35580
2007-04-02 02:25:19 +00:00
Reid Spencer 69e56c3461 Regenerate
llvm-svn: 35579
2007-04-02 02:08:35 +00:00
Reid Spencer 940fccb088 Upgrade the bit count intrinsics to have an i32 result.
llvm-svn: 35578
2007-04-02 02:08:05 +00:00
Reid Spencer a3bc850712 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
Chris Lattner b7b75145f1 reduce use of std::set
llvm-svn: 35576
2007-04-02 01:44:59 +00:00
Chris Lattner c3748562bd Various passes before isel split edges and do other CFG-restructuring changes.
isel has its own particular features that it wants in the CFG, in order to
reduce the number of times a constant is computed, etc.  Make sure that we
clean up the CFG before doing any other things for isel.  Doing so can
dramatically reduce the number of split edges and reduce the number of
places that constants get computed.  For example, this shrinks
CodeGen/Generic/phi-immediate-factoring.ll from 44 to 37 instructions on X86,
and from 21 to 17 MBB's in the output.  This is primarily a code size win,
not a performance win.

This implements CodeGen/Generic/phi-immediate-factoring.ll and PR1296.

llvm-svn: 35575
2007-04-02 01:35:34 +00:00
Chris Lattner 4cb30067c2 new testcase for PR1296
llvm-svn: 35574
2007-04-02 01:32:59 +00:00
Lauro Ramos Venancio 6be85337b0 - Divides the comparisons in two types: comparisons that only use N and Z
flags (ARMISD::CMPNZ) and comparisons that use all flags (ARMISD::CMP).
- Defines the instructions: TST, TEQ (ARM) and TST (Thumb).

llvm-svn: 35573
2007-04-02 01:30:03 +00:00
Chris Lattner 7c773e6850 add range version of insert()
llvm-svn: 35572
2007-04-02 01:21:19 +00:00
Reid Spencer 1bd88bdab3 Regenerate
llvm-svn: 35571
2007-04-02 01:14:00 +00:00
Reid Spencer 86207ee54d Don't upgrade functions that look like a bswap intrinsic but aren't.
llvm-svn: 35570
2007-04-02 01:13:36 +00:00
Reid Spencer 84c90a9431 Let llvm-upgrade upgrade the bswap intrinsic.
llvm-svn: 35569
2007-04-02 01:09:19 +00:00
Reid Spencer 0b544372d4 Let llvm-upgrade upgrade bswap intrinsic.
llvm-svn: 35568
2007-04-02 01:08:02 +00:00
Reid Spencer fad9bd6b92 For PR1297:
Make sure that the CTPOP result is casted to i32 as the bit counting
intrinsics all return i32 now (this affects CTLZ and CTTZ as well).

llvm-svn: 35567
2007-04-02 01:01:49 +00:00
Reid Spencer a5f996bd27 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 ef592214e2 Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new naming
rules for overloaded intrinsic functions.

llvm-svn: 35565
2007-04-02 00:50:28 +00:00
Reid Spencer 403a1c4517 Fix some bswap typos that Chris noticed.
llvm-svn: 35564
2007-04-02 00:19:52 +00:00
Chris Lattner 8fe3cbe6bd print the type of an inserted IV in -debug mode.
llvm-svn: 35563
2007-04-01 22:21:39 +00:00
Anton Korobeynikov ecc769e4f2 Add testcase for correct sret handling.
llvm-svn: 35562
2007-04-01 22:03:04 +00:00
Chris Lattner c3eeb42809 simplify this code, make it work for ap ints
llvm-svn: 35561
2007-04-01 20:57:36 +00:00
Chris Lattner 59a6fa7af6 fix breakage from last night, simplify code.
llvm-svn: 35560
2007-04-01 20:49:36 +00:00
Chris Lattner 489ad3313a gcc 3.4.4 is known-bad on x86-64
llvm-svn: 35559
2007-04-01 20:14:46 +00:00
Reid Spencer 8bc7d957cf Preview documentation for additional intrinsic functions.
llvm-svn: 35558
2007-04-01 19:00:37 +00:00
Jeff Cohen 3e96df52d8 Unbreak VC++ build.
llvm-svn: 35557
2007-04-01 18:58:22 +00:00
Reid Spencer add6123405 The bit counting intrinsics return i32 not the operand type. This fixes
last night's regression in SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls

llvm-svn: 35556
2007-04-01 18:42:20 +00:00
Zhou Sheng 150f3bbab2 Avoid unnecessary APInt construction.
llvm-svn: 35555
2007-04-01 17:13:37 +00:00
Duncan Sands 2e45201769 Testcase for the problem worked around in
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046204.html

llvm-svn: 35554
2007-04-01 15:29:02 +00:00
Zhou Sheng 63b6bc1c88 Remove unused methods.
llvm-svn: 35553
2007-04-01 12:45:33 +00:00
Reid Spencer 8a5799f558 For PR1297:
Preview documentation for the llvm.bit.concat intrinsic (yet to be
implemented).

llvm-svn: 35552
2007-04-01 08:27:01 +00:00
Evan Cheng 17d48a8bc2 Add i16 address mode.
llvm-svn: 35551
2007-04-01 08:06:46 +00:00
Reid Spencer 4eefaab3f6 For PR1297:
Document changes to bswap and bit counting intrinsics. bswap's name now
requires two types in the suffix per overloaded intrinsic naming rules.
The ctpop, cttz, and ctlz intrinsics were changed to always return i32.

llvm-svn: 35550
2007-04-01 08:04:23 +00:00
Reid Spencer 9ade28d260 Mention how to create overloaded intrinsics.
llvm-svn: 35549
2007-04-01 07:44:52 +00:00
Reid Spencer c3d87685ad 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