1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 05:53:07 +01:00
Commit Graph

28342 Commits

Author SHA1 Message Date
Reid Spencer
ae700cd02a Test case for ensuring correct reading back of cast constant expressions.
llvm-svn: 32449
2006-12-11 23:19:53 +00:00
Chris Lattner
7f60301c69 getInstrItineraryData shouldn't copy the itineraries
llvm-svn: 32448
2006-12-11 21:42:55 +00:00
Reid Spencer
f48e2567ae Fix constant folding of FP->int due to cut & paste error in last commit.
llvm-svn: 32447
2006-12-11 21:27:28 +00:00
Reid Spencer
3991c4af05 Add a test for constant folding of bitcast to/from floating point.
llvm-svn: 32446
2006-12-11 21:25:10 +00:00
Reid Spencer
6567a0ac08 Provide a test for int<->float and long<->double bitcasts.
llvm-svn: 32445
2006-12-11 20:40:28 +00:00
Reid Spencer
0549f720b2 Implement correct bitcast of int<->float and long<->double by using a
union to perform the bitcast.

llvm-svn: 32444
2006-12-11 20:39:15 +00:00
Evan Cheng
e182862c91 Re-apply changes that were backed out and fix a naughty typo.
llvm-svn: 32442
2006-12-11 19:27:14 +00:00
John Criswell
d5817b08f5 It seems the llvm::OStream class does not handle stream manipulators.
For now, just grab the stream and perform the output on it directly.

llvm-svn: 32441
2006-12-11 19:15:36 +00:00
Chris Lattner
7124b0d561 Revert changes that broke oggenc on ppc
llvm-svn: 32440
2006-12-11 18:53:38 +00:00
Jim Laskey
e2a261ad36 Missing opcode.
llvm-svn: 32439
2006-12-11 18:45:56 +00:00
Chris Lattner
f512c0d8e5 Implement correct constant folding of bitcast. This implements
Transforms/ConstProp/bitcast.ll and fixes
SingleSource/Regression/C/2003-10-12-GlobalVarInitializers

llvm-svn: 32438
2006-12-11 18:30:27 +00:00
Chris Lattner
e1ea74ac70 constant folding of bitcast is broken.
llvm-svn: 32437
2006-12-11 18:29:07 +00:00
Jim Laskey
911ae665d0 Layout proper frame for ppc64.
llvm-svn: 32436
2006-12-11 18:10:54 +00:00
Reid Spencer
d5ba7eadcc Provide a script that can track down which optimization pass causes
different code to be produced between two llvm builds that differe slightly.
This is useful in tracking down mis-optimization bugs.

llvm-svn: 32435
2006-12-11 17:42:12 +00:00
Evan Cheng
93c75d4cfb Don't convert store double C, Ptr to store long C, Ptr if i64 is not a legal type.
llvm-svn: 32434
2006-12-11 17:25:19 +00:00
Evan Cheng
4eebfee858 f32 / f64 node is expanded to one i32 / i64 node.
llvm-svn: 32433
2006-12-11 06:50:04 +00:00
Evan Cheng
44f9ec68ab Clean up some bad code.
llvm-svn: 32432
2006-12-11 06:25:26 +00:00
Nate Begeman
2566f75e7a Move something that should be in the dag combiner from the legalizer to the
dag combiner.

llvm-svn: 32431
2006-12-11 02:23:46 +00:00
Nate Begeman
b1b1aaa4e5 Properly mangles symbol table names
Supports constant pools
Supports relocations to jump tables
Supports relocations within the data segment (global = address of global)
Allocates memory in a non-hacky for all non-code objects.

llvm-svn: 32430
2006-12-11 02:20:45 +00:00
Nate Begeman
3d2e738f0c Add a default relocation type, and allow clients to set the ConstantVal
field after creation.

llvm-svn: 32429
2006-12-11 02:19:29 +00:00
Chris Lattner
6ea5a77a93 fix typo
llvm-svn: 32428
2006-12-11 02:16:58 +00:00
Chris Lattner
8f2a26ac12 Update note, with the SROA change, we now produce:
_pairtest:
        movl 8(%esp), %eax
        movl 4(%esp), %ecx
        movd %eax, %xmm0
        movd %ecx, %xmm1
        addss %xmm0, %xmm1
        movl 12(%esp), %eax
        movss %xmm1, (%eax)
        ret

instead of:

_pairtest:
        subl $12, %esp
        movl 20(%esp), %eax
        movl %eax, 4(%esp)
        movl 16(%esp), %eax
        movl %eax, (%esp)
        movss (%esp), %xmm0
        addss 4(%esp), %xmm0
        movl 24(%esp), %eax
        movss %xmm0, (%eax)
        addl $12, %esp
        ret

llvm-svn: 32427
2006-12-11 01:20:25 +00:00
Chris Lattner
28e7eaf6b8 trunc to integer, not to FP.
llvm-svn: 32426
2006-12-11 01:17:00 +00:00
Chris Lattner
fe54dfef65 the xform is done by scalarrepl not the code generator.
llvm-svn: 32425
2006-12-11 01:03:32 +00:00
Chris Lattner
a6428b2ce4 this is done
llvm-svn: 32424
2006-12-11 01:01:03 +00:00
Chris Lattner
48e3989461 Evan implemented the machineinstr improvements.
The rot example works if the type is cast to ubyte.

Move sroa examples together and upgrade them to HEAD syntax.

llvm-svn: 32423
2006-12-11 00:44:03 +00:00
Chris Lattner
a8eec08185 implement promotion of unions containing two packed types of the same width.
This implements Transforms/ScalarRepl/union-packed.ll

llvm-svn: 32422
2006-12-11 00:35:08 +00:00
Chris Lattner
15956c6316 new testcase
llvm-svn: 32421
2006-12-11 00:34:27 +00:00
Chris Lattner
e31f99af99 clarify some comments, simplify some checks, fix:
Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll

llvm-svn: 32420
2006-12-11 00:12:31 +00:00
Chris Lattner
04231146c0 testcase for a regression introduced by the recent cast patch
llvm-svn: 32419
2006-12-11 00:12:07 +00:00
Chris Lattner
098fb42690 * Eliminate calls to CastInst::createInferredCast.
* Add support for promoting unions with fp values in them.  This produces
   our new int<->fp bitcast instructions, implementing
   Transforms/ScalarRepl/union-fp-int.ll

As an example, this allows us to compile this:

union intfloat { int i; float f; };
float invsqrt(const float arg_x) {
    union intfloat x = { .f = arg_x };
    const float xhalf = arg_x * 0.5f;
    x.i = 0x5f3759df - (x.i >> 1);
    return x.f * (1.5f - xhalf * x.f * x.f);
}

into:

_invsqrt:
        movss 4(%esp), %xmm0
        movd %xmm0, %eax
        sarl %eax
        movl $1597463007, %ecx
        subl %eax, %ecx
        movd %ecx, %xmm1
        mulss LCPI1_0, %xmm0
        mulss %xmm1, %xmm0
        movss LCPI1_1, %xmm2
        mulss %xmm1, %xmm0
        subss %xmm0, %xmm2
        movl 8(%esp), %eax
        mulss %xmm2, %xmm1
        movss %xmm1, (%eax)
        ret

instead of:

_invsqrt:
        subl $4, %esp
        movss 8(%esp), %xmm0
        movss %xmm0, (%esp)
        movl (%esp), %eax
        movl $1597463007, %ecx
        sarl %eax
        subl %eax, %ecx
        movl %ecx, (%esp)
        mulss LCPI1_0, %xmm0
        movss (%esp), %xmm1
        mulss %xmm1, %xmm0
        mulss %xmm1, %xmm0
        movss LCPI1_1, %xmm2
        subss %xmm0, %xmm2
        mulss %xmm2, %xmm1
        movl 12(%esp), %eax
        movss %xmm1, (%eax)
        addl $4, %esp
        ret

llvm-svn: 32418
2006-12-10 23:56:50 +00:00
Chris Lattner
a1bb8bb3cc new testcase
llvm-svn: 32417
2006-12-10 23:52:28 +00:00
Reid Spencer
fe7dfe16ee Regenerate.
llvm-svn: 32416
2006-12-10 23:29:19 +00:00
Anton Korobeynikov
e76b69846d Cleaned setjmp/longjmp lowering interfaces. Now we're producing right
code (both asm & cbe) for Mingw32 target.
Removed autoconf checks for underscored versions of setjmp/longjmp.

llvm-svn: 32415
2006-12-10 23:12:42 +00:00
Chris Lattner
7a39524d63 make statistics and timing info print even if the JIT'd program calls exit
instead of returning from main.

llvm-svn: 32414
2006-12-10 19:01:52 +00:00
Jim Laskey
3fa703d088 Reverting until finding the cause of secondary bugs.
llvm-svn: 32413
2006-12-10 13:09:42 +00:00
Jim Laskey
a8f4c1d137 __PPC64CompilationCallback code was allowing registers to be clobbered by stub.
llvm-svn: 32412
2006-12-10 12:13:31 +00:00
Chris Lattner
6df6fa3694 fix PR1039 by making timing info be destroyed by llvm_shutdown, not by
static dtors.

llvm-svn: 32411
2006-12-10 07:40:46 +00:00
Reid Spencer
ff1f259232 Don't bother with setting the path before running llvm-gcc4, it doesn't
need it like llvm-gcc3 did.

llvm-svn: 32410
2006-12-10 04:56:38 +00:00
Reid Spencer
8a76dee886 For PR739:
Define a DESTDIR variable and use it to define the various install
locations. This allows DESTDIR to be overridden on the command line.

llvm-svn: 32409
2006-12-10 04:09:19 +00:00
Rafael Espindola
9fe91fc84f .align is in bits
.comm is in bytes
:-(

llvm-svn: 32408
2006-12-10 02:53:14 +00:00
Rafael Espindola
8251abb0e9 fix test/Regression/CodeGen/X86/weak.ll
if a variable has no initialization, I->getInitializer() will fail

llvm-svn: 32407
2006-12-09 23:14:08 +00:00
Rafael Espindola
48db31af76 use a . instead of a % in the grep expression
llvm-svn: 32406
2006-12-09 21:21:06 +00:00
Reid Spencer
6957f0edcf Regenerate.
llvm-svn: 32405
2006-12-09 19:41:25 +00:00
Reid Spencer
2f57ee5361 Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
Do not upgrade casts of bool to bool.

llvm-svn: 32404
2006-12-09 19:40:41 +00:00
Reid Spencer
ab212d0054 Fix the run line and make this test more specific.
llvm-svn: 32403
2006-12-09 19:39:56 +00:00
Reid Spencer
363947c376 Add a check to catch an incorrect upgrade.
llvm-svn: 32402
2006-12-09 19:35:43 +00:00
Reid Spencer
0c2c4241c5 Regenerate.
llvm-svn: 32400
2006-12-09 16:57:22 +00:00
Reid Spencer
cc5dff3e5d When upgrading cast to bool to a setne, generate icmp ne instead.
llvm-svn: 32399
2006-12-09 16:56:55 +00:00
Reid Spencer
54036d73ce Too soon to commit, revert.
llvm-svn: 32397
2006-12-09 05:13:50 +00:00