Scott Michel
0be0339baa
CellSPU: Fix bug 3056. Varadic extract_element was not implemented (nor was it
...
ever conceived to occur).
llvm-svn: 59891
2008-11-22 23:50:42 +00:00
Nick Lewycky
07d726ec4d
Optimize (x/y)*y into x-(x%y) in general. Div and rem are about the same, and
...
a subtract is cheaper than a multiply. This generalizes an existing transform.
llvm-svn: 59800
2008-11-21 07:33:58 +00:00
Scott Michel
c6918c1ffa
CellSPU:
...
(a) Fix bgs 3052, 3057
(b) Incorporate Duncan's suggestions re: i1 promotion
(c) Indentation updates.
llvm-svn: 59790
2008-11-21 02:56:16 +00:00
Bill Wendling
d10202bfb1
Add generic test for add with overflow.
...
llvm-svn: 59781
2008-11-21 02:15:51 +00:00
Dan Gohman
52aece7eff
Test -pre-RA-sched=fast too, for completeness.
...
llvm-svn: 59741
2008-11-20 19:26:04 +00:00
Evan Cheng
c22215a090
- Register scavenger should use MachineRegisterInfo and internal map to find the first use of a register after a given machine instruction.
...
- When scavenging a register, in addition to the spill, insert a restore before the first use.
- Abort if client is looking to scavenge a register even when a previously scavenged register is still live.
llvm-svn: 59697
2008-11-20 02:32:35 +00:00
Devang Patel
7ed6c5317c
If there are two consecutive llvm.dbg.stoppoint calls then
...
it is likely that the optimizer deleted code in between these
two intrinsics. Keep only the last llvm.dbg.stoppoint in this case.
llvm-svn: 59657
2008-11-19 18:56:50 +00:00
Dan Gohman
7f480e04eb
Revert r59640. It broke this test for builds that aren't
...
configured with llvm-gcc.
llvm-svn: 59641
2008-11-19 16:24:37 +00:00
Dan Gohman
f09aabfe70
Use %llvmgcc -xassembler instead of invoking as directly. This avoids
...
problems for example when LLVM is built with --with-extra-options=-m64
and as defaults to x86-32 mode.
llvm-svn: 59640
2008-11-19 16:02:14 +00:00
Owen Anderson
1af37c2fca
Add support for rematerialization in pre-alloc-splitting.
...
llvm-svn: 59587
2008-11-19 04:28:29 +00:00
Daniel Dunbar
45535f3f22
LLVMC2: -emit-llvm stops compilation.
...
llvm-svn: 59586
2008-11-19 04:15:56 +00:00
Daniel Dunbar
2dd5aa4f11
LLVMC2: Teach llvm_gcc_c tool about -include and -fsyntax-only.
...
- Only focusing on llvm_gcc_c for now, eventually this needs to be
refactored so it can be shared via all the gcc-like tools.
llvm-svn: 59582
2008-11-19 02:59:00 +00:00
Evan Cheng
3095c32c89
Register scavenger should process early clobber defs first. A dead early clobber def should not interfere with a normal def which happens one slot later.
...
llvm-svn: 59559
2008-11-18 22:28:38 +00:00
Nick Lewycky
1c451ae43e
Add a utility function that detects whether a loop is guaranteed to be finite.
...
Use it to safely handle less-than-or-equals-to exit conditions in loops. These
also occur when the loop exit branch is exit on true because SCEV inverses the
icmp predicate.
Use it again to handle non-zero strides, but only with an unsigned comparison
in the exit condition.
llvm-svn: 59528
2008-11-18 15:10:54 +00:00
Duncan Sands
1315f80ea8
Reapply r59464, this time using the correct type
...
when softening FNEG.
llvm-svn: 59513
2008-11-18 09:15:03 +00:00
Bill Wendling
c6c6dc5b90
A simple test for stack protectors. This should be valid on all platforms.
...
llvm-svn: 59505
2008-11-18 07:34:50 +00:00
Bill Wendling
e0d5e67c98
Revert r59464. It was causing this failure:
...
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/XCore/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/XCore/fneg.ll
Failed with signal(SIGABRT) at line 1
while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/XCore/fneg.ll | llc -march=xcore > fneg.ll.tmp1.s
Assertion failed: (VT.isFloatingPoint() && "Cannot create integer FP constant!"), function getConstantFP, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 913.
0 llc 0x0092115c _ZN4llvm3sys18RemoveFileOnSignalERKNS0_4PathEPSs + 844
1 libSystem.B.dylib 0x9217809b _sigtramp + 43
2 ??? 0xffffffff 0x0 + 4294967295
3 libSystem.B.dylib 0x921f0ec2 raise + 26
4 libSystem.B.dylib 0x9220047f abort + 73
5 libSystem.B.dylib 0x921f2063 __assert_rtn + 101
6 llc 0x005a5b0a _ZN4llvm12SelectionDAG13getConmake[1]: *** [check-local] Error 1
make: *** [check] Error 2
llvm-svn: 59487
2008-11-18 01:49:24 +00:00
Devang Patel
f1e9329209
Give SIToFPInst preference over UIToFPInst because it is faster on platforms that are widely used.
...
llvm-svn: 59476
2008-11-18 00:40:02 +00:00
Devang Patel
180afd2c55
While handling floating point IVs lift restrictions on initial value and increment value.
...
llvm-svn: 59471
2008-11-17 23:27:13 +00:00
Duncan Sands
f046b50ecd
Add soft float support for a bunch more operations. Original
...
patch by Richard Osborne, tweaked and extended by your humble
servant.
llvm-svn: 59464
2008-11-17 20:52:38 +00:00
Dale Johannesen
39b34e6d32
Remove these, which test for optimizations that
...
are not currently done (cf PowerPC/README.txt).
llvm-svn: 59456
2008-11-17 18:57:45 +00:00
Richard Osborne
6751b4a604
Don't produce ADDC/ADDE when expanding SHL unless they are legal
...
for the target. This fixes PR3080.
llvm-svn: 59450
2008-11-17 17:34:31 +00:00
Lang Hames
41df63945d
Removed 2008-10-17-SpillerBug.ll as it does not provide an accurate test of PR2898.
...
llvm-svn: 59431
2008-11-16 23:30:12 +00:00
Lang Hames
782ec1a746
2008-10-17-SpillerBug.ll is currently failing, but this doesn't reflect an actual regression of PR2898. This test should probably be removed. I've XFAILed it for now to keep buildbot quiet while this is considered.
...
llvm-svn: 59415
2008-11-16 13:11:09 +00:00
Mon P Wang
7a82474387
Improved shuffle normalization to avoid using extract/build when we
...
can extract using different indexes for two vectors. Added a few tests
for vector shuffles.
llvm-svn: 59399
2008-11-16 05:06:27 +00:00
Chris Lattner
c3f3b059d0
Handle the case where there is no "not". It is possible it got
...
folded into the select.
llvm-svn: 59389
2008-11-16 04:25:26 +00:00
Chris Lattner
645f60141b
make this actually test what it is trying to.
...
llvm-svn: 59386
2008-11-16 04:21:51 +00:00
Nick Lewycky
625c6f79b2
Don't brute-force analyze cubic or higher polynomials.
...
If this patch causes a performance regression for anyone, please let me know,
and it can be fixed in a different way with much more effort.
llvm-svn: 59384
2008-11-16 04:14:25 +00:00
Nick Lewycky
967aeeb400
Correct this error message.
...
llvm-svn: 59370
2008-11-15 17:50:47 +00:00
Richard Osborne
5fe5933909
[XCore] Fix expansion of 64 bit add/sub. Don't custom expand
...
these operations if ladd/lsub are not available on the current
subtarget.
llvm-svn: 59305
2008-11-14 15:59:19 +00:00
Richard Osborne
d16b37efae
Add XCore intrinsics for getid (returns thread id) and bitrev (reverses
...
bits in a word).
llvm-svn: 59296
2008-11-14 10:12:16 +00:00
Dan Gohman
072734ebd6
Remove the FlaggedNodes member from SUnit. Instead of requiring each SUnit
...
to carry a SmallVector of flagged nodes, just calculate the flagged nodes
dynamically when they are needed.
The local-liveness change is due to a trivial scheduling change where
the scheduler arbitrary decision differently.
llvm-svn: 59273
2008-11-13 23:24:17 +00:00
Dale Johannesen
b47f6d3237
testcase for PR 1779.
...
llvm-svn: 59268
2008-11-13 22:17:10 +00:00
Bill Wendling
9aa657663a
Added testcase for r59214.
...
llvm-svn: 59218
2008-11-13 04:09:04 +00:00
Tanya Lattner
129f4febd2
Add test case for ptr annotation.
...
llvm-svn: 59142
2008-11-12 16:12:27 +00:00
Duncan Sands
aa7060c885
Correct some thinkos in the expansion of ADD/SUB
...
when the target does not support ADDC/SUBC. This
fixes PR3044.
llvm-svn: 59120
2008-11-12 08:23:26 +00:00
Dale Johannesen
ffc67df2aa
Fix the testb optimization so x86 also bootstraps.
...
Reenable test.
llvm-svn: 59101
2008-11-12 02:00:35 +00:00
Andrew Lenharth
2126a6d3c4
fix another libgcc blocker
...
llvm-svn: 59026
2008-11-11 06:06:07 +00:00
Bill Wendling
4942f296c9
Un-XFAIL tests now that they're fixed.
...
llvm-svn: 59023
2008-11-11 04:44:42 +00:00
Bill Wendling
6fcefa065e
r59009 broke these tests. XFAIL for now.
...
llvm-svn: 59010
2008-11-11 00:36:10 +00:00
Bill Wendling
b85755c829
Temporarily revert r58979 and related patch. It's causing a failure in X86 bootstrap:
...
Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
warning: ./cc1obj-checksum.o differs
warning: ./cc1objplus-checksum.o differs
warning: ./cc1plus-checksum.o differs
Bootstrap comparison failure!
./alias.o differs
./alloc-pool.o differs
./attribs.o differs
./bb-reorder.o differs
./bitmap.o differs
./build/errors.o differs
./build/genattrtab.o differs
./build/genautomata.o differs
./build/genemit.o differs
./build/genextract.o differs
...
-bw
llvm-svn: 59003
2008-11-10 21:22:06 +00:00
Devang Patel
d0ce981372
If the sign of exit condition and split condition does not match
...
then do not split loop index.
llvm-svn: 58995
2008-11-10 19:48:34 +00:00
Duncan Sands
ddacbb39ab
Fix PR2667: add soft float support for sint_to_fp/uint_to_fp
...
where the argument is an apint, or smaller than the minimum
size for which there is a libcall (i32).
llvm-svn: 58994
2008-11-10 17:36:26 +00:00
Duncan Sands
d5b53e1c6c
When promoting the result of fp_to_uint/fp_to_sint,
...
inform the optimizers that the result must be zero/
sign extended from the smaller type. For example,
if a fp to unsigned i16 is promoted to fp to i32,
then we are allowed to assume that the extra 16 bits
are zero (because the result of fp to i16 is undefined
if the result does not fit in an i16). This is
quite aggressive, but should help the optimizers
produce better code. This requires correcting a
test which thought that fp_to_uint is some kind
of truncation, which it is not: in the testcase
(which does fp to i1), either the fp value converts
to 0 or 1 or the result is undefined, which is
quite different to truncation.
llvm-svn: 58991
2008-11-10 17:28:30 +00:00
Dale Johannesen
23be3fd970
Reenable test.
...
llvm-svn: 58980
2008-11-10 07:30:32 +00:00
Bill Wendling
1579287550
The method of doing the matching with a 'select' instruction was wrong. The
...
original code was matching like this:
if (match(A, m_Not(m_Value(B))))
B was already matched as a 'select' instruction. However, this isn't matching
what we think it's matching. It would match B as a 'Value', so basically
anything would match to it. In this case, a Constant matched. B was replaced
with a constant representation. And then the wrong value would be used in the
SelectInst::Create statement, causing a crash.
After thinking on this for a moment, and after Nick L. told me how the pattern
matching stuff was supposed to work, the solution was to match NOT an m_Value,
but an m_Select.
llvm-svn: 58946
2008-11-09 23:17:42 +00:00
Duncan Sands
3b36fd87a4
XFAIL this while waiting for a fix.
...
llvm-svn: 58934
2008-11-09 13:07:47 +00:00
Bill Wendling
3f547be28f
If the LHS of the FCMP is coming from a UIToFP instruction, then we don't want
...
to generate signed ICMP instructions to replace the FCMP. This would violate
the following:
define i1 @test1(i32 %val) {
%1 = uitofp i32 %val to double
%2 = fcmp ole double %1, 0.000000e+00
ret i1 %2
}
would be transformed into:
define i1 @test1(i32 %val) {
%1 = icmp slt i33 %val, 1
ret i1 %1
}
which is obviously wrong. This patch modifes InstCombiner::FoldFCmp_IntToFP_Cst
to handle when the LHS comes from UIToFP.
llvm-svn: 58929
2008-11-09 04:26:50 +00:00
Scott Michel
5c0378db8e
CellSPU: Update expected counts on expected patterns
...
llvm-svn: 58927
2008-11-09 01:03:41 +00:00
Daniel Dunbar
06ad209fb1
Add LLVMC2 tool definitions for Objective-C and Objective-C++.
...
llvm-svn: 58885
2008-11-08 03:25:47 +00:00