Commit Graph

326 Commits

Author SHA1 Message Date
Dan Gohman
b7c0b246da Convert more tests to avoid llvm-as.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 18:36:27 +00:00
Dan Gohman
f2f6ce65b7 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 18:01:28 +00:00
Dan Gohman
fce288fc91 Eliminate more uses of llvm-as and llvm-dis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81293 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 00:09:15 +00:00
Dan Gohman
3e054fe9ef Use opt -S instead of piping bitcode output through llvm-dis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 22:34:10 +00:00
Dan Gohman
b1e1e82c54 Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 16:50:01 +00:00
Dan Gohman
fea1dd0804 Remove obsolete -f flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79992 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:38:29 +00:00
Dale Johannesen
a3f2b21aff Split test into 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 17:51:19 +00:00
Dale Johannesen
a60e51f7e8 Make linkerprivate work for ARM and PPC. Testcase covers
all Darwin targets; could be split into separate tests for
the chip subdirectories, but from Chris' last mail on testing
I assume he'd rather have only one test.  Generic seems to be
the best available, maybe there should be a Darwin subdirectory?



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79877 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 01:03:42 +00:00
Dan Gohman
d2cb3d2c32 Remove the IA-64 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:30:09 +00:00
Chris Lattner
4cef7db13f remove tests for removed intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 21:30:06 +00:00
Dan Gohman
ae3a0be92e Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 22:49:04 +00:00
Eli Friedman
a8ba2c25e9 PR4317: Handle splits where the new block is unreachable correctly in
DominatorTreeBase::Split.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:42:06 +00:00
Duncan Sands
b0f1e1780c Add a new codegen pass that normalizes dwarf exception handling
code in preparation for code generation.  The main thing it does
is handle the case when eh.exception calls (and, in a future
patch, eh.selector calls) are far away from landing pads.  Right
now in practice you only find eh.exception calls close to landing
pads: either in a landing pad (the common case) or in a landing
pad successor, due to loop passes shifting them about.  However
future exception handling improvements will result in calls far
from landing pads:
(1) Inlining of rewinds.  Consider the following case:
In function @f:
...
  invoke @g to label %normal unwind label %unwinds
...
unwinds:
  %ex = call i8* @llvm.eh.exception()
...

In function @g:
...
  invoke @something to label %continue unwind label %handler
...
handler:
  %ex = call i8* @llvm.eh.exception()
... perform cleanups ...
  "rethrow exception"

Now inline @g into @f.  Currently this is turned into:
In function @f:
...
  invoke @something to label %continue unwind label %handler
...
handler:
  %ex = call i8* @llvm.eh.exception()
... perform cleanups ...
  invoke "rethrow exception" to label %normal unwind label %unwinds
unwinds:
  %ex = call i8* @llvm.eh.exception()
...

However we would like to simplify invoke of "rethrow exception" into
a branch to the %unwinds label.  Then %unwinds is no longer a landing
pad, and the eh.exception call there is then far away from any landing
pads.

(2) Using the unwind instruction for cleanups.
It would be nice to have codegen handle the following case:
  invoke @something to label %continue unwind label %run_cleanups
...
handler:
... perform cleanups ...
  unwind

This requires turning "unwind" into a library call, which
necessarily takes a pointer to the exception as an argument
(this patch also does this unwind lowering).  But that means
you are using eh.exception again far from a landing pad.

(3) Bugpoint simplifications.  When bugpoint is simplifying
exception handling code it often generates eh.exception calls
far from a landing pad, which then causes codegen to assert.
Bugpoint then latches on to this assertion and loses sight
of the original problem.

Note that it is currently rare for this pass to actually do
anything.  And in fact it normally shouldn't do anything at
all given the code coming out of llvm-gcc!  But it does fire
a few times in the testsuite.  As far as I can see this is
almost always due to the LoopStrengthReduce codegen pass
introducing pointless loop preheader blocks which are landing
pads and only contain a branch to another block.  This other
block contains an eh.exception call.  So probably by tweaking
LoopStrengthReduce a bit this can be avoided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22 20:36:31 +00:00
Jakob Stoklund Olesen
f8eac02fc1 Help DejaGnu avoid pipe-jam by producing less output from certain test cases.
When a test fails with more than a pipeful of output on stdout AND stderr, one
of the DejaGnu programs blocks. The problem can be avoided by redirecting
stdout to a file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-16 00:34:42 +00:00
Chris Lattner
672452d5a0 Disable the load-shrinking optimization from looking at
anything larger than 64-bits, avoiding a crash.  This should
really be fixed to use APInts, though type legalization happens
to help us out and we get good code on the attached testcase at
least.

This fixes rdar://6836460


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 03:45:07 +00:00
Bill Wendling
be8cc2a3de Second attempt:
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'll change the JIT with a follow-up patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70343 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 00:15:41 +00:00
Bill Wendling
c69d56f115 r70270 isn't ready yet. Back this out. Sorry for the noise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-28 01:04:53 +00:00
Bill Wendling
2e9d5f912a Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-28 00:21:31 +00:00
Nate Begeman
5f96943e01 Revert accidental testcase reduction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 18:42:40 +00:00
Nate Begeman
9008ca6b6b 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.
PR2957

ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask.  A value of -1 represents UNDEF.

In addition to eliminating the creation of illegal BUILD_VECTORS just to 
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70225 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 18:41:29 +00:00
Dale Johannesen
2f91f30b93 Fix PR 4057, a crash doing float->char const folding.
This particular one is undefined behavior (although this
isn't related to the crash), so it will no longer do it
at compile time, which seems better.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24 21:34:13 +00:00
Chris Lattner
266c7bbbbc Add a new "available_externally" linkage type. This is intended
to support C99 inline, GNU extern inline, etc.  Related bugzilla's
include PR3517, PR3100, & PR2933.  Nothing uses this yet, but it
appears to work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 05:44:34 +00:00
Chris Lattner
dbf1e2b08b move a target-specific test into its directory so it isn't run if you
don't configure the ARM target in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 23:58:38 +00:00
Chris Lattner
296185c264 fix two problems with machine sinking:
1. Sinking would crash when the first instruction of a block was
   sunk due to iterator problems.
2. Instructions could be sunk to their current block, causing an
   infinite loop.

This fixes PR3968


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68787 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 16:38:36 +00:00
Duncan Sands
004e27cc1b Fix PR3899: add support for extracting floats from vectors
when using -soft-float.
Based on a patch by Jakob Stoklund Olesen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67996 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-29 13:51:06 +00:00
Chris Lattner
b7e64ac3ac LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
it is not APInt clean, but even when it is it needs to be evaluated carefully
to determine whether it is actually profitable.

This fixes a crash on PR3806


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 23:58:30 +00:00
Chris Lattner
3e0cc2634e wire up support for emitting "special" values from inline asm
format strings with the standard ${:foo} syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 05:37:13 +00:00
Richard Pennington
3d3c955b18 bug 3610: Test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65287 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 15:54:44 +00:00
Duncan Sands
bf0fb175ab Let's try to have our cake and eat it to: move
this test into FrontendC to ensure that llvm-gcc
is available; assemble using "llvm-gcc -xassembler"
rather than "as".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62683 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 11:37:31 +00:00
Chris Lattner
1d5ee5c3b8 Don't bother running the assembler, we don't know that it will be configured
for whatever llc defaults to.  This fixes PR3363


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62619 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 21:41:53 +00:00
Devang Patel
0153308abf Verify Intrinsic::dbg_declare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 21:00:48 +00:00
Dan Gohman
bc0b56732a The list-td and list-tdrr schedulers don't yet support physreg
scheduling dependencies. Add assertion checks to help catch
this.

It appears the Mips target defaults to list-td, and it has a
regression test that uses a physreg dependence. Such code was
liable to be miscompiled, and now evokes an assertion failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 20:24:13 +00:00
Dan Gohman
2c91d102ec Fix a bug in ComputeLinearIndex computation handling multi-level
aggregate types. Don't increment the current index after reaching
the end of a struct, as it will already be pointing at
one-past-the end. This fixes PR3288.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 22:53:52 +00:00
Dan Gohman
5ddefdaa34 Delete this test; it's a duplicate of 2006-07-03-schedulers.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 01:36:23 +00:00
Bill Wendling
e5b7e0ec08 Revert the changes in this testcase until Anton can fix them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61414 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 05:23:34 +00:00
Anton Korobeynikov
42a8bbce2c Update test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61399 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 22:26:37 +00:00
Duncan Sands
ab0c578bfd For amusement, implement SADDO, SSUBO, UADDO, USUBO
for promoted integer types, eg: i16 on ppc-32, or
i24 on any platform.  Complete support for arbitrary
precision integers would require handling expanded
integer types, eg: i128, but I couldn't be bothered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60834 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-10 12:30:42 +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
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
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
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
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
Duncan Sands
7cb07874dc Turn on LegalizeTypes, the new type legalization
codegen infrastructure, by default.  Please report
any breakage to the mailing lists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58232 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 08:42:46 +00:00
Gordon Henriksen
a2cbe6c5b5 Related to PR2911, reject as invalid non-pointer GC roots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 16:28:35 +00:00
Chris Lattner
42a3adc346 remove this test: it is xfailed anyway, and is failing for a reason
other than why it was xfailed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 17:26:19 +00:00
Anton Korobeynikov
f03c5afc81 This does not fail anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57360 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 20:28:32 +00:00
Anton Korobeynikov
796daebd93 This is not failing anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57347 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 10:15:18 +00:00
Dan Gohman
e7aa7baa76 Split this test and move it into target-specific directories.
This fixes failures on configurations that don't have one or the
other targets enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56926 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-01 19:46:30 +00:00