Andrew Lenharth [Mon, 5 Dec 2005 23:41:45 +0000 (23:41 +0000)]
yea, it helps to have your path set right when testing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24613
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 5 Dec 2005 23:19:44 +0000 (23:19 +0000)]
These never trigger, but whatever
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24612
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 5 Dec 2005 23:09:43 +0000 (23:09 +0000)]
Remove unnecessary let hasCtrlDep=1 now it can be inferred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24611
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 5 Dec 2005 23:08:55 +0000 (23:08 +0000)]
* Infer instruction property hasCtrlDep from pattern if it has one.
* Fixed a bug related to hasCtrlDep property use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24610
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 5 Dec 2005 20:50:53 +0000 (20:50 +0000)]
move this over to the dag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24609
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 18:23:57 +0000 (18:23 +0000)]
getRawValue zero extens for unsigned values, use getsextvalue so that we
know that small negative values fit into the immediate field of addressing
modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24608
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 5 Dec 2005 17:51:02 +0000 (17:51 +0000)]
fix constant pool loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24607
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 07:10:48 +0000 (07:10 +0000)]
Fix the #1 code quality problem that I have seen on X86 (and it also affects
PPC and other targets). In a particular, consider code like this:
struct Vector3 { double x, y, z; };
struct Matrix3 { Vector3 a, b, c; };
double dot(Vector3 &a, Vector3 &b) {
return a.x * b.x + a.y * b.y + a.z * b.z;
}
Vector3 mul(Vector3 &a, Matrix3 &b) {
Vector3 r;
r.x = dot( a, b.a );
r.y = dot( a, b.b );
r.z = dot( a, b.c );
return r;
}
void transform(Matrix3 &m, Vector3 *x, int n) {
for (int i = 0; i < n; i++)
x[i] = mul( x[i], m );
}
we compile transform to a loop with all of the GEP instructions for indexing
into 'm' pulled out of the loop (9 of them). Because isel occurs a bb at a time
we are unable to fold the constant index into the loads in the loop, leading to
PPC code that looks like this:
LBB3_1: ; no_exit.preheader
li r2, 0
addi r6, r3, 64 ;; 9 values live across the loop body!
addi r7, r3, 56
addi r8, r3, 48
addi r9, r3, 40
addi r10, r3, 32
addi r11, r3, 24
addi r12, r3, 16
addi r30, r3, 8
LBB3_2: ; no_exit
lfd f0, 0(r30)
lfd f1, 8(r4)
fmul f0, f1, f0
lfd f2, 0(r3) ;; no constant indices folded into the loads!
lfd f3, 0(r4)
lfd f4, 0(r10)
lfd f5, 0(r6)
lfd f6, 0(r7)
lfd f7, 0(r8)
lfd f8, 0(r9)
lfd f9, 0(r11)
lfd f10, 0(r12)
lfd f11, 16(r4)
fmadd f0, f3, f2, f0
fmul f2, f1, f4
fmadd f0, f11, f10, f0
fmadd f2, f3, f9, f2
fmul f1, f1, f6
stfd f0, 0(r4)
fmadd f0, f11, f8, f2
fmadd f1, f3, f7, f1
stfd f0, 8(r4)
fmadd f0, f11, f5, f1
addi r29, r4, 24
stfd f0, 16(r4)
addi r2, r2, 1
cmpw cr0, r2, r5
or r4, r29, r29
bne cr0, LBB3_2 ; no_exit
uh, yuck. With this patch, we now sink the constant offsets into the loop, producing
this code:
LBB3_1: ; no_exit.preheader
li r2, 0
LBB3_2: ; no_exit
lfd f0, 8(r3)
lfd f1, 8(r4)
fmul f0, f1, f0
lfd f2, 0(r3)
lfd f3, 0(r4)
lfd f4, 32(r3) ;; much nicer.
lfd f5, 64(r3)
lfd f6, 56(r3)
lfd f7, 48(r3)
lfd f8, 40(r3)
lfd f9, 24(r3)
lfd f10, 16(r3)
lfd f11, 16(r4)
fmadd f0, f3, f2, f0
fmul f2, f1, f4
fmadd f0, f11, f10, f0
fmadd f2, f3, f9, f2
fmul f1, f1, f6
stfd f0, 0(r4)
fmadd f0, f11, f8, f2
fmadd f1, f3, f7, f1
stfd f0, 8(r4)
fmadd f0, f11, f5, f1
addi r6, r4, 24
stfd f0, 16(r4)
addi r2, r2, 1
cmpw cr0, r2, r5
or r4, r6, r6
bne cr0, LBB3_2 ; no_exit
This is much nicer as it reduces register pressure in the loop a lot. On X86,
this takes the function from having 9 spilled registers to 2. This should help
some spec programs on X86 (gzip?)
This is currently only enabled with -enable-gep-isel-opt to allow perf testing
tonight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24606
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 05:30:21 +0000 (05:30 +0000)]
Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.
Patch provided by Evan Jones, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24604
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 05:23:06 +0000 (05:23 +0000)]
attribute((used)) is now supported
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24603
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 05:07:38 +0000 (05:07 +0000)]
Wrap a long line, never internalize llvm.used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24602
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 04:48:12 +0000 (04:48 +0000)]
New testcase for PR660
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24601
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 03:22:46 +0000 (03:22 +0000)]
testcase for PR664
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24600
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 02:40:25 +0000 (02:40 +0000)]
Several things:
1. Remove redundant type casts now that PR673 is implemented.
2. Implement the OUT*ir instructions correctly. The port number really
*is* a 16-bit value, but the patterns should only match if the number
is 0-255. Update the patterns so they now match.
3. Fix patterns for shifts to reflect that the shift amount is always an
i8, not an i16 as they were believed to be before. This previous fib
stopped working when we started knowing that CL has type i8.
4. Change use of i16i8imm in SH*ri patterns to all be imm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24599
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 02:37:26 +0000 (02:37 +0000)]
On some targets (e.g. X86), shift amounts are not the same as the value
being shifted. Don't assume they are.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24598
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 02:36:37 +0000 (02:36 +0000)]
Implement PR673: for explicit register references, use type information
if available
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24597
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 02:35:08 +0000 (02:35 +0000)]
Add some methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24596
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 02:34:29 +0000 (02:34 +0000)]
Add some explicit type casts so that tblgen knows the type of the shiftamount, which is not necessarily the same as the type being shifted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24595
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 02:34:05 +0000 (02:34 +0000)]
Add some explicit type casts so that tblgen knows the type of the shift
amount, which is not necessarily the same as the type being shifted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24594
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Dec 2005 00:48:51 +0000 (00:48 +0000)]
Generate code to silence bogus GCC warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24593
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Dec 2005 19:04:38 +0000 (19:04 +0000)]
The basic fneg cases are already autogen'd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24592
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Dec 2005 19:01:59 +0000 (19:01 +0000)]
Autogen matching code for ADJCALLSTACK[UP|DOWN], thanks to Evan's tblgen
improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24591
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Dec 2005 18:48:01 +0000 (18:48 +0000)]
Finish moving uncond br over to .td file, remove from .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24590
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Dec 2005 18:42:54 +0000 (18:42 +0000)]
Define BR in the .td file now that Evan made tblgen smarter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24589
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 4 Dec 2005 08:19:43 +0000 (08:19 +0000)]
Added isel patterns for RET, JMP, and WRITEPORT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24588
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 4 Dec 2005 08:18:16 +0000 (08:18 +0000)]
* Commit the fix (by Chris) for a tblgen type inferencing bug.
* Enhanced tblgen to handle instructions which have chain operand and writes a
chain result.
* Enhanced tblgen to handle instructions which produces no results. Part of
the change is a temporary hack which relies on instruction property (e.g.
isReturn, isBranch). The proper fix would be to change the .td syntax to
separate results dag from ops dag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24587
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 4 Dec 2005 08:13:17 +0000 (08:13 +0000)]
* Added instruction property hasCtrlDep for those which r/w control-flow
chains.
* Added DAG node property SDNPHasChain for nodes which r/w control-flow
chains.
* Renamed SDTVT to SDTOther.
* Added several new SDTypeProfiles for BR, BRCOND, RET, and WRITEPORT.
* Added SDNode definitions for BR, BRCOND, RET, and WRITEPORT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24586
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Dec 2005 06:03:50 +0000 (06:03 +0000)]
Fix PR672 another way which should be more robust
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24585
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Dec 2005 06:03:25 +0000 (06:03 +0000)]
new testcase, for PR672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24584
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Dec 2005 18:50:48 +0000 (18:50 +0000)]
dbg.stoppoint returns a value, don't forget to init it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24583
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Dec 2005 18:26:41 +0000 (18:26 +0000)]
expand testcase, which has been in my tree for a while now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24582
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Dec 2005 18:25:58 +0000 (18:25 +0000)]
Fix SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24581
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Dec 2005 18:25:32 +0000 (18:25 +0000)]
new testcase, miscompiled by simplifycfg. This has been distilled from Ptrdist/bc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24580
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Dec 2005 17:20:57 +0000 (17:20 +0000)]
Fix a bug in the testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24579
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Dec 2005 07:15:55 +0000 (07:15 +0000)]
Fix test/Regression/ExecutionEngine/2005-12-02-TailCallBug.ll and PR672.
This also fixes 177.mesa, the only program that fails with --enable-x86-fastcc
turned on. Given a clean nightly tester run, we should be able to turn it
on by default!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24578
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Dec 2005 07:14:47 +0000 (07:14 +0000)]
new testcase for PR672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24577
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Dec 2005 19:00:22 +0000 (19:00 +0000)]
Revert my previous patch which broke due to lazy streaming of functions
from .bc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24575
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 2 Dec 2005 06:08:08 +0000 (06:08 +0000)]
bah, must generate all results
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24574
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 2 Dec 2005 04:56:24 +0000 (04:56 +0000)]
cycle counter fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24573
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Dec 2005 00:11:20 +0000 (00:11 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24572
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 23:14:50 +0000 (23:14 +0000)]
Don't remove two operand, two result nodes from the binary ops map. These
should come from the arbitrary ops map.
This fixes Regression/CodeGen/PowerPC/2005-12-01-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24571
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 23:14:09 +0000 (23:14 +0000)]
New testcase that crashes llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24570
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 22:48:23 +0000 (22:48 +0000)]
If a module has a main, but it is defined externally, refuse to run it.
Attempting to run it will find lli's main, which isn't the desired effect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24569
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 18:21:35 +0000 (18:21 +0000)]
Promote line and column number information for our friendly 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24568
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 18:19:53 +0000 (18:19 +0000)]
IA64 doesn't support the LOCATION node, and for some reason the ISelPattern
stuff isn't using ISelLowering.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24567
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 18:09:22 +0000 (18:09 +0000)]
Make sure these get added into the codegenmap when appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24566
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 18:00:57 +0000 (18:00 +0000)]
This is a bugfix for SelectNodeTo. In certain situations, we could be
selecting a node and use a mix of getTargetNode() and SelectNodeTo. Because
SelectNodeTo didn't check the CSE maps for a preexisting node and didn't insert
its result into the CSE maps, we would sometimes miss a CSE opportunity.
This is extremely rare, but worth fixing for completeness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24565
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 1 Dec 2005 17:48:51 +0000 (17:48 +0000)]
major think-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24564
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 04:51:06 +0000 (04:51 +0000)]
Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work. This change has no effect on generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24563
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 04:48:26 +0000 (04:48 +0000)]
Cosmetic change, better reflects actual values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24562
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Dec 2005 03:50:19 +0000 (03:50 +0000)]
Fix a regression caused by a patch earlier today
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24561
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 1 Dec 2005 01:53:10 +0000 (01:53 +0000)]
Flags where I think I need them, quick, before the nightly tester starts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24560
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 1 Dec 2005 00:43:55 +0000 (00:43 +0000)]
Proper support for shifts with register shift value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24559
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 1 Dec 2005 00:41:50 +0000 (00:41 +0000)]
Use a getCopyToReg() variant to generate a flaggy CopyToReg node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24558
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 1 Dec 2005 00:18:45 +0000 (00:18 +0000)]
Teach tblgen to accept register source operands in patterns, e.g.
def SHL8rCL : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
"shl{b} {%cl, $dst|$dst, %CL}",
[(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;
This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24557
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 00:12:04 +0000 (00:12 +0000)]
Nuke CodeGenInstruction's ValueType member, it is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24556
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 1 Dec 2005 00:06:14 +0000 (00:06 +0000)]
Stop checking the ValueType of the CodeGenInstruction. Instead, use the
ValueType from the RegisterClass or Operands. This step is necessary to
allow RegisterClasses to have multiple ValueTypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24555
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Nov 2005 23:58:18 +0000 (23:58 +0000)]
fit into 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24554
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 23:08:45 +0000 (23:08 +0000)]
Make the code generated by tblgen return the result of SelectNodeTo, to
permit future changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 23:04:38 +0000 (23:04 +0000)]
SelectNodeTo now returns its result, we must pay attention to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24552
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 23:02:08 +0000 (23:02 +0000)]
Pay attn to the node returned by SelectNodeTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24551
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 22:59:19 +0000 (22:59 +0000)]
SelectNodeTo now returns its result, we must pay attention to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24550
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 22:53:06 +0000 (22:53 +0000)]
SelectNodeTo now returns N. Use it instead of return N directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24549
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 22:45:14 +0000 (22:45 +0000)]
Make SelectNodeTo return N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24548
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 20:40:54 +0000 (20:40 +0000)]
Fix Regression/CodeGen/PowerPC/2005-11-30-vastart-crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24547
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 20:40:28 +0000 (20:40 +0000)]
Test that crashes the ppc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24546
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 19:38:22 +0000 (19:38 +0000)]
Fix a bug where we didn't realize that vaarg reads memory. This fixes
Transforms/DeadStoreElimination/2005-11-30-vaarg.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24545
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 19:37:08 +0000 (19:37 +0000)]
new testcase dse is miscompiling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24544
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 19:31:23 +0000 (19:31 +0000)]
Add a simple clear() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24543
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Nov 2005 18:57:39 +0000 (18:57 +0000)]
Fix a typo in my latest change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24542
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Nov 2005 18:54:35 +0000 (18:54 +0000)]
No longer track value types for asm printer operands, and remove them as
an argument to every operand printing function. Requires some slight
tweaks to x86, the only user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24541
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Nov 2005 18:37:14 +0000 (18:37 +0000)]
Fix some copy and paste typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24540
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 18:20:52 +0000 (18:20 +0000)]
CALLSEQ_START/END nodes don't get memoized, do not add them in when
replaceAllUses'ing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24539
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 30 Nov 2005 17:14:11 +0000 (17:14 +0000)]
remove redundant code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24538
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 30 Nov 2005 17:12:26 +0000 (17:12 +0000)]
At long last, you can say that f32 isn't supported for setcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24537
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 30 Nov 2005 17:11:20 +0000 (17:11 +0000)]
Make typesafe that which isn't: FCMOVxx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24536
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 30 Nov 2005 16:10:29 +0000 (16:10 +0000)]
FPSelect and more custom lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24535
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Nov 2005 08:22:07 +0000 (08:22 +0000)]
First chunk of actually generating vector code for packed types. These
changes allow us to generate the following code:
_foo:
li r2, 0
lvx v0, r2, r3
vaddfp v0, v0, v0
stvx v0, r2, r3
blr
for this llvm:
void %foo(<4 x float>* %a) {
entry:
%tmp1 = load <4 x float>* %a
%tmp2 = add <4 x float> %tmp1, %tmp1
store <4 x float> %tmp2, <4 x float>* %a
ret void
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24534
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 30 Nov 2005 07:19:56 +0000 (07:19 +0000)]
All sorts of stuff.
Getting in on the custom lowering thing, yay
evilness with fp setcc, yuck
trivial int select, hmmm
in memory args for functions, yay
DIV and REM, always handy. They should be custom lowered though.
Lots more stuff compiles now (go go single source!). Of course, none of it
probably works, but that is what the nightly tester can find out :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24533
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 30 Nov 2005 06:43:03 +0000 (06:43 +0000)]
add support for custom lowering SINT_TO_FP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24531
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 06:35:34 +0000 (06:35 +0000)]
Add a link to the doxygen tarball
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24530
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 06:31:28 +0000 (06:31 +0000)]
copy the doxygen tarball into the HTML directory after building it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24529
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 05:26:03 +0000 (05:26 +0000)]
minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24528
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 30 Nov 2005 05:21:10 +0000 (05:21 +0000)]
Fix a problem with llvm-ranlib that (on some platforms) caused the archive
file to become corrupted due to interactions between mmap'd memory segments
and file descriptors closing. The problem is completely avoiding by using
a third temporary file.
Patch provided by Evan Jones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Nov 2005 05:11:18 +0000 (05:11 +0000)]
Fix a bug in a recent patch that broke shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24526
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 30 Nov 2005 02:51:20 +0000 (02:51 +0000)]
Added support to STORE and shifts to DAG to DAG isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24525
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 30 Nov 2005 02:49:21 +0000 (02:49 +0000)]
Fixed a bug introduced by my last commit: TargetGlobalValues should key on
GlobalValue * and index pair. Update getGlobalAddress() for symmetry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24524
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 30 Nov 2005 02:04:11 +0000 (02:04 +0000)]
Added an index field to GlobalAddressSDNode so it can represent X+12, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24523
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 30 Nov 2005 01:59:00 +0000 (01:59 +0000)]
Fixed a minor bug: - -offset != offset iff offset == MININT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24522
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 29 Nov 2005 22:42:50 +0000 (22:42 +0000)]
Represent the encoding of the SPR instructions as they actually are, so
that we can use the correct SPR numbers in the InstrInfo.td file. This is
necessary to support VRsave.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24521
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 29 Nov 2005 19:38:52 +0000 (19:38 +0000)]
Add more X86 ISel patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24520
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 29 Nov 2005 18:44:58 +0000 (18:44 +0000)]
Better error message when unrecognized opcode is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24519
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 29 Nov 2005 08:17:20 +0000 (08:17 +0000)]
Hook up one type, v4f32, to the VR RegisterClass for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24517
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 29 Nov 2005 08:04:45 +0000 (08:04 +0000)]
Add the remainder of the AltiVec 4 x float instructions. Further
enhancements will be necessary to teach the code generator that since
there is no fmul, it will have to do vmaddfp, adding +0.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24516
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Nov 2005 06:21:05 +0000 (06:21 +0000)]
Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24515
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 29 Nov 2005 06:19:38 +0000 (06:19 +0000)]
Add the new vector types to tablegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24514
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Nov 2005 06:16:21 +0000 (06:16 +0000)]
No targets support line number info yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24513
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Nov 2005 06:15:39 +0000 (06:15 +0000)]
Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24512
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 29 Nov 2005 05:45:29 +0000 (05:45 +0000)]
Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 29 Nov 2005 04:59:46 +0000 (04:59 +0000)]
Fixed a comment bug:
createPPCPatternInstructionSelector -> createPPCISelPattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24510
91177308-0d34-0410-b5e6-
96231b3b80d8