oota-llvm.git
14 years agoMark unconditional branches as barriers. Found using -verify-machineinstrs
Richard Osborne [Tue, 23 Feb 2010 18:13:38 +0000 (18:13 +0000)]
Mark unconditional branches as barriers. Found using -verify-machineinstrs

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

14 years agoRoll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of
Jeffrey Yasskin [Tue, 23 Feb 2010 18:10:07 +0000 (18:10 +0000)]
Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM.  This links 3 of
the examples shared to make sure the shared library keeps working.

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

14 years agoSpeed up cycle checking significantly by caching results.
David Greene [Tue, 23 Feb 2010 17:37:50 +0000 (17:37 +0000)]
Speed up cycle checking significantly by caching results.

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

14 years agoDon't do (X != Y) ? X : Y -> X for floating-point values; it doesn't
Dan Gohman [Tue, 23 Feb 2010 17:17:57 +0000 (17:17 +0000)]
Don't do (X != Y) ? X : Y  -> X for floating-point values; it doesn't
handle NaN properly.

Do (X une Y) ? X : Y  -> X if one of X and Y is not zero.

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

14 years agoSpelling. s/suppor /support /
Jim Grosbach [Tue, 23 Feb 2010 17:16:27 +0000 (17:16 +0000)]
Spelling. s/suppor /support /

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

14 years agoRemove the code which constant-folded ptrtoint(inttoptr(x)+c) to
Dan Gohman [Tue, 23 Feb 2010 16:35:41 +0000 (16:35 +0000)]
Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to
getelementptr. Despite only doing so in the case where x is a known
array object and c can be converted to an index within range, this
could still be invalid if c is actually the address of an object
allocated outside of LLVM. Also, SCEVExpander, the original motivation
for this code, has since been improved to avoid inttoptr+ptroint in
more cases.

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

14 years agoModified examples Makefile to only build the ExceptionDemo example for
Garrison Venn [Tue, 23 Feb 2010 16:27:59 +0000 (16:27 +0000)]
Modified examples Makefile to only build the ExceptionDemo example for
x86 and x86_64 on UNIX systems. Only OS X 10.6.2 (x86_64) and 32bit CentOS 5.2
with gcc 4.1.2 were tested. ARM UNIX build triggered failure motivating this
modification, as it seems that the ARM ABI does not support _Unwind_GetIP(...),
_Unwind_SetGR(...), and _Unwind_SetIP(...). From doing a quick browse of:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf,
it seems as if all other exception related apis are supported. Looks like
the port can be done to ARM. Thanks to Xerxes RĂ„nby <xerxes@zafena.se> for
pointing out this error.

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

14 years agoTesting subversion commit access
Wesley Peck [Tue, 23 Feb 2010 15:11:17 +0000 (15:11 +0000)]
Testing subversion commit access

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

14 years agoFix -mtune forwarding.
Mikhail Glushenkov [Tue, 23 Feb 2010 14:29:42 +0000 (14:29 +0000)]
Fix -mtune forwarding.

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

14 years agoRemove unused lowering function LowerJumpTable
Richard Osborne [Tue, 23 Feb 2010 14:17:20 +0000 (14:17 +0000)]
Remove unused lowering function LowerJumpTable

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

14 years agoLower BR_JT on the XCore to a jump into a series of jump instructions.
Richard Osborne [Tue, 23 Feb 2010 13:25:07 +0000 (13:25 +0000)]
Lower BR_JT on the XCore to a jump into a series of jump instructions.

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

14 years agotests: Don't make a missing llvm-gcc dir a fatal error.
Daniel Dunbar [Tue, 23 Feb 2010 11:34:12 +0000 (11:34 +0000)]
tests: Don't make a missing llvm-gcc dir a fatal error.

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

14 years agoSwitch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX}
Daniel Dunbar [Tue, 23 Feb 2010 10:28:06 +0000 (10:28 +0000)]
Switch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX}

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

14 years agoAdd LLVM{CC,CXX} make variables, which specify the configured path the LLVM
Daniel Dunbar [Tue, 23 Feb 2010 10:00:53 +0000 (10:00 +0000)]
Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM
capable compilers (which could be llvm-gcc or clang).

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

14 years agoInitial configure support for using Clang as the LLVM capable compiler.
Daniel Dunbar [Tue, 23 Feb 2010 10:00:49 +0000 (10:00 +0000)]
Initial configure support for using Clang as the LLVM capable compiler.

Comes in two parts:
 1. Use --with-clang=path/to/clang/compiler to select an installed clang, or
    --with-built-clang to have the makefiles use the clang which will be built
    as the LLVM capable compiler. If neither is given, --with-built-clang will
    be used if the Clang sources are checked out into the standard location
    (tools/clang).

 2. Use --with-llvmcc={llvm-gcc,clang,none} to specify which LLVM capable
    compiler to use. If not given, then llvm-gcc will be used if available,
    otherwise Clang.

Makefile support still to come.

Eric, Doug, Chris, seem reasonable?

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

14 years agoUpdate mcc16 and the ancient Clang plugin for the 'cmd_line' -> 'command' change.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:59:30 +0000 (09:59 +0000)]
Update mcc16 and the ancient Clang plugin for the 'cmd_line' -> 'command' change.

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

14 years agoEliminate CFERuntimeLibDir make variable, this shouldn't be needed.
Daniel Dunbar [Tue, 23 Feb 2010 09:28:50 +0000 (09:28 +0000)]
Eliminate CFERuntimeLibDir make variable, this shouldn't be needed.

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

14 years agoFix a thinko in the lit.cfg.
Daniel Dunbar [Tue, 23 Feb 2010 09:28:48 +0000 (09:28 +0000)]
Fix a thinko in the lit.cfg.

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

14 years agoInput files with empty suffixes must be passed to linker.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:05:21 +0000 (09:05 +0000)]
Input files with empty suffixes must be passed to linker.

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

14 years agoSupport -Xlinker et al.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:05:15 +0000 (09:05 +0000)]
Support -Xlinker et al.

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

14 years agoTemporary disable response files.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:05:10 +0000 (09:05 +0000)]
Temporary disable response files.

They are giving us problems on Mac.

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

14 years agoTypo.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:05:06 +0000 (09:05 +0000)]
Typo.

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

14 years agoTrailing whitespace.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:05:01 +0000 (09:05 +0000)]
Trailing whitespace.

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

14 years agoImplement order-preserving option forwarding.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:04:57 +0000 (09:04 +0000)]
Implement order-preserving option forwarding.

Needed to correctly handle things like 'llvmc -framework Foo foo.o -framework
Bar bar.o' - before this commit all '-framework' options would've been grouped
together in the beginning.

Due to our dependence on CommandLine this turned out to be a giant hack; we will
migrate away from CommandLine eventually.

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

14 years agoUpdate the test suite.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:04:51 +0000 (09:04 +0000)]
Update the test suite.

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

14 years agoCorrect option forwarding: initial implementation.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:04:44 +0000 (09:04 +0000)]
Correct option forwarding: initial implementation.

Does not work, but the infrastructure changes are in place.

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

14 years agoPrecompiled headers: initial support.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:04:33 +0000 (09:04 +0000)]
Precompiled headers: initial support.

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

14 years agoNew experimental/undocumented feature: 'works_on_empty'.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:04:28 +0000 (09:04 +0000)]
New experimental/undocumented feature: 'works_on_empty'.

For now, just enough support to make -filelist work.

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

14 years agoSupport '-install_name'.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:04:18 +0000 (09:04 +0000)]
Support '-install_name'.

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

14 years agoAdd a way to enable '-opt=foo' forwarding.
Mikhail Glushenkov [Tue, 23 Feb 2010 09:04:13 +0000 (09:04 +0000)]
Add a way to enable '-opt=foo' forwarding.

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

14 years agoInline and eliminate LLVMG{CC,XX}WITHPATH.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:41 +0000 (07:56 +0000)]
Inline and eliminate LLVMG{CC,XX}WITHPATH.

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

14 years agoRemove ancient Xcode project, replaced by CMake project.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:38 +0000 (07:56 +0000)]
Remove ancient Xcode project, replaced by CMake project.

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

14 years agoRemove dead LUPGRADE make variable.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:36 +0000 (07:56 +0000)]
Remove dead LUPGRADE make variable.

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

14 years agoKill off unused LLVMGCCLIBEXEC make variable.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:34 +0000 (07:56 +0000)]
Kill off unused LLVMGCCLIBEXEC make variable.

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

14 years agoKill off LLVMGCCARCH and LLVMGCC_VERSION make variables.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:31 +0000 (07:56 +0000)]
Kill off LLVMGCCARCH and LLVMGCC_VERSION make variables.

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

14 years agoEliminate llvmgcc_version testing variable.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:28 +0000 (07:56 +0000)]
Eliminate llvmgcc_version testing variable.

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

14 years agoKill off LLVMGCC_MAJVERS make variable.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:22 +0000 (07:56 +0000)]
Kill off LLVMGCC_MAJVERS make variable.

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

14 years agoKill unused llvmgccmajvers testing variable.
Daniel Dunbar [Tue, 23 Feb 2010 07:56:18 +0000 (07:56 +0000)]
Kill unused llvmgccmajvers testing variable.

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

14 years agoadd some #if 0'd out code for checking that named values in
Chris Lattner [Tue, 23 Feb 2010 07:50:58 +0000 (07:50 +0000)]
add some #if 0'd out code for checking that named values in
input/output patterns have the same type.  It turns out that
this triggers all the time because we don't infer types
between these boundaries.  Until we do, don't turn this on.

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

14 years agoReject patterns that use a name multiple times in the src or result
Chris Lattner [Tue, 23 Feb 2010 07:22:28 +0000 (07:22 +0000)]
Reject patterns that use a name multiple times in the src or result
of a pattern and where the uses have different types.

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

14 years agodisable two patterns that are using non-sensical result pattern types.
Chris Lattner [Tue, 23 Feb 2010 07:21:15 +0000 (07:21 +0000)]
disable two patterns that are using non-sensical result pattern types.

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

14 years agoremove a confused pattern that is trying to match an address
Chris Lattner [Tue, 23 Feb 2010 07:16:12 +0000 (07:16 +0000)]
remove a confused pattern that is trying to match an address
then use it as an MMX register (!?).

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

14 years agoreject patterns that have dead named arguments in the input pattern
Chris Lattner [Tue, 23 Feb 2010 06:55:24 +0000 (06:55 +0000)]
reject patterns that have dead named arguments in the input pattern
this is tidier and can find bugs.

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

14 years agoremove a bunch of dead named arguments in input patterns,
Chris Lattner [Tue, 23 Feb 2010 06:54:29 +0000 (06:54 +0000)]
remove a bunch of dead named arguments in input patterns,
though some look dubious afaict, these are all ok.

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

14 years agoreject patterns that mention a name in the destination pattern
Chris Lattner [Tue, 23 Feb 2010 06:35:45 +0000 (06:35 +0000)]
reject patterns that mention a name in the destination pattern
but not in the input.  Previously, this would trigger an abort
late in the isel logic.

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

14 years agomerge some code.
Chris Lattner [Tue, 23 Feb 2010 06:16:51 +0000 (06:16 +0000)]
merge some code.

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

14 years agofix a type mismatch in this pattern, where we were using an i64 imm in a
Chris Lattner [Tue, 23 Feb 2010 06:09:57 +0000 (06:09 +0000)]
fix a type mismatch in this pattern, where we were using an i64 imm in a
place where an i32 imm was required, the old isel just got lucky.

This fixes CodeGen/X86/x86-64-and-mask.ll

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

14 years agomore tidying up
Chris Lattner [Tue, 23 Feb 2010 05:59:10 +0000 (05:59 +0000)]
more tidying up

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

14 years agoUpdate memdep when load PRE inserts a new load, and add some debug output.
Bob Wilson [Tue, 23 Feb 2010 05:55:00 +0000 (05:55 +0000)]
Update memdep when load PRE inserts a new load, and add some debug output.
I don't have a small testcase for this.

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

14 years agoreduce indentation by eliminating 'else after return'
Chris Lattner [Tue, 23 Feb 2010 05:51:07 +0000 (05:51 +0000)]
reduce indentation by eliminating 'else after return'

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

14 years agoreapply my cellspu changes with a fix to not break the old isel.
Chris Lattner [Tue, 23 Feb 2010 05:30:43 +0000 (05:30 +0000)]
reapply my cellspu changes with a fix to not break the old isel.

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

14 years agoUpdate LangRef to match the code; pointers default to being 64-bit.
Dan Gohman [Tue, 23 Feb 2010 02:44:03 +0000 (02:44 +0000)]
Update LangRef to match the code; pointers default to being 64-bit.

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

14 years agoRevert 96854, 96852, and 96849, unbreaking test/CodeGen/CellSPU/i64ops.ll.
Dan Gohman [Tue, 23 Feb 2010 02:33:29 +0000 (02:33 +0000)]
Revert 96854, 96852, and 96849, unbreaking test/CodeGen/CellSPU/i64ops.ll.

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

14 years agoX86InstrInfoSSE.td declares PINSRW as having type v8i16,
Chris Lattner [Tue, 23 Feb 2010 02:07:48 +0000 (02:07 +0000)]
X86InstrInfoSSE.td declares PINSRW as having type v8i16,
don't alis it in the MMX .td file with a different width,
split into two X86ISD opcodes.  This fixes an x86 testcase.

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

14 years agoAdded versions of VCGE, VCGT, VCLE, and VCLT NEON instructions which compare to
Johnny Chen [Tue, 23 Feb 2010 01:42:58 +0000 (01:42 +0000)]
Added versions of VCGE, VCGT, VCLE, and VCLT NEON instructions which compare to
(immediate #0) for disassembly only.

A8.6.283, A8.6.285, A8.6.287, A8.6.290

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

14 years agofix hte last cellspu failure.
Chris Lattner [Tue, 23 Feb 2010 01:37:39 +0000 (01:37 +0000)]
fix hte last cellspu failure.

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

14 years agohack around more crimes in instruction selection.
Chris Lattner [Tue, 23 Feb 2010 01:33:17 +0000 (01:33 +0000)]
hack around more crimes in instruction selection.

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

14 years agoConvert this test to FileCheck and add a testcase for PR3574.
Dan Gohman [Tue, 23 Feb 2010 01:28:09 +0000 (01:28 +0000)]
Convert this test to FileCheck and add a testcase for PR3574.

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

14 years agothe cell backend is making all sorts of unsafe and incorrect assumptions
Chris Lattner [Tue, 23 Feb 2010 01:20:00 +0000 (01:20 +0000)]
the cell backend is making all sorts of unsafe and incorrect assumptions
about ownership and update policies.  It isn't clear why it is doing all
this lowering at isel time instead of in legalize.  This fixes fcmp64.ll

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

14 years agoreally fix an off-by-one error
Chris Lattner [Tue, 23 Feb 2010 01:07:39 +0000 (01:07 +0000)]
really fix an off-by-one error

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

14 years agofix an off-by-one error.
Chris Lattner [Tue, 23 Feb 2010 01:07:09 +0000 (01:07 +0000)]
fix an off-by-one error.

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

14 years agoswitch the value# in OPC_CompleteMatch and OPC_EmitNode to use a
Chris Lattner [Tue, 23 Feb 2010 00:59:59 +0000 (00:59 +0000)]
switch the value# in OPC_CompleteMatch and OPC_EmitNode to use a
VBR encoding for the insanity being perpetrated by the spu backend.

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

14 years agoAdded VCEQ (immediate #0) NEON instruction for disassembly only.
Johnny Chen [Tue, 23 Feb 2010 00:33:12 +0000 (00:33 +0000)]
Added VCEQ (immediate #0) NEON instruction for disassembly only.

A8.6.281

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

14 years agoDead code elimination
Jakob Stoklund Olesen [Tue, 23 Feb 2010 00:28:53 +0000 (00:28 +0000)]
Dead code elimination

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

14 years agoFix viewCFG on Linux.
Jeffrey Yasskin [Tue, 23 Feb 2010 00:04:53 +0000 (00:04 +0000)]
Fix viewCFG on Linux.

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

14 years agoadd a new Push2 opcode for targets (like cellspu) which have
Chris Lattner [Mon, 22 Feb 2010 23:55:39 +0000 (23:55 +0000)]
add a new Push2 opcode for targets (like cellspu) which have
ridiculously ginormous patterns and need more than one byte
of displacement for encodings.  This fixes CellSPU/fdiv.ll.
SPU is still doing something else ridiculous though.

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

14 years agoThese should not have been committed.
Evan Cheng [Mon, 22 Feb 2010 23:37:48 +0000 (23:37 +0000)]
These should not have been committed.

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

14 years agono need to run llvm-as here.
Chris Lattner [Mon, 22 Feb 2010 23:34:12 +0000 (23:34 +0000)]
no need to run llvm-as here.

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

14 years agoInstcombine constant folding can normalize gep with negative index to index with...
Evan Cheng [Mon, 22 Feb 2010 23:34:00 +0000 (23:34 +0000)]
Instcombine constant folding can normalize gep with negative index to index with large offset. When instcombine objsize checking transformation sees these geps where the offset seemingly point out of bound, it should just return "i don't know" rather than asserting.

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

14 years agoChange ComplexPattern handling to push the node being matched as
Chris Lattner [Mon, 22 Feb 2010 23:33:44 +0000 (23:33 +0000)]
Change ComplexPattern handling to push the node being matched as
well as the operands produced when the pattern is matched.  This
allows CheckSame to work correctly when matching replicated
names involving ComplexPatterns.  This fixes a bunch of MSP430
failures, we're down to 13 failures, two of which are
due to a sched bug.

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

14 years agoUpdated version of r96634 (which was reverted due to failing 176.gcc and
Jim Grosbach [Mon, 22 Feb 2010 23:10:38 +0000 (23:10 +0000)]
Updated version of r96634 (which was reverted due to failing 176.gcc and
126.gcc nightly tests. These failures uncovered latent bugs that machine DCE
could remove one half of a stack adjust down/up pair, causing PEI to assert.
This update fixes that, and the tests now pass.

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

14 years agoAdd a test for canonicalizing ConstantExpr operands.
Dan Gohman [Mon, 22 Feb 2010 23:07:52 +0000 (23:07 +0000)]
Add a test for canonicalizing ConstantExpr operands.

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

14 years agoClean up a bit and fix for when SPAdj != 0
Jim Grosbach [Mon, 22 Feb 2010 22:54:55 +0000 (22:54 +0000)]
Clean up a bit and fix for when SPAdj != 0

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

14 years agoThe predicate index isn't fixed, so scan for it to make sure we get the proper
Jim Grosbach [Mon, 22 Feb 2010 22:47:46 +0000 (22:47 +0000)]
The predicate index isn't fixed, so scan for it to make sure we get the proper
value.

Thumb2 uses the tADJCALLSTACK* instructions, and doesn't need t2 versions, so
remove the FIXME entry.

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

14 years agoCanonicalize ConstantInts to the right operand of commutative
Dan Gohman [Mon, 22 Feb 2010 22:43:23 +0000 (22:43 +0000)]
Canonicalize ConstantInts to the right operand of commutative
operators.

The test difference is just due to the multiplication operands
being commuted (and thus requiring a more elaborate match). In
optimized code, that expression would be folded.

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

14 years agoexpand my hack to work with nodes that have flags but no chains and the
Chris Lattner [Mon, 22 Feb 2010 22:37:11 +0000 (22:37 +0000)]
expand my hack to work with nodes that have flags but no chains and the
isel doesn't know the correct # results.  This fixes 8 codegen tests,
down to 22 failures.

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

14 years agoadd a new CheckMultiOpcode opcode for checking that a node
Chris Lattner [Mon, 22 Feb 2010 22:30:37 +0000 (22:30 +0000)]
add a new CheckMultiOpcode opcode for checking that a node
has one of the list of acceptable opcodes for a complex
pattern.  This fixes 4 regtest failures.

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

14 years agoWhen matching patterns that have a complex pattern as their root, make
Chris Lattner [Mon, 22 Feb 2010 22:18:05 +0000 (22:18 +0000)]
When matching patterns that have a complex pattern as their root, make
sure to only run the complex pattern on nodes where the target opts in.
This patch only handles targets with one opcode specified so far, but
fixes 16 failures, only 34 left.

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

14 years agoadd some debug hooks for tracking the behavior of the isel.
Chris Lattner [Mon, 22 Feb 2010 22:15:39 +0000 (22:15 +0000)]
add some debug hooks for tracking the behavior of the isel.

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

14 years agoremove dupes now.
Chris Lattner [Mon, 22 Feb 2010 22:15:05 +0000 (22:15 +0000)]
remove dupes now.

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

14 years agomove #includes earlier.
Chris Lattner [Mon, 22 Feb 2010 22:14:47 +0000 (22:14 +0000)]
move #includes earlier.

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

14 years agoMC/Mach-O: Remove non-sensical comment, and add a missing AddValueSymbols call.
Daniel Dunbar [Mon, 22 Feb 2010 22:08:57 +0000 (22:08 +0000)]
MC/Mach-O: Remove non-sensical comment, and add a missing AddValueSymbols call.

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

14 years agoMinor formatting cleanup.
Dan Gohman [Mon, 22 Feb 2010 22:07:27 +0000 (22:07 +0000)]
Minor formatting cleanup.

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

14 years agoUse Instruction::isCommutative instead of duplicating it.
Dan Gohman [Mon, 22 Feb 2010 22:05:18 +0000 (22:05 +0000)]
Use Instruction::isCommutative instead of duplicating it.

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

14 years agoAdded SEL, SXTB16, SXTAB16, UXTAB16, SMMULR, SMMLAR, SMMLSR, SMUAD, and SMUSD,
Johnny Chen [Mon, 22 Feb 2010 21:50:40 +0000 (21:50 +0000)]
Added SEL, SXTB16, SXTAB16, UXTAB16, SMMULR, SMMLAR, SMMLSR, SMUAD, and SMUSD,
for disassembly only.

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

14 years agoErase deleted instructions from GVN's ValueTable. This fixes assertion
Bob Wilson [Mon, 22 Feb 2010 21:39:41 +0000 (21:39 +0000)]
Erase deleted instructions from GVN's ValueTable.  This fixes assertion
failures from ValueTable::verifyRemoved() when using -debug.

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

14 years agoActually enable the -enable-unsafe-fp-math tests.
Dan Gohman [Mon, 22 Feb 2010 18:53:26 +0000 (18:53 +0000)]
Actually enable the -enable-unsafe-fp-math tests.

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

14 years agoAdded a bunch of instructions for disassembly only:
Johnny Chen [Mon, 22 Feb 2010 18:50:54 +0000 (18:50 +0000)]
Added a bunch of instructions for disassembly only:

o signed/unsigned add/subtract
o signed/unsigned halving add/subtract
o unsigned sum of absolute difference [and accumulate]
o signed/unsigned saturate
o signed multiply accumulate/subtract [long] dual

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

14 years agoMark the return address stack slot as mutable when moving the return address
Arnold Schwaighofer [Mon, 22 Feb 2010 16:18:09 +0000 (16:18 +0000)]
Mark the return address stack slot as mutable when moving the return address
during a tail call. A parameter might overwrite this stack slot during the tail
call.

The sequence during a tail call is:
1.) load return address to temp reg
2.) move parameters (might involve storing to return address stack slot)
3.) store return address to new location from temp reg

If the stack location is marked immutable CodeGen can colocate load (1) with the
store (3).

This fixes bug 6225.

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

14 years agoLLVMC/MultiplePluginPriorities.td: Generally XFAIL this test for now, it is
Daniel Dunbar [Mon, 22 Feb 2010 05:55:32 +0000 (05:55 +0000)]
LLVMC/MultiplePluginPriorities.td: Generally XFAIL this test for now, it is
still failing during (one) llvm-gcc powerpc build, and is also failing on my
x86_64-apple-darwin10.

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

14 years agoRemove unused variables and parameters.
Dan Gohman [Mon, 22 Feb 2010 04:11:59 +0000 (04:11 +0000)]
Remove unused variables and parameters.

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

14 years agoFix various doxygen warnings.
Dan Gohman [Mon, 22 Feb 2010 04:10:52 +0000 (04:10 +0000)]
Fix various doxygen warnings.

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

14 years agoFix a typo in a comment.
Dan Gohman [Mon, 22 Feb 2010 04:09:26 +0000 (04:09 +0000)]
Fix a typo in a comment.

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

14 years agoConstant-fold certain comparisons with infinity and negative infinity.
Dan Gohman [Mon, 22 Feb 2010 04:06:03 +0000 (04:06 +0000)]
Constant-fold certain comparisons with infinity and negative infinity.

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

14 years agoRename a variable to avoid a -Wshadow warning.
Dan Gohman [Mon, 22 Feb 2010 04:04:24 +0000 (04:04 +0000)]
Rename a variable to avoid a -Wshadow warning.

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

14 years agoRemove the logic for reasoning about NaNs from the code that forms
Dan Gohman [Mon, 22 Feb 2010 04:03:39 +0000 (04:03 +0000)]
Remove the logic for reasoning about NaNs from the code that forms
SSE min and max instructions. The real thing this code needs to be
concerned about is negative zero.

Update the sse-minmax.ll test accordingly, and add tests for
-enable-unsafe-fp-math mode as well.

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

14 years agoWhen emitting an instruction which depends on both a post-incremented
Dan Gohman [Mon, 22 Feb 2010 03:59:54 +0000 (03:59 +0000)]
When emitting an instruction which depends on both a post-incremented
induction variable value and a loop-variant value, don't force the
insert position to be at the post-increment position, because it may
not be dominated by the loop-variant value. This fixes a
use-before-def problem noticed on PPC.

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

14 years agoThis cast<Instruction> is unnecessary.
Dan Gohman [Mon, 22 Feb 2010 02:07:36 +0000 (02:07 +0000)]
This cast<Instruction> is unnecessary.

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

14 years agoenhance my hack for flags handling, this allows us to pass
Chris Lattner [Mon, 22 Feb 2010 00:47:38 +0000 (00:47 +0000)]
enhance my hack for flags handling, this allows us to pass
CodeGen/X86/pr2182.ll.  Down to 13 x86 failures out of ~1100

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

14 years agofix an incorrect VT: eflags is always i32. The bug was causing us to
Chris Lattner [Mon, 22 Feb 2010 00:28:59 +0000 (00:28 +0000)]
fix an incorrect VT: eflags is always i32.  The bug was causing us to
create an X86ISD::Cmp node with result type i64 on the
CodeGen/X86/shift-i256.ll testcase and the new isel was assert on it
downstream.

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