Commit Graph

6041 Commits

Author SHA1 Message Date
Scott Michel
18fae69723 CellSPU:
(a) Remove conditionally removed code in SelectXAddr. Basically, hope for the
    best that the A-form and D-form address predicates catch everything before
    the code decides to emit a X-form address.
(b) Expand vector store test cases to include the usual suspects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 17:29:43 +00:00
Scott Michel
97d0a603e6 CellSPU: test should use shlqby, not shlqbyi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60001 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 01:30:37 +00:00
Bill Wendling
39ccca3260 XFAIL this test. A recent CellSPU check-in broke it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 00:56:34 +00:00
Dan Gohman
21d9003087 Initial support for anti-dependence breaking. Currently this code does not
introduce any new spilling; it just uses unused registers.

Refactor the SUnit topological sort code out of the RRList scheduler and
make use of it to help with the post-pass scheduler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 00:52:40 +00:00
Bill Wendling
9822296b18 Testcase for constant CFStrings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59992 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 23:28:09 +00:00
Chris Lattner
8d0d603a0b reenable test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 21:27:20 +00:00
Bill Wendling
612e0b701f Temporarily XFAIL this test. r59976 and r59972 broke it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59981 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 20:43:33 +00:00
Chris Lattner
47f5751c80 Fix 3113: If we have a dead cyclic PHI, replace the whole thing
with an undef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59972 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 19:25:36 +00:00
Scott Michel
045a14503f CellSPU:
(a) Slight rethink on i64 zero/sign/any extend code - use a shuffle to
    directly zero-extend i32 to i64, but use rotates and shifts for
    sign extension. Also ensure unified register consistency.
(b) Add new test harness for i64 operations: i64ops.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59970 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 18:20:46 +00:00
Scott Michel
104de4390b CellSPU:
(a) Improve the extract element code: there's no need to do gymnastics with
    rotates into the preferred slot if a shuffle will do the same thing.
(b) Rename a couple of SPUISD pseudo-instructions for readability and better
    semantic correspondence.
(c) Fix i64 sign/any/zero extension lowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 17:11:17 +00:00
Bill Wendling
d21c6ef9d0 Test add-with-overflow with fast ISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59945 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 05:23:38 +00:00
Nick Lewycky
02ff308aa1 Extend the 'noalias' attribute to function return values. This is intended to
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).

No changes to the bitcode reader/writer, asm printer or verifier were needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 03:41:24 +00:00
Bill Wendling
def27392c1 Add support for llvm.uadd.with.overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59926 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 01:38:29 +00:00
Scott Michel
7a1c9e9cb7 CellSPU: Fix bug 3056. Varadic extract_element was not implemented (nor was it
ever conceived to occur).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59891 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-22 23:50:42 +00:00
Nick Lewycky
0c73079855 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 07:33:58 +00:00
Scott Michel
9c0c6b2e4a CellSPU:
(a) Fix bgs 3052, 3057
(b) Incorporate Duncan's suggestions re: i1 promotion
(c) Indentation updates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59790 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 02:56:16 +00:00
Bill Wendling
52a5899fd9 Add generic test for add with overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59781 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 02:15:51 +00:00
Dan Gohman
eac9cae45e Test -pre-RA-sched=fast too, for completeness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59741 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-20 19:26:04 +00:00
Evan Cheng
d37c13cfd1 - 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-20 02:32:35 +00:00
Devang Patel
7fe1decf3a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 18:56:50 +00:00
Dan Gohman
8b677d0b88 Revert r59640. It broke this test for builds that aren't
configured with llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 16:24:37 +00:00
Dan Gohman
c738ac1d5d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59640 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 16:02:14 +00:00
Owen Anderson
75fa96bb71 Add support for rematerialization in pre-alloc-splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 04:28:29 +00:00
Daniel Dunbar
911cfdb7d7 LLVMC2: -emit-llvm stops compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59586 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 04:15:56 +00:00
Daniel Dunbar
ff6477b720 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59582 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 02:59:00 +00:00
Evan Cheng
9c64bf3905 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59559 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 22:28:38 +00:00
Nick Lewycky
dd643f26c4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 15:10:54 +00:00
Duncan Sands
51d83fdd89 Reapply r59464, this time using the correct type
when softening FNEG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 09:15:03 +00:00
Bill Wendling
c4ae87ac76 A simple test for stack protectors. This should be valid on all platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59505 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 07:34:50 +00:00
Bill Wendling
8f55b3d67d 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59487 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 01:49:24 +00:00
Devang Patel
13877bf6c2 Give SIToFPInst preference over UIToFPInst because it is faster on platforms that are widely used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59476 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 00:40:02 +00:00
Devang Patel
cd40233429 While handling floating point IVs lift restrictions on initial value and increment value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59471 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 23:27:13 +00:00
Duncan Sands
7fed65a68d Add soft float support for a bunch more operations. Original
patch by Richard Osborne, tweaked and extended by your humble
servant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59464 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 20:52:38 +00:00
Dale Johannesen
3d631c2d5d Remove these, which test for optimizations that
are not currently done (cf PowerPC/README.txt).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59456 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 18:57:45 +00:00
Richard Osborne
104de6cf7b Don't produce ADDC/ADDE when expanding SHL unless they are legal
for the target. This fixes PR3080.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 17:34:31 +00:00
Lang Hames
1aed723261 Removed 2008-10-17-SpillerBug.ll as it does not provide an accurate test of PR2898.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 23:30:12 +00:00
Lang Hames
684bd46a57 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 13:11:09 +00:00
Mon P Wang
c7849c22f4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59399 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 05:06:27 +00:00
Chris Lattner
a74cefa6d3 Handle the case where there is no "not". It is possible it got
folded into the select.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59389 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 04:25:26 +00:00
Chris Lattner
6093b36f47 make this actually test what it is trying to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59386 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 04:21:51 +00:00
Nick Lewycky
d72a81ee64 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59384 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 04:14:25 +00:00
Nick Lewycky
70c44f0cce Correct this error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59370 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-15 17:50:47 +00:00
Richard Osborne
223fd6efc8 [XCore] Fix expansion of 64 bit add/sub. Don't custom expand
these operations if ladd/lsub are not available on the current
subtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59305 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-14 15:59:19 +00:00
Richard Osborne
1d8f975890 Add XCore intrinsics for getid (returns thread id) and bitrev (reverses
bits in a word).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59296 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-14 10:12:16 +00:00
Dan Gohman
d23e0f81bc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59273 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 23:24:17 +00:00
Dale Johannesen
e4f309e582 testcase for PR 1779.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59268 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 22:17:10 +00:00
Bill Wendling
241085aa38 Added testcase for r59214.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59218 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 04:09:04 +00:00
Tanya Lattner
02fa4f4e01 Add test case for ptr annotation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12 16:12:27 +00:00
Duncan Sands
245146b58a Correct some thinkos in the expansion of ADD/SUB
when the target does not support ADDC/SUBC.  This
fixes PR3044.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59120 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12 08:23:26 +00:00
Dale Johannesen
cbf7cf50ec Fix the testb optimization so x86 also bootstraps.
Reenable test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59101 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12 02:00:35 +00:00
Andrew Lenharth
683a922653 fix another libgcc blocker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59026 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 06:06:07 +00:00
Bill Wendling
935e8e9afe Un-XFAIL tests now that they're fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 04:44:42 +00:00
Bill Wendling
080098e311 r59009 broke these tests. XFAIL for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59010 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 00:36:10 +00:00
Bill Wendling
d0ab34bf8f 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59003 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 21:22:06 +00:00
Devang Patel
d4e7f44319 If the sign of exit condition and split condition does not match
then do not split loop index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 19:48:34 +00:00
Duncan Sands
f509224510 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). 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58994 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 17:36:26 +00:00
Duncan Sands
a29c13086a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58991 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 17:28:30 +00:00
Dale Johannesen
22a8e9e511 Reenable test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58980 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 07:30:32 +00:00
Bill Wendling
1fb43c32ed 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-09 23:17:42 +00:00
Duncan Sands
4d16a0aa58 XFAIL this while waiting for a fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-09 13:07:47 +00:00
Bill Wendling
c143bcf9ac 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58929 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-09 04:26:50 +00:00
Scott Michel
4691cd9558 CellSPU: Update expected counts on expected patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58927 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-09 01:03:41 +00:00
Daniel Dunbar
77e0c85dcc Add LLVMC2 tool definitions for Objective-C and Objective-C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58885 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 03:25:47 +00:00
Dale Johannesen
3dd42cfe12 Generated code for generic expansion of SETUGT etc.
is noticeably worse than previous PPC-specific code.
Since the latter was also wrong in some cases and
correctness is more important than efficiency, I'm
disabling this test temporarily while I fix it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58876 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 00:49:19 +00:00
Dale Johannesen
c4c7a6a3fb Xfail an incorrect test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58875 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 00:40:24 +00:00
Richard Osborne
b7ee8c4c1f Add basic test for XCore backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58841 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 11:24:12 +00:00
Dale Johannesen
815fb57226 Testcase for testb optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 01:30:18 +00:00
Devang Patel
180ffaef18 Handle (delete) dbg intrinsics while promoting alloca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58826 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 01:30:07 +00:00
Devang Patel
e75808cf3d Emit label for llvm.dbg.func.start of the inlined function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58814 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 21:28:20 +00:00
Devang Patel
20dd0460a1 Emit label for llvm.dbg.func.start of the inlined function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-06 00:30:09 +00:00
Dan Gohman
33a9cb4f40 Make ISel ignore dead nodes. The DAGCombiner normally eliminates
dead nodes, but in this case its missing one. Fixing the DAGCombiner
is desirable, but it's somewhat involved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 22:56:47 +00:00
Devang Patel
60886066bf Add PR number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 18:41:15 +00:00
Evan Cheng
b35ed9247a Add more vector move low and zero-extend patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 06:04:51 +00:00
Devang Patel
c9eaef0bf2 New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 01:40:30 +00:00
Dan Gohman
8f027c7fea Add a new pass to simplify specific half_powr function calls. This is
a specialized pass that it not likely to be generally useful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58732 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 23:41:45 +00:00
Anton Korobeynikov
879b1ac22e Fix tests not to emit IR output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 23:02:39 +00:00
Evan Cheng
3eb22e835f Actually ARM / Mac OS X does have UINTTOFP_I64_F{64|32} libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 22:19:55 +00:00
Evan Cheng
c7c77297e2 Custom lower bit_convert i64 -> f64 into FMDRR. This is now happening with legalizetypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 19:57:48 +00:00
Duncan Sands
e59416efb8 Fix PR3011: LegalizeTypes support for scalarizing
SELECT_CC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58706 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 17:31:08 +00:00
Dan Gohman
f6503a031e The ANDMask node folds to a constant, and isn't the node that needs to
have its node id set. The new and and shift nodes are the nodes that need
the IDs. This fixes PR2982.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58655 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 23:43:55 +00:00
Devang Patel
265ca5dff5 Ignore conditions that are outside the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 19:38:07 +00:00
Devang Patel
58d43d4a41 Turn floating point IVs into integer IVs where possible.
This allows SCEV users to effectively calculate trip count.
LSR later on transforms back integer IVs to floating point IVs
later on to avoid int-to-float casts inside the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 18:32:19 +00:00
Dan Gohman
3a5797d946 Change how extended types are represented in MVTs. Instead of fiddling
bits, use a union of a SimpleValueType enum and a regular Type*.

This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.

This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.

This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 17:56:27 +00:00
Anton Korobeynikov
d1000d9927 Testcase for recent llvm-gcc fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 14:43:31 +00:00
Duncan Sands
5c58a3168f Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58608 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 11:51:11 +00:00
Nick Lewycky
8f4d5eb9e5 Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
We're still waiting on code that actually analyzes them properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58592 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 02:43:49 +00:00
Nick Lewycky
6feb333695 Changes from Duncan's review:
* merge two weak functions by making them both alias a third non-weak fn
 * don't reimplement CallSite::hasArgument
 * whitelist the safe linkage types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 16:46:26 +00:00
Anton Korobeynikov
e491515730 Testcase for PR2691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 16:46:17 +00:00
Nick Lewycky
579a024661 Add a new MergeFunctions pass. It finds identical functions and merges them.
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58557 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 05:52:50 +00:00
Nick Lewycky
8e39432ea9 Fix demanded bits analysis with srem by negative number. Based on a patch
by Richard Osborne.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58555 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 02:41:50 +00:00
Dan Gohman
21440acc06 Fix this recently moved code to use the correct type. CI is now a
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58549 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 00:17:33 +00:00
Anton Korobeynikov
3d2c131592 Testcase for PR2613
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58537 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 20:10:49 +00:00
Duncan Sands
06f0aff69e Add a bunch of libcalls for ppcf128 that were somehow
completely forgotten about when writing LegalizeTypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58508 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 14:06:52 +00:00
Dan Gohman
d17cfbe1ca Use MOVSSmr instead of EXTRACTPSmr in the case of extracting
vector element 0 for a store, as it's smaller and faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58483 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 00:57:24 +00:00
Duncan Sands
557291c544 Testcase for PR2987.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58459 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 21:13:11 +00:00
Dan Gohman
1975d03183 Canonicalize sext(i1) to i1?-1:0, and update various instcombine
optimizations accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58457 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 20:40:10 +00:00
Duncan Sands
d383ff313b Testcase for PR2986.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58456 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 20:34:30 +00:00
Daniel Dunbar
c5e1ec47c7 Add InlineCost class for represent the estimated cost of inlining a
function.
 - This explicitly models the costs for functions which should
   "always" or "never" be inlined. This fixes bugs where such costs
   were not previously respected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 19:26:59 +00:00
Scott Michel
d976c21241 Resolve bug 2947: vararg-marked functions must spill registers R3-R79 to stack
so that va_start/va_arg/et.al. will walk arguments correctly for Cell SPU.

N.B.: Because neither clang nor llvm-gcc-4.2 can be built for CellSPU, this is
still unexorcised code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 01:51:48 +00:00
Chris Lattner
db97348400 add testcase for PR2964
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58393 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 18:42:22 +00:00