oota-llvm.git
17 years agoAllow replacement of %% with %
Reid Spencer [Sun, 15 Apr 2007 04:57:03 +0000 (04:57 +0000)]
Allow replacement of %% with %

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36044 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoKeep lines a reasonable length.
Reid Spencer [Sun, 15 Apr 2007 04:54:53 +0000 (04:54 +0000)]
Keep lines a reasonable length.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36043 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPatch supplied by gabor.
Jeff Cohen [Sun, 15 Apr 2007 03:09:23 +0000 (03:09 +0000)]
Patch supplied by gabor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36042 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadjust per review comments
Dale Johannesen [Sun, 15 Apr 2007 02:40:12 +0000 (02:40 +0000)]
adjust per review comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36041 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoExtend store merging to support the 'if/then' version in addition to if/then/else.
Chris Lattner [Sun, 15 Apr 2007 01:02:18 +0000 (01:02 +0000)]
Extend store merging to support the 'if/then' version in addition to if/then/else.

This sinks the two stores in this example into a single store in cond_next.  In this
case, it allows elimination of the load as well:

        store double 0.000000e+00, double* @s.3060
        %tmp3 = fcmp ogt double %tmp1, 5.000000e-01             ; <i1> [#uses=1]
        br i1 %tmp3, label %cond_true, label %cond_next
cond_true:              ; preds = %entry
        store double 1.000000e+00, double* @s.3060
        br label %cond_next
cond_next:              ; preds = %entry, %cond_true
        %tmp6 = load double* @s.3060            ; <double> [#uses=1]

This implements Transforms/InstCombine/store-merge.ll:test2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36040 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Sun, 15 Apr 2007 01:00:37 +0000 (01:00 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36039 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcases for -fno-builtin
Dale Johannesen [Sun, 15 Apr 2007 00:18:31 +0000 (00:18 +0000)]
testcases for -fno-builtin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36038 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorefactor some code, no functionality change.
Chris Lattner [Sun, 15 Apr 2007 00:07:55 +0000 (00:07 +0000)]
refactor some code, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36037 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoXFAIL this for now.
Owen Anderson [Sat, 14 Apr 2007 23:57:41 +0000 (23:57 +0000)]
XFAIL this for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36036 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix some unsafe code. Also, tabs -> spaces.
Owen Anderson [Sat, 14 Apr 2007 23:57:00 +0000 (23:57 +0000)]
Fix some unsafe code.  Also, tabs -> spaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36035 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake ETForest depend on DomTree rather than IDom. This is the first step
Owen Anderson [Sat, 14 Apr 2007 23:49:24 +0000 (23:49 +0000)]
Make ETForest depend on DomTree rather than IDom.  This is the first step
in the long process that will be fixing PR 217.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36034 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoxfail for now
Chris Lattner [Sat, 14 Apr 2007 23:40:49 +0000 (23:40 +0000)]
xfail for now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36033 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a target to print out 80-column violations.
Chris Lattner [Sat, 14 Apr 2007 23:35:45 +0000 (23:35 +0000)]
add a target to print out 80-column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36032 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix long lines
Chris Lattner [Sat, 14 Apr 2007 23:32:02 +0000 (23:32 +0000)]
fix long lines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36031 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd some info about the pipelines and redirection.
Reid Spencer [Sat, 14 Apr 2007 23:27:06 +0000 (23:27 +0000)]
Add some info about the pipelines and redirection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36030 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOops. A little aggressive on the name changes there.
Reid Spencer [Sat, 14 Apr 2007 23:17:58 +0000 (23:17 +0000)]
Oops. A little aggressive on the name changes there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36029 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a note
Chris Lattner [Sat, 14 Apr 2007 23:06:09 +0000 (23:06 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36028 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1913:
Reid Spencer [Sat, 14 Apr 2007 23:04:54 +0000 (23:04 +0000)]
For PR1913:
Convert to new test system. This exposes test/Transforms/ConstProp/calls.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36027 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix test for linux hosts.
Chris Lattner [Sat, 14 Apr 2007 23:04:30 +0000 (23:04 +0000)]
fix test for linux hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36026 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement Transforms/InstCombine/vec_extract_elt.ll, transforming:
Chris Lattner [Sat, 14 Apr 2007 23:02:14 +0000 (23:02 +0000)]
Implement Transforms/InstCombine/vec_extract_elt.ll, transforming:

define i32 @test(float %f) {
        %tmp7 = insertelement <4 x float> undef, float %f, i32 0
        %tmp17 = bitcast <4 x float> %tmp7 to <4 x i32>
        %tmp19 = extractelement <4 x i32> %tmp17, i32 0
        ret i32 %tmp19
}

into:

define i32 @test(float %f) {
        %tmp19 = bitcast float %f to i32                ; <i32> [#uses=1]
        ret i32 %tmp19
}

On PPC, this is the difference between:

_test:
        mfspr r2, 256
        oris r3, r2, 8192
        mtspr 256, r3
        stfs f1, -16(r1)
        addi r3, r1, -16
        addi r4, r1, -32
        lvx v2, 0, r3
        stvx v2, 0, r4
        lwz r3, -32(r1)
        mtspr 256, r2
        blr

and:

_test:
        stfs f1, -4(r1)
        nop
        nop
        nop
        lwz r3, -4(r1)
        blr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36025 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Sat, 14 Apr 2007 23:00:51 +0000 (23:00 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36024 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1319:
Reid Spencer [Sat, 14 Apr 2007 22:54:01 +0000 (22:54 +0000)]
For PR1319:
Convert to new test system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36023 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoChanges to fix problems with "make check". Apparently you can redefine
Reid Spencer [Sat, 14 Apr 2007 22:51:29 +0000 (22:51 +0000)]
Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36022 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix syntax.
Reid Spencer [Sat, 14 Apr 2007 22:32:58 +0000 (22:32 +0000)]
Fix syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36021 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement InstCombine/vec_demanded_elts.ll:test2. This allows us to turn
Chris Lattner [Sat, 14 Apr 2007 22:29:23 +0000 (22:29 +0000)]
Implement InstCombine/vec_demanded_elts.ll:test2.  This allows us to turn

unsigned test(float f) {
 return _mm_cvtsi128_si32( (__m128i) _mm_set_ss( f*f ));
}

into:

_test:
        movss 4(%esp), %xmm0
        mulss %xmm0, %xmm0
        movd %xmm0, %eax
        ret

instead of:

_test:
        movss 4(%esp), %xmm0
        mulss %xmm0, %xmm0
        xorps %xmm1, %xmm1
        movss %xmm0, %xmm1
        movd %xmm1, %eax
        ret

GCC gets:

_test:
        subl    $28, %esp
        movss   32(%esp), %xmm0
        mulss   %xmm0, %xmm0
        xorps   %xmm1, %xmm1
        movss   %xmm0, %xmm1
        movaps  %xmm1, %xmm0
        movd    %xmm0, 12(%esp)
        movl    12(%esp), %eax
        addl    $28, %esp
        ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36020 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomanually upgrade test. Add a new test2. I have no way to see if this works
Chris Lattner [Sat, 14 Apr 2007 22:27:33 +0000 (22:27 +0000)]
manually upgrade test.  Add a new test2.  I have no way to see if this works
because of the tclification.  :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36019 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTry some alternative syntax.
Reid Spencer [Sat, 14 Apr 2007 22:27:05 +0000 (22:27 +0000)]
Try some alternative syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36018 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoavoid copying sets and vectors around.
Chris Lattner [Sat, 14 Apr 2007 22:10:17 +0000 (22:10 +0000)]
avoid copying sets and vectors around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36017 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix PR1329.
Jeff Cohen [Sat, 14 Apr 2007 21:50:21 +0000 (21:50 +0000)]
Fix PR1329.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36016 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1319:
Reid Spencer [Sat, 14 Apr 2007 21:46:15 +0000 (21:46 +0000)]
For PR1319:
Rewrite much of the DejaGnu section to bring it in line with the new
facilities in llvm.exp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36015 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThis test should have been updated with llvm 1.7!
Reid Spencer [Sat, 14 Apr 2007 20:21:37 +0000 (20:21 +0000)]
This test should have been updated with llvm 1.7!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36014 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1319:
Reid Spencer [Sat, 14 Apr 2007 20:13:02 +0000 (20:13 +0000)]
For PR1319:
Upgrade tests to work with new llvm.exp version of llvm_runtest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36013 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThis test needs to use egrep.
Reid Spencer [Sat, 14 Apr 2007 20:02:51 +0000 (20:02 +0000)]
This test needs to use egrep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36012 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodisable switch lowering using shift/and. It still breaks ppc bootstrap for
Chris Lattner [Sat, 14 Apr 2007 19:39:41 +0000 (19:39 +0000)]
disable switch lowering using shift/and.  It still breaks ppc bootstrap for
some reason.  :(  Will investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36011 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1319:
Reid Spencer [Sat, 14 Apr 2007 19:37:22 +0000 (19:37 +0000)]
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

17 years agoConvert test cases to new llvm.exp version of llvm_runtest and fix tests
Reid Spencer [Sat, 14 Apr 2007 19:27:03 +0000 (19:27 +0000)]
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

17 years agoFor PR1319:
Reid Spencer [Sat, 14 Apr 2007 19:10:21 +0000 (19:10 +0000)]
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

17 years ago1. Don't generate redundant copy of stderr
Reid Spencer [Sat, 14 Apr 2007 18:51:19 +0000 (18:51 +0000)]
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

17 years agoFix a test test llvm.exp found.
Reid Spencer [Sat, 14 Apr 2007 18:33:31 +0000 (18:33 +0000)]
Fix a test test llvm.exp found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36006 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agobool -> i1 (found by llvm.exp)
Reid Spencer [Sat, 14 Apr 2007 18:30:06 +0000 (18:30 +0000)]
bool -> i1 (found by llvm.exp)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36005 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a syntax error that llvm.exp found.
Reid Spencer [Sat, 14 Apr 2007 18:28:16 +0000 (18:28 +0000)]
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

17 years agoFix an "already-upgraded" test that llvm.exp found.
Reid Spencer [Sat, 14 Apr 2007 18:26:02 +0000 (18:26 +0000)]
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

17 years agoavoid iterator invalidation.
Chris Lattner [Sat, 14 Apr 2007 18:06:52 +0000 (18:06 +0000)]
avoid iterator invalidation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36002 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSimplify this test and correct redirection for Tcl exec.
Reid Spencer [Sat, 14 Apr 2007 17:49:06 +0000 (17:49 +0000)]
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

17 years agoDon't try to interpret a fictitious file.
Reid Spencer [Sat, 14 Apr 2007 17:41:12 +0000 (17:41 +0000)]
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

17 years agoPrint full errorInfo when a failure occurs.
Reid Spencer [Sat, 14 Apr 2007 17:36:20 +0000 (17:36 +0000)]
Print full errorInfo when a failure occurs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35999 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAn even better fix.
Jeff Cohen [Sat, 14 Apr 2007 17:18:29 +0000 (17:18 +0000)]
An even better fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35998 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNo need to quote things, shell isn't interpreting any more.
Reid Spencer [Sat, 14 Apr 2007 17:12:21 +0000 (17:12 +0000)]
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

17 years agoFix recent regression that broke several llvm-tests.
Jeff Cohen [Sat, 14 Apr 2007 16:55:19 +0000 (16:55 +0000)]
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

17 years agoFor PR1319:
Reid Spencer [Sat, 14 Apr 2007 16:48:55 +0000 (16:48 +0000)]
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

17 years agoAdd the line number where the script failed to the error output.
Reid Spencer [Sat, 14 Apr 2007 16:41:39 +0000 (16:41 +0000)]
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

17 years agoFor PR1319:
Reid Spencer [Sat, 14 Apr 2007 16:40:08 +0000 (16:40 +0000)]
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

17 years agoFIx this test, thanks to llvm.exp
Reid Spencer [Sat, 14 Apr 2007 16:19:26 +0000 (16:19 +0000)]
FIx this test, thanks to llvm.exp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35992 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a script to run a command but ignore its return code. This script
Reid Spencer [Sat, 14 Apr 2007 16:14:08 +0000 (16:14 +0000)]
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

17 years agoFix PR1325: Case range optimization was performed in the case it
Anton Korobeynikov [Sat, 14 Apr 2007 13:25:55 +0000 (13:25 +0000)]
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

17 years agoCorrect typo.
Duncan Sands [Sat, 14 Apr 2007 12:30:27 +0000 (12:30 +0000)]
Correct typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35989 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a missing -f that the new llvm.exp found.
Reid Spencer [Sat, 14 Apr 2007 09:45:16 +0000 (09:45 +0000)]
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

17 years agoFix a missing -f caught by the new llvm.exp script.
Reid Spencer [Sat, 14 Apr 2007 09:43:30 +0000 (09:43 +0000)]
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

17 years agoInitial version of a re-write of llvm-runtest that doesn't write the
Reid Spencer [Sat, 14 Apr 2007 09:39:28 +0000 (09:39 +0000)]
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

17 years agodisable shift/and lowering to work around PR1325 for now.
Chris Lattner [Sat, 14 Apr 2007 02:26:56 +0000 (02:26 +0000)]
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

17 years agoImplement a few missing xforms: printf("foo\n") -> puts. printf("x") -> putchar
Chris Lattner [Sat, 14 Apr 2007 01:17:48 +0000 (01:17 +0000)]
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

17 years agonew testcase
Chris Lattner [Sat, 14 Apr 2007 01:17:38 +0000 (01:17 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35983 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoin addition to merging, constantmerge should also delete trivially dead globals,
Chris Lattner [Sat, 14 Apr 2007 01:11:54 +0000 (01:11 +0000)]
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

17 years agoImplement PR1201 and test/Transforms/InstCombine/malloc-free-delete.ll
Chris Lattner [Sat, 14 Apr 2007 00:20:02 +0000 (00:20 +0000)]
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

17 years agotestcase for PR1201
Chris Lattner [Sat, 14 Apr 2007 00:19:36 +0000 (00:19 +0000)]
testcase for PR1201

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35980 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agouse an accessor to simplify code.
Chris Lattner [Sat, 14 Apr 2007 00:17:39 +0000 (00:17 +0000)]
use an accessor to simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35979 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
Chris Lattner [Sat, 14 Apr 2007 00:12:57 +0000 (00:12 +0000)]
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

17 years agoWe want the number of bits needed, not the power of 2.
Reid Spencer [Sat, 14 Apr 2007 00:00:10 +0000 (00:00 +0000)]
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

17 years agotests for struct/union as input operands to asm.
Dale Johannesen [Fri, 13 Apr 2007 22:54:11 +0000 (22:54 +0000)]
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

17 years agoSilence VC++ warning.
Jeff Cohen [Fri, 13 Apr 2007 22:52:03 +0000 (22:52 +0000)]
Silence VC++ warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35975 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd the SCCP regression tests for APInt expressions. These test cases
Reid Spencer [Fri, 13 Apr 2007 22:33:10 +0000 (22:33 +0000)]
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

17 years agoxfail this for now
Chris Lattner [Fri, 13 Apr 2007 22:20:27 +0000 (22:20 +0000)]
xfail this for now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35973 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNow that codegen prepare isn't defeating me, I can finally fix what I set
Chris Lattner [Fri, 13 Apr 2007 20:42:26 +0000 (20:42 +0000)]
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

17 years agonew lsr testcase
Chris Lattner [Fri, 13 Apr 2007 20:38:14 +0000 (20:38 +0000)]
new lsr testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35971 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCompletely rewrite addressing-mode related sinking of code. In particular,
Chris Lattner [Fri, 13 Apr 2007 20:30:56 +0000 (20:30 +0000)]
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

17 years agoNew testcase
Chris Lattner [Fri, 13 Apr 2007 20:28:08 +0000 (20:28 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35969 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement a getBitsNeeded method to determine how many bits are needed to
Reid Spencer [Fri, 13 Apr 2007 19:19:07 +0000 (19:19 +0000)]
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

17 years agoRemove use of SlowOperationInformer.
Devang Patel [Fri, 13 Apr 2007 18:58:18 +0000 (18:58 +0000)]
Remove use of SlowOperationInformer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35967 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUndo previous check-in.
Devang Patel [Fri, 13 Apr 2007 18:35:15 +0000 (18:35 +0000)]
Undo previous check-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35966 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoHello uses LLVMSupport.a (SlowerOperationInformer)
Devang Patel [Fri, 13 Apr 2007 18:28:23 +0000 (18:28 +0000)]
Hello uses  LLVMSupport.a (SlowerOperationInformer)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35965 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRename Value::getValueType to getValueID, to avoid confusion with
Dan Gohman [Fri, 13 Apr 2007 18:12:09 +0000 (18:12 +0000)]
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

17 years agoFix PR1323 : we haven't updated phi nodes in good manner :)
Anton Korobeynikov [Fri, 13 Apr 2007 06:53:51 +0000 (06:53 +0000)]
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

17 years agoarm has r+r*s and r+i addr modes, but no r+i+r*s addr modes.
Chris Lattner [Fri, 13 Apr 2007 06:50:55 +0000 (06:50 +0000)]
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

17 years agoMake the apint construction more effective.
Zhou Sheng [Fri, 13 Apr 2007 05:57:32 +0000 (05:57 +0000)]
Make the apint construction more effective.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35960 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCSE simple binary expressions when they are inserted. This makes LSR produce
Chris Lattner [Fri, 13 Apr 2007 05:04:18 +0000 (05:04 +0000)]
CSE simple binary expressions when they are inserted.  This makes LSR produce
less huge code that needs to be cleaned up by sdisel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35959 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdding target triplet to be passed to database.
Tanya Lattner [Fri, 13 Apr 2007 04:36:48 +0000 (04:36 +0000)]
Adding target triplet to be passed to database.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35958 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement review feedback .. don't double search a set.
Reid Spencer [Thu, 12 Apr 2007 21:57:15 +0000 (21:57 +0000)]
Implement review feedback .. don't double search a set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35957 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake sure intrinsics that are lowered to functions make the function weak
Reid Spencer [Thu, 12 Apr 2007 21:53:38 +0000 (21:53 +0000)]
Make sure intrinsics that are lowered to functions make the function weak
linkage so we only end up with one of them in a program. These are, after
all overloaded and templatish in nature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35956 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcases for function linkage
Dale Johannesen [Thu, 12 Apr 2007 21:01:53 +0000 (21:01 +0000)]
testcases for function linkage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35955 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProvide support for intrinsics that lower themselves to a function body.
Reid Spencer [Thu, 12 Apr 2007 21:00:45 +0000 (21:00 +0000)]
Provide support for intrinsics that lower themselves to a function body.
This can happen for intrinsics that are overloaded.  In such cases it is
necessary to emit a function prototype before the body of the function
that calls the intrinsic and to ensure we don't emit it multiple times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35954 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoupdate documentation
Lauro Ramos Venancio [Thu, 12 Apr 2007 20:34:36 +0000 (20:34 +0000)]
update documentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35953 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoupdate documentation
Lauro Ramos Venancio [Thu, 12 Apr 2007 19:52:46 +0000 (19:52 +0000)]
update documentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35952 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement Thread Local Storage (TLS) in CBackend.
Lauro Ramos Venancio [Thu, 12 Apr 2007 18:42:08 +0000 (18:42 +0000)]
Implement Thread Local Storage (TLS) in CBackend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35951 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement the "thread_local" keyword.
Lauro Ramos Venancio [Thu, 12 Apr 2007 18:32:50 +0000 (18:32 +0000)]
Implement the "thread_local" keyword.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agovector compares aren't allowed. It doesn't make sense to have an xfailed
Chris Lattner [Thu, 12 Apr 2007 18:21:52 +0000 (18:21 +0000)]
vector compares aren't allowed.  It doesn't make sense to have an xfailed
test to remind us of this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35949 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake this really work on linux :)
Chris Lattner [Thu, 12 Apr 2007 18:10:16 +0000 (18:10 +0000)]
make this really work on linux :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35948 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake this happier on linux hosts
Chris Lattner [Thu, 12 Apr 2007 18:09:06 +0000 (18:09 +0000)]
make this happier on linux hosts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35947 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix bugs in generated code for part_select and part_set so that llc doesn't
Reid Spencer [Thu, 12 Apr 2007 13:30:14 +0000 (13:30 +0000)]
Fix bugs in generated code for part_select and part_set so that llc doesn't
barf when CBE is run with a program that contains these intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35946 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug in PartSet. The replacement value needs to be zext or trunc to
Reid Spencer [Thu, 12 Apr 2007 12:46:33 +0000 (12:46 +0000)]
Fix a bug in PartSet. The replacement value needs to be zext or trunc to
the size of the value, not just zext. Also, give better names to two BBs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35945 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agothe result of an inline asm copy can be an arbitrary VT that the register
Chris Lattner [Thu, 12 Apr 2007 06:00:20 +0000 (06:00 +0000)]
the result of an inline asm copy can be an arbitrary VT that the register
class supports.  In the case of vectors, this means we often get the wrong
type (e.g. we get v4f32 instead of v8i16).  Make sure to convert the vector
result to the right type.  This fixes CodeGen/X86/2007-04-11-InlineAsmVectorResult.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35944 91177308-0d34-0410-b5e6-96231b3b80d8