Rafael Espindola
450856d01b
add mvn
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32454 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 00:37:38 +00:00
Reid Spencer
22b36fb7eb
Fix the BitCastUnion type for 32-bit targets.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 00:11:08 +00:00
Rafael Espindola
4dfab986ab
add note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 23:56:10 +00:00
Chris Lattner
57fc62c8d2
Another step forward in PPC64 JIT support: we now no-longer need stubs
...
emitted for external globals in PPC64-JIT-PIC mode (which is good because
we didn't handle them before!).
This also fixes a bug handling the picbase delta, which we would get wrong
in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32451 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 23:22:45 +00:00
Reid Spencer
a77fa7edbf
Create the cast constant expression that was read instead of attempting
...
to infer the cast from its operand and type. This fixes:
test/Regression/Bytecode/2006-12-11-Cast-ConstExpr.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32450 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 23:20:20 +00:00
Reid Spencer
1565491af2
Test case for ensuring correct reading back of cast constant expressions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32449 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 23:19:53 +00:00
Chris Lattner
442b9a6981
getInstrItineraryData shouldn't copy the itineraries
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32448 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 21:42:55 +00:00
Reid Spencer
8c4fed50e3
Fix constant folding of FP->int due to cut & paste error in last commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 21:27:28 +00:00
Reid Spencer
6a126513fc
Add a test for constant folding of bitcast to/from floating point.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 21:25:10 +00:00
Reid Spencer
711679e21c
Provide a test for int<->float and long<->double bitcasts.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 20:40:28 +00:00
Reid Spencer
555a0b189c
Implement correct bitcast of int<->float and long<->double by using a
...
union to perform the bitcast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32444 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 20:39:15 +00:00
Evan Cheng
13acce3ef0
Re-apply changes that were backed out and fix a naughty typo.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32442 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 19:27:14 +00:00
John Criswell
2381f6f6c6
It seems the llvm::OStream class does not handle stream manipulators.
...
For now, just grab the stream and perform the output on it directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32441 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 19:15:36 +00:00
Chris Lattner
70a24b3141
Revert changes that broke oggenc on ppc
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32440 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 18:53:38 +00:00
Jim Laskey
2060a822fe
Missing opcode.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32439 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 18:45:56 +00:00
Chris Lattner
14f440aae7
Implement correct constant folding of bitcast. This implements
...
Transforms/ConstProp/bitcast.ll and fixes
SingleSource/Regression/C/2003-10-12-GlobalVarInitializers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32438 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 18:30:27 +00:00
Chris Lattner
4ed4ac34c3
constant folding of bitcast is broken.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32437 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 18:29:07 +00:00
Jim Laskey
18e2f4433e
Layout proper frame for ppc64.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32436 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 18:10:54 +00:00
Reid Spencer
33c9683865
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32435 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 17:42:12 +00:00
Evan Cheng
25ece66ff3
Don't convert store double C, Ptr to store long C, Ptr if i64 is not a legal type.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 17:25:19 +00:00
Evan Cheng
bbf1e5e2e9
f32 / f64 node is expanded to one i32 / i64 node.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32433 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 06:50:04 +00:00
Evan Cheng
b618230231
Clean up some bad code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 06:25:26 +00:00
Nate Begeman
2cbba89347
Move something that should be in the dag combiner from the legalizer to the
...
dag combiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32431 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:23:46 +00:00
Nate Begeman
bfaaaa6e0f
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32430 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:20:45 +00:00
Nate Begeman
5381baa051
Add a default relocation type, and allow clients to set the ConstantVal
...
field after creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32429 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:19:29 +00:00
Chris Lattner
36c2451ddb
fix typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32428 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:16:58 +00:00
Chris Lattner
9f09fa2900
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32427 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 01:20:25 +00:00
Chris Lattner
509f85140c
trunc to integer, not to FP.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32426 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 01:17:00 +00:00
Chris Lattner
d36a76d655
the xform is done by scalarrepl not the code generator.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32425 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 01:03:32 +00:00
Chris Lattner
b4115ac8f3
this is done
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32424 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 01:01:03 +00:00
Chris Lattner
a5546fbd10
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32423 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 00:44:03 +00:00
Chris Lattner
1dbea1598c
implement promotion of unions containing two packed types of the same width.
...
This implements Transforms/ScalarRepl/union-packed.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32422 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 00:35:08 +00:00
Chris Lattner
e629ff0be8
new testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32421 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 00:34:27 +00:00
Chris Lattner
82e8a8ffe4
clarify some comments, simplify some checks, fix:
...
Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32420 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 00:12:31 +00:00
Chris Lattner
5bd2db38f8
testcase for a regression introduced by the recent cast patch
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32419 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 00:12:07 +00:00
Chris Lattner
ae6a305094
* 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32418 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 23:56:50 +00:00
Chris Lattner
1846783d93
new testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32417 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 23:52:28 +00:00
Reid Spencer
afa22e2363
Regenerate.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32416 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 23:29:19 +00:00
Anton Korobeynikov
d27a258d2d
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32415 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 23:12:42 +00:00
Chris Lattner
ca3aa26c20
make statistics and timing info print even if the JIT'd program calls exit
...
instead of returning from main.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32414 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 19:01:52 +00:00
Jim Laskey
0eadd73bd7
Reverting until finding the cause of secondary bugs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32413 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 13:09:42 +00:00
Jim Laskey
630def54f4
__PPC64CompilationCallback code was allowing registers to be clobbered by stub.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32412 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 12:13:31 +00:00
Chris Lattner
87f28e87d7
fix PR1039 by making timing info be destroyed by llvm_shutdown, not by
...
static dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32411 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 07:40:46 +00:00
Reid Spencer
4413672aa5
Don't bother with setting the path before running llvm-gcc4, it doesn't
...
need it like llvm-gcc3 did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32410 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 04:56:38 +00:00
Reid Spencer
281722dab8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32409 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 04:09:19 +00:00
Rafael Espindola
796cbd87b4
.align is in bits
...
.comm is in bytes
:-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32408 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 02:53:14 +00:00
Rafael Espindola
3e69a7e527
fix test/Regression/CodeGen/X86/weak.ll
...
if a variable has no initialization, I->getInitializer() will fail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32407 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 23:14:08 +00:00
Rafael Espindola
5b24426375
use a . instead of a % in the grep expression
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32406 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 21:21:06 +00:00
Reid Spencer
5fe27e7b99
Regenerate.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32405 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 19:41:25 +00:00
Reid Spencer
7969681c8b
Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
...
Do not upgrade casts of bool to bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32404 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 19:40:41 +00:00