Commit Graph

31555 Commits

Author SHA1 Message Date
Reid Spencer
90016c7939 For PR1319:
More improvements:
1. Using ::errorInfo wasn't such a hot idea. Go back to just printing the
   offending line of code and the stderr output. This is sufficient and
   not entangled with Tcl goop.
2. Capture the problem report numbers and report them whether pass or fail.
   This helps quickly get some context when a test fails, if it has an
   associated PR number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 19:37:22 +00:00
Reid Spencer
4b3fd6c010 Convert test cases to new llvm.exp version of llvm_runtest and fix tests
that it found to be broken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36009 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 19:27:03 +00:00
Reid Spencer
6f254906c5 For PR1319:
Convert to use new llvm.exp version of llvm_testrun


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 19:10:21 +00:00
Reid Spencer
9a03bdac51 1. Don't generate redundant copy of stderr
2. Only match \ at the *end* of a line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36007 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 18:51:19 +00:00
Reid Spencer
608266b2f5 Fix a test test llvm.exp found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36006 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 18:33:31 +00:00
Reid Spencer
a43b3f2693 bool -> i1 (found by llvm.exp)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36005 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 18:30:06 +00:00
Reid Spencer
3baaed94e2 Fix a syntax error that llvm.exp found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36004 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 18:28:16 +00:00
Reid Spencer
60e9ff8d61 Fix an "already-upgraded" test that llvm.exp found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36003 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 18:26:02 +00:00
Chris Lattner
ae143ceb83 avoid iterator invalidation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36002 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 18:06:52 +00:00
Reid Spencer
70718366d9 Simplify this test and correct redirection for Tcl exec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 17:49:06 +00:00
Reid Spencer
fad4c0f155 Don't try to interpret a fictitious file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 17:41:12 +00:00
Reid Spencer
bcb8674f7e Print full errorInfo when a failure occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35999 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 17:36:20 +00:00
Jeff Cohen
98a72203d7 An even better fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 17:18:29 +00:00
Reid Spencer
15855a1d28 No need to quote things, shell isn't interpreting any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 17:12:21 +00:00
Jeff Cohen
e4aee1d3a4 Fix recent regression that broke several llvm-tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35996 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 16:55:19 +00:00
Reid Spencer
ff0f877ca4 For PR1319:
Changes necessary to run this with the "llvm.exp" version of llvm_runtest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35995 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 16:48:55 +00:00
Reid Spencer
520b487984 Add the line number where the script failed to the error output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 16:41:39 +00:00
Reid Spencer
af6676df04 For PR1319:
Changes necessary for conversion of this directory to run the tests
under the llvm.exp version of llvm_runtest


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 16:40:08 +00:00
Reid Spencer
2b88e5ecab FIx this test, thanks to llvm.exp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 16:19:26 +00:00
Reid Spencer
b7fc87656f Add a script to run a command but ignore its return code. This script
always returns 0. This is useful with the llvm.exp based dejagnu testing
when a test wants to check the error output of tool invocation that
returns non-zero. Since every command is checked with llvm.exp, there needs
to be a way to prevent that checking and this script is it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35991 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 16:14:08 +00:00
Anton Korobeynikov
e01017bba4 Fix PR1325: Case range optimization was performed in the case it
shouldn't. Also fix some "latent" bug on 64-bit platforms


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 13:25:55 +00:00
Duncan Sands
b0a1cbff0d Correct typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35989 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 12:30:27 +00:00
Reid Spencer
0c801b1767 Fix a missing -f that the new llvm.exp found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 09:45:16 +00:00
Reid Spencer
0837479aa7 Fix a missing -f caught by the new llvm.exp script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35987 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 09:43:30 +00:00
Reid Spencer
316abe4f22 Initial version of a re-write of llvm-runtest that doesn't write the
tests to a script file but executes each line individually and catches
errors on each line too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 09:39:28 +00:00
Chris Lattner
3ff981749b disable shift/and lowering to work around PR1325 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35985 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 02:26:56 +00:00
Chris Lattner
35b9b49fd1 Implement a few missing xforms: printf("foo\n") -> puts. printf("x") -> putchar
printf("") -> noop.  Still need to do the xforms for fprintf.

This implements Transforms/SimplifyLibCalls/Printf.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35984 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 01:17:48 +00:00
Chris Lattner
9a34ecd82d new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 01:17:38 +00:00
Chris Lattner
8264a9fcca in addition to merging, constantmerge should also delete trivially dead globals,
in order to clean up after simplifylibcalls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35982 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 01:11:54 +00:00
Chris Lattner
6fe5541003 Implement PR1201 and test/Transforms/InstCombine/malloc-free-delete.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 00:20:02 +00:00
Chris Lattner
58de64650d testcase for PR1201
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35980 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 00:19:36 +00:00
Chris Lattner
f25646bfb3 use an accessor to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35979 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 00:17:39 +00:00
Chris Lattner
6f771d4351 add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
Writing it twice in the same day was too much for me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35978 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 00:12:57 +00:00
Reid Spencer
0468ab3025 We want the number of bits needed, not the power of 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35977 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 00:00:10 +00:00
Dale Johannesen
f6a15eb1a1 tests for struct/union as input operands to asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35976 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 22:54:11 +00:00
Jeff Cohen
614408dc48 Silence VC++ warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35975 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 22:52:03 +00:00
Reid Spencer
c6b9efabee Add the SCCP regression tests for APInt expressions. These test cases
turned up some regressions that have since been fixed. We don't want to
loose the regression tests.

Test cases by Guoling Han.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35974 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 22:33:10 +00:00
Chris Lattner
4dcedf1e85 xfail this for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35973 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 22:20:27 +00:00
Chris Lattner
c5494af8a9 Now that codegen prepare isn't defeating me, I can finally fix what I set
out to do! :)

This fixes a problem where LSR would insert a bunch of code into each MBB
that uses a particular subexpression (e.g. IV+base+C).  The problem is that
this code cannot be CSE'd back together if inserted into different blocks.

This patch changes LSR to attempt to insert a single copy of this code and
share it, allowing codegenprepare to duplicate the code if it can be sunk
into various addressing modes.  On CodeGen/ARM/lsr-code-insertion.ll,
for example, this gives us code like:

        add r8, r0, r5
        str r6, [r8, #+4]
..
        ble LBB1_4      @cond_next
LBB1_3: @cond_true
        str r10, [r8, #+4]
LBB1_4: @cond_next
...
LBB1_5: @cond_true55
        ldr r6, LCPI1_1
        str r6, [r8, #+4]

instead of:

        add r10, r0, r6
        str r8, [r10, #+4]
...
        ble LBB1_4      @cond_next
LBB1_3: @cond_true
        add r8, r0, r6
        str r10, [r8, #+4]
LBB1_4: @cond_next
...
LBB1_5: @cond_true55
        add r8, r0, r6
        ldr r10, LCPI1_1
        str r10, [r8, #+4]

Besides being smaller and more efficient, this makes it immediately
obvious that it is profitable to predicate LBB1_3 now :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35972 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 20:42:26 +00:00
Chris Lattner
3bd767b91d new lsr testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 20:38:14 +00:00
Chris Lattner
dd77df3cbc Completely rewrite addressing-mode related sinking of code. In particular,
this fixes problems where codegenprepare would sink expressions into load/stores
that are not valid, and fixes cases where it would miss important valid ones.

This fixes several serious codesize and perf issues, particularly on targets
with complex addressing modes like arm and x86.  For example, now we compile
CodeGen/X86/isel-sink.ll to:

_test:
        movl 8(%esp), %eax
        movl 4(%esp), %ecx
        cmpl $1233, %eax
        ja LBB1_2       #F
LBB1_1: #T
        movl $4, (%ecx,%eax,4)
        movl $141, %eax
        ret
LBB1_2: #F
        movl (%ecx,%eax,4), %eax
        ret

instead of:

_test:
        movl 8(%esp), %eax
        leal (,%eax,4), %ecx
        addl 4(%esp), %ecx
        cmpl $1233, %eax
        ja LBB1_2       #F
LBB1_1: #T
        movl $4, (%ecx)
        movl $141, %eax
        ret
LBB1_2: #F
        movl (%ecx), %eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35970 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 20:30:56 +00:00
Chris Lattner
d617d39f74 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35969 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 20:28:08 +00:00
Reid Spencer
57ae4f5f01 Implement a getBitsNeeded method to determine how many bits are needed to
represent a string in binary form by an APInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35968 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 19:19:07 +00:00
Devang Patel
4beccb897d Remove use of SlowOperationInformer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 18:58:18 +00:00
Devang Patel
60b0d84594 Undo previous check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35966 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 18:35:15 +00:00
Devang Patel
02c768608a Hello uses LLVMSupport.a (SlowerOperationInformer)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35965 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 18:28:23 +00:00
Dan Gohman
a1a702cdd2 Rename Value::getValueType to getValueID, to avoid confusion with
other things named getValueType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35964 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 18:12:09 +00:00
Anton Korobeynikov
8085bcfdca Fix PR1323 : we haven't updated phi nodes in good manner :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 06:53:51 +00:00
Chris Lattner
5a3d40d88f arm has r+r*s and r+i addr modes, but no r+i+r*s addr modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 06:50:55 +00:00
Zhou Sheng
daacf22537 Make the apint construction more effective.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35960 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 05:57:32 +00:00