oota-llvm.git
18 years agoremove the read/write port/io intrinsics.
Chris Lattner [Fri, 3 Mar 2006 00:19:58 +0000 (00:19 +0000)]
remove the read/write port/io intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26479 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove these testcases. These intrinsics are going away
Chris Lattner [Fri, 3 Mar 2006 00:16:23 +0000 (00:16 +0000)]
Remove these testcases.  These intrinsics are going away

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26478 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUpdate the llvm.memset/memcpy/memmove intrinsics to reflect the recent split
Chris Lattner [Fri, 3 Mar 2006 00:07:20 +0000 (00:07 +0000)]
Update the llvm.memset/memcpy/memmove intrinsics to reflect the recent split
into types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26477 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSplit memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
Chris Lattner [Fri, 3 Mar 2006 00:00:25 +0000 (00:00 +0000)]
Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26476 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSimplify the autoupgrade interface
Chris Lattner [Thu, 2 Mar 2006 23:59:12 +0000 (23:59 +0000)]
Simplify the autoupgrade interface

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26475 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSplit memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
Chris Lattner [Thu, 2 Mar 2006 23:58:40 +0000 (23:58 +0000)]
Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress.

Significantly refactor autoupgrading code, to handle the more complex case
(where we upgrade one argument in a function), and fix some bugs in it.

Testcase here: llvm/test/Regression/Bytecode/memcpy.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26474 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcases
Chris Lattner [Thu, 2 Mar 2006 23:56:23 +0000 (23:56 +0000)]
new testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26473 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a note
Chris Lattner [Thu, 2 Mar 2006 22:34:38 +0000 (22:34 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26472 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a regression test for bug 478.
Evan Cheng [Thu, 2 Mar 2006 21:48:34 +0000 (21:48 +0000)]
Add a regression test for bug 478.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26471 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago- Fixed some priority calculation bugs that were causing bug 478. Among them:
Evan Cheng [Thu, 2 Mar 2006 21:38:29 +0000 (21:38 +0000)]
- Fixed some priority calculation bugs that were causing bug 478. Among them:
  a predecessor appearing more than once in the operand list was counted as
  multiple predecessor; priority1 should be updated during scheduling;
  CycleBound was updated after the node is inserted into priority queue; one
  of the tie breaking condition was flipped.
- Take into consideration of two address opcodes. If a predecessor is a def&use
  operand, it should have a higher priority.
- Scheduler should also favor floaters, i.e. nodes that do not have real
  predecessors such as MOV32ri.
- The scheduling fixes / tweaks fixed bug 478:
        .text
        .align  4
        .globl  _f
_f:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        imull %ecx, %edx
        imull %eax, %eax
        imull %ecx, %ecx
        addl %eax, %ecx
        leal (%ecx,%edx,2), %eax
        ret

  It is also a slight performance win (1% - 3%) for most tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26470 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoGeneralize the REM folding code to handle another case Nick Lewycky
Chris Lattner [Thu, 2 Mar 2006 06:50:58 +0000 (06:50 +0000)]
Generalize the REM folding code to handle another case Nick Lewycky
pointed out: realize the AND can provide factors and look through Casts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26469 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a couple more cases
Chris Lattner [Thu, 2 Mar 2006 06:50:04 +0000 (06:50 +0000)]
add a couple more cases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26468 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix a compilation error with GCC 4.1. Thanks to Vladimir Merzliakov for
Chris Lattner [Thu, 2 Mar 2006 00:21:41 +0000 (00:21 +0000)]
Fix a compilation error with GCC 4.1.  Thanks to Vladimir Merzliakov for
pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26467 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSupport for enumerations.
Jim Laskey [Wed, 1 Mar 2006 23:52:37 +0000 (23:52 +0000)]
Support for enumerations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26466 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agotestcase that crashed the new CFE
Chris Lattner [Wed, 1 Mar 2006 22:45:12 +0000 (22:45 +0000)]
testcase that crashed the new CFE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26465 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDon't print llvm constant in assmebly file. Assembler won't like comments that
Evan Cheng [Wed, 1 Mar 2006 22:18:09 +0000 (22:18 +0000)]
Don't print llvm constant in assmebly file. Assembler won't like comments that
span multiple lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26463 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoBack out my last check-in. Wrong place to fix it.
Evan Cheng [Wed, 1 Mar 2006 22:17:00 +0000 (22:17 +0000)]
Back out my last check-in. Wrong place to fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26462 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAsmWriter should not print LLVM constant in comment. Assembler won't like
Evan Cheng [Wed, 1 Mar 2006 22:00:59 +0000 (22:00 +0000)]
AsmWriter should not print LLVM constant in comment. Assembler won't like
multi-line comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26461 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix CodeGen/Generic/2006-03-01-dagcombineinfloop.ll, an infinite loop
Chris Lattner [Wed, 1 Mar 2006 21:47:21 +0000 (21:47 +0000)]
Fix CodeGen/Generic/2006-03-01-dagcombineinfloop.ll, an infinite loop
in the dag combiner on 176.gcc on x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26459 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase
Chris Lattner [Wed, 1 Mar 2006 21:46:53 +0000 (21:46 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26458 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove extra comma from enum list.
Jim Laskey [Wed, 1 Mar 2006 20:49:44 +0000 (20:49 +0000)]
Remove extra comma from enum list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26457 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove comma from enum list.
Jim Laskey [Wed, 1 Mar 2006 20:48:20 +0000 (20:48 +0000)]
Remove comma from enum list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26456 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSwitch back to using actual dwarf tags. Simplifies code without loss to other
Jim Laskey [Wed, 1 Mar 2006 20:39:36 +0000 (20:39 +0000)]
Switch back to using actual dwarf tags.  Simplifies code without loss to other
debug forms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26455 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix a typo evan noticed
Chris Lattner [Wed, 1 Mar 2006 19:55:35 +0000 (19:55 +0000)]
Fix a typo evan noticed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26454 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUse context and not compile unit.
Jim Laskey [Wed, 1 Mar 2006 18:20:30 +0000 (18:20 +0000)]
Use context and not compile unit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26453 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoI guess I can handle large type sizes.
Jim Laskey [Wed, 1 Mar 2006 18:13:05 +0000 (18:13 +0000)]
I guess I can handle large type sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26452 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoBasic array support.
Jim Laskey [Wed, 1 Mar 2006 17:53:02 +0000 (17:53 +0000)]
Basic array support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26451 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement CodeGen/PowerPC/or-addressing-mode.ll, which is also PR668.
Chris Lattner [Wed, 1 Mar 2006 07:14:48 +0000 (07:14 +0000)]
Implement CodeGen/PowerPC/or-addressing-mode.ll, which is also PR668.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26450 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoload (x|y) -> load (x+y) iff x and y have no common bits.
Chris Lattner [Wed, 1 Mar 2006 07:13:56 +0000 (07:13 +0000)]
load (x|y)  -> load (x+y)  iff x and y have no common bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26449 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a note
Chris Lattner [Wed, 1 Mar 2006 06:36:20 +0000 (06:36 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26448 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCompile this:
Chris Lattner [Wed, 1 Mar 2006 05:50:56 +0000 (05:50 +0000)]
Compile this:

void foo(float a, int *b) { *b = a; }

to this:

_foo:
        fctiwz f0, f1
        stfiwx f0, 0, r4
        blr

instead of this:

_foo:
        fctiwz f0, f1
        stfd f0, -8(r1)
        lwz r2, -4(r1)
        stw r2, 0(r4)
        blr

This implements CodeGen/PowerPC/stfiwx.ll, and also incidentally does the
right thing for GCC bugzilla 26505.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26447 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase. These functions shouldn't touch the stack if stfiwx use
Chris Lattner [Wed, 1 Mar 2006 05:49:05 +0000 (05:49 +0000)]
new testcase.  These functions shouldn't touch the stack if stfiwx use
is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26446 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUse a target-specific dag-combine to implement CodeGen/PowerPC/fp-int-fp.ll.
Chris Lattner [Wed, 1 Mar 2006 04:57:39 +0000 (04:57 +0000)]
Use a target-specific dag-combine to implement CodeGen/PowerPC/fp-int-fp.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26445 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase. There should be no accesses to the stack for these functions.
Chris Lattner [Wed, 1 Mar 2006 04:56:33 +0000 (04:56 +0000)]
new testcase.  There should be no accesses to the stack for these functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26444 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd support for target-specific dag combines
Chris Lattner [Wed, 1 Mar 2006 04:53:38 +0000 (04:53 +0000)]
Add support for target-specific dag combines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26443 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd interfaces for targets to provide target-specific dag combiner optimizations.
Chris Lattner [Wed, 1 Mar 2006 04:52:55 +0000 (04:52 +0000)]
Add interfaces for targets to provide target-specific dag combiner optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26442 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a new AddToWorkList method, start using it
Chris Lattner [Wed, 1 Mar 2006 04:03:14 +0000 (04:03 +0000)]
Add a new AddToWorkList method, start using it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26441 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoPull shifts by a constant through multiplies (a form of reassociation),
Chris Lattner [Wed, 1 Mar 2006 03:44:24 +0000 (03:44 +0000)]
Pull shifts by a constant through multiplies (a form of reassociation),
implementing Regression/CodeGen/X86/mul-shift-reassoc.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26440 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase
Chris Lattner [Wed, 1 Mar 2006 03:43:38 +0000 (03:43 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26439 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoVector op lowering.
Evan Cheng [Wed, 1 Mar 2006 01:11:20 +0000 (01:11 +0000)]
Vector op lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26438 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoNew vector type v2f32.
Evan Cheng [Wed, 1 Mar 2006 01:10:52 +0000 (01:10 +0000)]
New vector type v2f32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26437 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoVector ops lowering.
Evan Cheng [Wed, 1 Mar 2006 01:09:54 +0000 (01:09 +0000)]
Vector ops lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26436 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoNew type v2f32.
Evan Cheng [Wed, 1 Mar 2006 01:06:22 +0000 (01:06 +0000)]
New type v2f32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26435 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMissing a cast previously.
Evan Cheng [Wed, 1 Mar 2006 00:58:54 +0000 (00:58 +0000)]
Missing a cast previously.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26434 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago- Added v2f32, not used by any target currently. Only for testing purpose.
Evan Cheng [Wed, 1 Mar 2006 00:55:26 +0000 (00:55 +0000)]
- Added v2f32, not used by any target currently. Only for testing purpose.
- Minor bug fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26433 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago- Added VConstant as an abstract version of ConstantVec.
Evan Cheng [Wed, 1 Mar 2006 00:51:13 +0000 (00:51 +0000)]
- Added VConstant as an abstract version of ConstantVec.
- All abstrct vector nodes must have # of elements and element type as their
first two operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26432 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a test case for left shift by 1. We should not be using lea for this.
Evan Cheng [Tue, 28 Feb 2006 23:57:45 +0000 (23:57 +0000)]
Add a test case for left shift by 1. We should not be using lea for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26431 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAnother entry.
Evan Cheng [Tue, 28 Feb 2006 23:38:49 +0000 (23:38 +0000)]
Another entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26430 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDon't match x << 1 to LEAL. It's better to emit x + x.
Evan Cheng [Tue, 28 Feb 2006 21:13:57 +0000 (21:13 +0000)]
Don't match x << 1 to LEAL. It's better to emit x + x.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26429 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd const, volatile, restrict support.
Jim Laskey [Tue, 28 Feb 2006 20:15:07 +0000 (20:15 +0000)]
Add const, volatile, restrict support.
Add array of debug descriptor support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26428 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix a regression in a patch from a couple of days ago. This fixes
Chris Lattner [Tue, 28 Feb 2006 19:47:20 +0000 (19:47 +0000)]
Fix a regression in a patch from a couple of days ago.  This fixes
Transforms/InstCombine/2006-02-28-Crash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26427 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase
Chris Lattner [Tue, 28 Feb 2006 19:46:56 +0000 (19:46 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26426 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago8 spaces -> tab. Reported by Wink Saville
Chris Lattner [Tue, 28 Feb 2006 19:12:58 +0000 (19:12 +0000)]
8 spaces -> tab.  Reported by Wink Saville

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26425 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoevan's recent x86 isel improvements have fixed this, though not in the way
Chris Lattner [Tue, 28 Feb 2006 16:39:56 +0000 (16:39 +0000)]
evan's recent x86 isel improvements have fixed this, though not in the way
originally envisioned :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26422 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a subtarget feature for the stfiwx instruction. I know the G5 has it,
Chris Lattner [Tue, 28 Feb 2006 07:08:22 +0000 (07:08 +0000)]
Add a subtarget feature for the stfiwx instruction.  I know the G5 has it,
but I don't know what other PPC impls do.  If someone could update the proc
table, I would appreciate it :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26421 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcases
Chris Lattner [Tue, 28 Feb 2006 06:54:19 +0000 (06:54 +0000)]
new testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26420 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCompile:
Chris Lattner [Tue, 28 Feb 2006 06:49:37 +0000 (06:49 +0000)]
Compile:
unsigned foo4(unsigned short *P) { return *P & 255; }
unsigned foo5(short *P) { return *P & 255; }

to:

_foo4:
        lbz r3,1(r3)
        blr
_foo5:
        lbz r3,1(r3)
        blr

not:

_foo4:
        lhz r2, 0(r3)
        rlwinm r3, r2, 0, 24, 31
        blr
_foo5:
        lhz r2, 0(r3)
        rlwinm r3, r2, 0, 24, 31
        blr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26419 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove implemented item
Chris Lattner [Tue, 28 Feb 2006 06:36:04 +0000 (06:36 +0000)]
remove implemented item

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26418 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFold "and (LOAD P), 255" -> zextload. This allows us to compile:
Chris Lattner [Tue, 28 Feb 2006 06:35:35 +0000 (06:35 +0000)]
Fold "and (LOAD P), 255" -> zextload.  This allows us to compile:

unsigned foo3(unsigned *P) { return *P & 255; }
as:
_foo3:
        lbz r3, 3(r3)
        blr

instead of:

_foo3:
        lwz r2, 0(r3)
        rlwinm r3, r2, 0, 24, 31
        blr

and:

unsigned short foo2(float a) { return a; }

as:
_foo2:
        fctiwz f0, f1
        stfd f0, -8(r1)
        lhz r3, -2(r1)
        blr

instead of:

_foo2:
        fctiwz f0, f1
        stfd f0, -8(r1)
        lwz r2, -4(r1)
        rlwinm r3, r2, 0, 16, 31
        blr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26417 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofold (sra (sra x, c1), c2) -> (sra x, c1+c2)
Chris Lattner [Tue, 28 Feb 2006 06:23:04 +0000 (06:23 +0000)]
fold (sra (sra x, c1), c2) -> (sra x, c1+c2)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26416 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement rem.ll:test[7-9] and PR712
Chris Lattner [Tue, 28 Feb 2006 05:49:21 +0000 (05:49 +0000)]
Implement rem.ll:test[7-9] and PR712

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26415 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcases for PR712
Chris Lattner [Tue, 28 Feb 2006 05:48:56 +0000 (05:48 +0000)]
new testcases for PR712

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26414 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSimplify some code now that the RHS of a rem can't be 0
Chris Lattner [Tue, 28 Feb 2006 05:40:55 +0000 (05:40 +0000)]
Simplify some code now that the RHS of a rem can't be 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26413 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase
Chris Lattner [Tue, 28 Feb 2006 05:30:48 +0000 (05:30 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26412 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRearrange some code, fold "rem X, 0", implementing rem.ll:test6
Chris Lattner [Tue, 28 Feb 2006 05:30:45 +0000 (05:30 +0000)]
Rearrange some code, fold "rem X, 0", implementing rem.ll:test6

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26411 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd support for output memory constraints.
Chris Lattner [Mon, 27 Feb 2006 23:45:39 +0000 (23:45 +0000)]
Add support for output memory constraints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26410 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoQualify dwarf namespace inside llvm namespace.
Jim Laskey [Mon, 27 Feb 2006 22:37:23 +0000 (22:37 +0000)]
Qualify dwarf namespace inside llvm namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26409 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoreadme updates
Nate Begeman [Mon, 27 Feb 2006 22:08:36 +0000 (22:08 +0000)]
readme updates

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26405 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoPartial enabling of functions.
Jim Laskey [Mon, 27 Feb 2006 20:37:42 +0000 (20:37 +0000)]
Partial enabling of functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26404 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDon't print constant initializers, they may span lines now.
Chris Lattner [Mon, 27 Feb 2006 20:09:23 +0000 (20:09 +0000)]
Don't print constant initializers, they may span lines now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26403 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSupporting multiple compile units.
Jim Laskey [Mon, 27 Feb 2006 17:27:12 +0000 (17:27 +0000)]
Supporting multiple compile units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26402 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRe-orging file.
Jim Laskey [Mon, 27 Feb 2006 12:43:29 +0000 (12:43 +0000)]
Re-orging file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26401 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoPretty print large struct constants.
Jim Laskey [Mon, 27 Feb 2006 10:33:53 +0000 (10:33 +0000)]
Pretty print large struct constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26400 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemoved dependency on how operands are printed (want multi-line.)
Jim Laskey [Mon, 27 Feb 2006 10:29:04 +0000 (10:29 +0000)]
Removed dependency on how operands are printed (want multi-line.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26399 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUse -emit-llvm -S to get .ll file output from llvm-gcc
Chris Lattner [Mon, 27 Feb 2006 05:39:00 +0000 (05:39 +0000)]
Use -emit-llvm -S to get .ll file output from llvm-gcc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26397 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMerge two almost-identical pieces of code.
Chris Lattner [Mon, 27 Feb 2006 02:38:23 +0000 (02:38 +0000)]
Merge two almost-identical pieces of code.

Make this code more powerful by using ComputeMaskedBits instead of looking
for an AND operand.  This lets us fold this:

int %test23(int %a) {
        %tmp.1 = and int %a, 1
        %tmp.2 = seteq int %tmp.1, 0
        %tmp.3 = cast bool %tmp.2 to int  ;; xor tmp1, 1
        ret int %tmp.3
}

into: xor (and a, 1), 1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26396 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcases
Chris Lattner [Mon, 27 Feb 2006 02:36:19 +0000 (02:36 +0000)]
new testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26395 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFold (A^B) == A -> B == 0
Chris Lattner [Mon, 27 Feb 2006 01:44:11 +0000 (01:44 +0000)]
Fold (A^B) == A  ->  B == 0
and  (A-B) == A  ->  B == 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26394 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoNew testcases
Chris Lattner [Mon, 27 Feb 2006 01:43:02 +0000 (01:43 +0000)]
New testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26393 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement bit propagation through sub nodes, this (re)implements
Chris Lattner [Mon, 27 Feb 2006 01:00:42 +0000 (01:00 +0000)]
Implement bit propagation through sub nodes, this (re)implements
PowerPC/div-2.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26392 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoReenable this
Chris Lattner [Mon, 27 Feb 2006 01:00:12 +0000 (01:00 +0000)]
Reenable this

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26391 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove some completed notes
Chris Lattner [Mon, 27 Feb 2006 00:39:31 +0000 (00:39 +0000)]
remove some completed notes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26390 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCheck RHS simplification before LHS simplification to avoid infinitely looping
Chris Lattner [Mon, 27 Feb 2006 00:36:27 +0000 (00:36 +0000)]
Check RHS simplification before LHS simplification to avoid infinitely looping
on PowerPC/small-arguments.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26389 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoJust like we use the RHS of an AND to simplify the LHS, use the LHS to
Chris Lattner [Mon, 27 Feb 2006 00:22:28 +0000 (00:22 +0000)]
Just like we use the RHS of an AND to simplify the LHS, use the LHS to
simplify the RHS.  This allows for the elimination of many thousands of
ands from multisource, and compiles CodeGen/PowerPC/and-elim.ll:test2
into this:

_test2:
        srwi r2, r3, 1
        xori r3, r2, 40961
        blr

instead of this:

_test2:
        rlwinm r2, r3, 31, 17, 31
        xori r2, r2, 40961
        rlwinm r3, r2, 0, 16, 31
        blr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26388 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase
Chris Lattner [Mon, 27 Feb 2006 00:20:23 +0000 (00:20 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26387 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a bunch of missed cases. Perhaps the most significant of which is that
Chris Lattner [Sun, 26 Feb 2006 23:36:02 +0000 (23:36 +0000)]
Add a bunch of missed cases.  Perhaps the most significant of which is that
assertzext produces zero bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26386 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFold (X|C1)^C2 -> X^(C1|C2) when possible. This implements
Chris Lattner [Sun, 26 Feb 2006 19:57:54 +0000 (19:57 +0000)]
Fold (X|C1)^C2 -> X^(C1|C2) when possible.  This implements
InstCombine/or.ll:test23.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26385 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase
Chris Lattner [Sun, 26 Feb 2006 19:55:30 +0000 (19:55 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26384 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoReverting. Didn't realize some developers were embedding constants in their
Jim Laskey [Sun, 26 Feb 2006 10:16:05 +0000 (10:16 +0000)]
Reverting. Didn't realize some developers were embedding constants in their
target assembler code gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26383 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoConstantPoolIndex is now the displacement portion of the address (rather
Evan Cheng [Sun, 26 Feb 2006 09:12:34 +0000 (09:12 +0000)]
ConstantPoolIndex is now the displacement portion of the address (rather
than base).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26382 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoPrint ConstantPoolSDNode offset field.
Evan Cheng [Sun, 26 Feb 2006 08:36:57 +0000 (08:36 +0000)]
Print ConstantPoolSDNode offset field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26381 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFixed ConstantPoolIndex operand asm print bug. This fixed 2005-07-17-INT-To-FP
Evan Cheng [Sun, 26 Feb 2006 08:28:12 +0000 (08:28 +0000)]
Fixed ConstantPoolIndex operand asm print bug. This fixed 2005-07-17-INT-To-FP
and 2005-05-12-Int64ToFP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26380 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFormat large struct constants for readability.
Jim Laskey [Sat, 25 Feb 2006 12:27:03 +0000 (12:27 +0000)]
Format large struct constants for readability.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26379 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoNew test case: use lea for imul by some constants.
Evan Cheng [Sat, 25 Feb 2006 10:16:10 +0000 (10:16 +0000)]
New test case: use lea for imul by some constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26378 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agolea.ll is XFAIL until we implement convertToThreeAddress.
Evan Cheng [Sat, 25 Feb 2006 10:15:22 +0000 (10:15 +0000)]
lea.ll is XFAIL until we implement convertToThreeAddress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26377 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago* Cleaned up addressing mode matching code.
Evan Cheng [Sat, 25 Feb 2006 10:09:08 +0000 (10:09 +0000)]
* Cleaned up addressing mode matching code.
* Cleaned up and tweaked LEA cost analysis code. Removed some hacks.
* Handle ADD $X, c to MOV32ri $X+c. These patterns cannot be autogen'd and
  they need to be matched before LEA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26376 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUpdates.
Evan Cheng [Sat, 25 Feb 2006 10:04:07 +0000 (10:04 +0000)]
Updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26375 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago* Allow mul, shl nodes to be codegen'd as LEA (if appropriate).
Evan Cheng [Sat, 25 Feb 2006 10:02:21 +0000 (10:02 +0000)]
* Allow mul, shl nodes to be codegen'd as LEA (if appropriate).
* Add patterns to handle GlobalAddress, ConstantPool, etc.
  MOV32ri to materialize these nodes in registers.
  ADD32ri to handle %reg + GA, etc.
  MOV32mi to handle store GA, etc. to memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26374 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoConstantPoolIndex is now the displacement field of addressing mode.
Evan Cheng [Sat, 25 Feb 2006 09:56:50 +0000 (09:56 +0000)]
ConstantPoolIndex is now the displacement field of addressing mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26373 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdded a common about the need for X86ISD::Wrapper.
Evan Cheng [Sat, 25 Feb 2006 09:55:19 +0000 (09:55 +0000)]
Added a common about the need for X86ISD::Wrapper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26372 91177308-0d34-0410-b5e6-96231b3b80d8