Evan Cheng [Tue, 12 Dec 2006 21:32:44 +0000 (21:32 +0000)]
Expand ConstantFP to load from CP if float types are being expanded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32494
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 12 Dec 2006 21:21:32 +0000 (21:21 +0000)]
Expand i32/i64 CopyToReg f32/f64 to BIT_CONVERT + CopyToReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32493
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 12 Dec 2006 20:57:08 +0000 (20:57 +0000)]
Honor cpu directive, take two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32492
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 12 Dec 2006 20:55:58 +0000 (20:55 +0000)]
Ignore entries with blank names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32491
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 12 Dec 2006 19:53:13 +0000 (19:53 +0000)]
- When expanding a bit_convert whose src operand is also to be expanded and
its expansion result type is equal to the result type of the bit_convert,
e.g. (i64 bit_convert (f64 op)) if FP is not legal
returns the result of the expanded source operand.
- Store f32 / f64 may be expanded to a single store i32/i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32490
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 12 Dec 2006 19:36:53 +0000 (19:36 +0000)]
Remove unneeded include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32489
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 12 Dec 2006 19:26:50 +0000 (19:26 +0000)]
Rollback changes to take a different tack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32488
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 19:11:20 +0000 (19:11 +0000)]
this can be trunc or bitcast, per line 3092.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32487
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 18:41:03 +0000 (18:41 +0000)]
Fix regression on 400.perlbench last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32486
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Dec 2006 17:10:13 +0000 (17:10 +0000)]
more general matching of the MVN instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32484
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 12 Dec 2006 16:07:33 +0000 (16:07 +0000)]
Honor the command line specification for machine type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32483
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Dec 2006 14:03:29 +0000 (14:03 +0000)]
don't use "ordinary" addressing mode 1 when mvn is appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32482
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Tue, 12 Dec 2006 13:23:43 +0000 (13:23 +0000)]
Reduce number of instructions to load 64-bit constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32481
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 09:18:51 +0000 (09:18 +0000)]
Fix numerous inferred casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32479
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 09:17:50 +0000 (09:17 +0000)]
Get even more accurate on the casting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32478
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 09:17:08 +0000 (09:17 +0000)]
Fix the casting for the computation of the Malloc size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32477
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 12 Dec 2006 07:27:38 +0000 (07:27 +0000)]
Expand formal arguments and call arguments recursively: e.g. f64 -> i64 -> 2 x i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32476
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 05:38:50 +0000 (05:38 +0000)]
Don't create usless casts for same-bith-width floating point casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32475
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 05:22:21 +0000 (05:22 +0000)]
fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 05:21:51 +0000 (05:21 +0000)]
this can only be fptrunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32473
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 05:19:46 +0000 (05:19 +0000)]
This case isn't needed with recent changes to ConstantInt::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32472
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 05:18:19 +0000 (05:18 +0000)]
split up inttoptr from ptrtoint handling, the cases aren't similar at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 05:14:13 +0000 (05:14 +0000)]
the operand of a bitcast is always the right size, just emit it in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32470
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 05:05:00 +0000 (05:05 +0000)]
Change inferred getCast into specific getCast. Passes all tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32469
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 04:24:41 +0000 (04:24 +0000)]
Patch for PR1045 and Transforms/ScalarRepl/2006-12-11-SROA-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32468
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 04:24:17 +0000 (04:24 +0000)]
new testcase for pr1045
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32467
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 04:18:56 +0000 (04:18 +0000)]
Revert Nate's patch to fix X86/store-fp-constant.ll. With the dag combiner
and legalizer separated like they currently are, I don't see a way to handle
this xform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 04:16:14 +0000 (04:16 +0000)]
make this code more aggressive about turning store fpimm into store int imm.
This is not sufficient to fix X86/store-fp-constant.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 03:59:46 +0000 (03:59 +0000)]
This should check for darwin literal sections as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32464
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 12 Dec 2006 02:26:09 +0000 (02:26 +0000)]
teach scev to analyze X*4|1 like X*4+c. This allows us to produce:
LBB1_1: #bb
movdqa (%esi), %xmm2
movaps %xmm2, %xmm3
punpcklbw %xmm0, %xmm3
movaps %xmm3, %xmm4
punpcklwd %xmm0, %xmm4
cvtdq2ps %xmm4, %xmm4
mulps %xmm1, %xmm4
movaps %xmm4, (%edi)
leal 1(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 2(,%eax,4), %ebx
shll $4, %ebx
punpckhbw %xmm0, %xmm2
movaps %xmm2, %xmm3
punpcklwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 3(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm2
cvtdq2ps %xmm2, %xmm2
mulps %xmm1, %xmm2
movaps %xmm2, (%edx,%ebx)
addl $64, %edi
incl %eax
addl $16, %esi
cmpl %ecx, %eax
jne LBB1_1 #bb
instead of:
LBB1_1: #bb
movdqa (%esi), %xmm2
movaps %xmm2, %xmm3
punpcklbw %xmm0, %xmm3
movaps %xmm3, %xmm4
punpcklwd %xmm0, %xmm4
cvtdq2ps %xmm4, %xmm4
mulps %xmm1, %xmm4
movaps %xmm4, (%edi)
leal 1(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 2(,%eax,4), %ebx
shll $4, %ebx
punpckhbw %xmm0, %xmm2
movaps %xmm2, %xmm3
punpcklwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 3(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm2
cvtdq2ps %xmm2, %xmm2
mulps %xmm1, %xmm2
movaps %xmm2, (%edx,%ebx)
addl $64, %edi
incl %eax
addl $16, %esi
cmpl %ecx, %eax
jne LBB1_1 #bb
for a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32463
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 01:32:02 +0000 (01:32 +0000)]
Tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32462
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 01:31:37 +0000 (01:31 +0000)]
Generate the correct cast opcode for constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32461
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 01:17:41 +0000 (01:17 +0000)]
Change inferred cast creation calls to more specific cast creations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32460
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Dec 2006 01:03:11 +0000 (01:03 +0000)]
use MVN to handle small negative constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32459
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 00:53:31 +0000 (00:53 +0000)]
Don't bother upgrading this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32458
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 00:51:07 +0000 (00:51 +0000)]
Implement getIntegerCast and getFPCast for ConstantExpr. These are similar
to the createIntegerCast and createFPCast for CastInst instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32457
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 00:49:44 +0000 (00:49 +0000)]
Implement createIntegerCast and createFPCast factory methods for handling
integer and floating point cast creation. createIntegerCast generates
ZExt/SExt, BitCast or Trunc. createFPCast generates FPExt, Bitcast, or
FPTrunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32456
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 00:43:38 +0000 (00:43 +0000)]
Fix PR1040:
Don't rebuild llvm-config if none of the library dependencies changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32455
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Dec 2006 00:37:38 +0000 (00:37 +0000)]
add mvn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32454
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 12 Dec 2006 00:11:08 +0000 (00:11 +0000)]
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
Rafael Espindola [Mon, 11 Dec 2006 23:56:10 +0000 (23:56 +0000)]
add note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32452
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Dec 2006 23:22:45 +0000 (23:22 +0000)]
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
Reid Spencer [Mon, 11 Dec 2006 23:20:20 +0000 (23:20 +0000)]
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
Reid Spencer [Mon, 11 Dec 2006 23:19:53 +0000 (23:19 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 21:42:55 +0000 (21:42 +0000)]
getInstrItineraryData shouldn't copy the itineraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32448
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 11 Dec 2006 21:27:28 +0000 (21:27 +0000)]
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
Reid Spencer [Mon, 11 Dec 2006 21:25:10 +0000 (21:25 +0000)]
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
Reid Spencer [Mon, 11 Dec 2006 20:40:28 +0000 (20:40 +0000)]
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
Reid Spencer [Mon, 11 Dec 2006 20:39:15 +0000 (20:39 +0000)]
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
Evan Cheng [Mon, 11 Dec 2006 19:27:14 +0000 (19:27 +0000)]
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
John Criswell [Mon, 11 Dec 2006 19:15:36 +0000 (19:15 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 18:53:38 +0000 (18:53 +0000)]
Revert changes that broke oggenc on ppc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32440
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Mon, 11 Dec 2006 18:45:56 +0000 (18:45 +0000)]
Missing opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32439
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Dec 2006 18:30:27 +0000 (18:30 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 18:29:07 +0000 (18:29 +0000)]
constant folding of bitcast is broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32437
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Mon, 11 Dec 2006 18:10:54 +0000 (18:10 +0000)]
Layout proper frame for ppc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32436
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 11 Dec 2006 17:42:12 +0000 (17:42 +0000)]
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
Evan Cheng [Mon, 11 Dec 2006 17:25:19 +0000 (17:25 +0000)]
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
Evan Cheng [Mon, 11 Dec 2006 06:50:04 +0000 (06:50 +0000)]
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
Evan Cheng [Mon, 11 Dec 2006 06:25:26 +0000 (06:25 +0000)]
Clean up some bad code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32432
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 11 Dec 2006 02:23:46 +0000 (02:23 +0000)]
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
Nate Begeman [Mon, 11 Dec 2006 02:20:45 +0000 (02:20 +0000)]
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
Nate Begeman [Mon, 11 Dec 2006 02:19:29 +0000 (02:19 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 02:16:58 +0000 (02:16 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32428
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Dec 2006 01:20:25 +0000 (01:20 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 01:17:00 +0000 (01:17 +0000)]
trunc to integer, not to FP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32426
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Dec 2006 01:03:32 +0000 (01:03 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 01:01:03 +0000 (01:01 +0000)]
this is done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32424
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Dec 2006 00:44:03 +0000 (00:44 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 00:35:08 +0000 (00:35 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 00:34:27 +0000 (00:34 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32421
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Dec 2006 00:12:31 +0000 (00:12 +0000)]
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
Chris Lattner [Mon, 11 Dec 2006 00:12:07 +0000 (00:12 +0000)]
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
Chris Lattner [Sun, 10 Dec 2006 23:56:50 +0000 (23:56 +0000)]
* 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
Chris Lattner [Sun, 10 Dec 2006 23:52:28 +0000 (23:52 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32417
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 10 Dec 2006 23:29:19 +0000 (23:29 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32416
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 10 Dec 2006 23:12:42 +0000 (23:12 +0000)]
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
Chris Lattner [Sun, 10 Dec 2006 19:01:52 +0000 (19:01 +0000)]
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
Jim Laskey [Sun, 10 Dec 2006 13:09:42 +0000 (13:09 +0000)]
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
Jim Laskey [Sun, 10 Dec 2006 12:13:31 +0000 (12:13 +0000)]
__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
Chris Lattner [Sun, 10 Dec 2006 07:40:46 +0000 (07:40 +0000)]
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
Reid Spencer [Sun, 10 Dec 2006 04:56:38 +0000 (04:56 +0000)]
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
Reid Spencer [Sun, 10 Dec 2006 04:09:19 +0000 (04:09 +0000)]
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
Rafael Espindola [Sun, 10 Dec 2006 02:53:14 +0000 (02:53 +0000)]
.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
Rafael Espindola [Sat, 9 Dec 2006 23:14:08 +0000 (23:14 +0000)]
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
Rafael Espindola [Sat, 9 Dec 2006 21:21:06 +0000 (21:21 +0000)]
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
Reid Spencer [Sat, 9 Dec 2006 19:41:25 +0000 (19:41 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32405
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 9 Dec 2006 19:40:41 +0000 (19:40 +0000)]
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
Reid Spencer [Sat, 9 Dec 2006 19:39:56 +0000 (19:39 +0000)]
Fix the run line and make this test more specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32403
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 9 Dec 2006 19:35:43 +0000 (19:35 +0000)]
Add a check to catch an incorrect upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32402
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 9 Dec 2006 16:57:22 +0000 (16:57 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32400
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 9 Dec 2006 16:56:55 +0000 (16:56 +0000)]
When upgrading cast to bool to a setne, generate icmp ne instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32399
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 9 Dec 2006 05:13:50 +0000 (05:13 +0000)]
Too soon to commit, revert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32397
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 9 Dec 2006 05:13:01 +0000 (05:13 +0000)]
New test cases for regressions in the SetCC -> ICmp patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32396
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 9 Dec 2006 04:42:33 +0000 (04:42 +0000)]
Allow the input of the test program to be specified.
Don't generate the reference output for each comparison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32395
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 9 Dec 2006 02:42:38 +0000 (02:42 +0000)]
Preliminary soft float support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32394
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 9 Dec 2006 02:41:30 +0000 (02:41 +0000)]
Added option -soft-float to generate SW fp library calls instead of fp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32393
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 9 Dec 2006 01:35:43 +0000 (01:35 +0000)]
Fixed some formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32392
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 9 Dec 2006 01:27:51 +0000 (01:27 +0000)]
Another example of using the llvm IO streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32391
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 9 Dec 2006 01:20:34 +0000 (01:20 +0000)]
Add documentation for how to use the new LLVM streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32390
91177308-0d34-0410-b5e6-
96231b3b80d8