oota-llvm.git
17 years agoFirst version of llvm-upgrade that can correctly upgrade all of
Reid Spencer [Fri, 1 Dec 2006 21:10:07 +0000 (21:10 +0000)]
First version of llvm-upgrade that can correctly upgrade all of
test/Feature

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

17 years agoAdd weak reference directive.
Evan Cheng [Fri, 1 Dec 2006 20:47:11 +0000 (20:47 +0000)]
Add weak reference directive.

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

17 years agovalgrind clean version of llvm-upgrade
Reid Spencer [Fri, 1 Dec 2006 20:36:40 +0000 (20:36 +0000)]
valgrind clean version of llvm-upgrade

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

17 years agoFirst version of llvm-upgrade that can correctly upgrade a large test
Reid Spencer [Fri, 1 Dec 2006 20:26:20 +0000 (20:26 +0000)]
First version of llvm-upgrade that can correctly upgrade a large test
case.

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

17 years agoRemove dead methods
Chris Lattner [Fri, 1 Dec 2006 20:14:47 +0000 (20:14 +0000)]
Remove dead methods

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

17 years agoThese should be rewritten to fold without using the 'Rules' mechanism, but
Chris Lattner [Fri, 1 Dec 2006 19:50:54 +0000 (19:50 +0000)]
These should be rewritten to fold without using the 'Rules' mechanism, but
until this happens at least make sext from bool and sitofp from bool do the
right thing.

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

17 years agotest1 is miscompiled
Chris Lattner [Fri, 1 Dec 2006 19:50:04 +0000 (19:50 +0000)]
test1 is miscompiled

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

17 years agowrong spot
Jim Laskey [Fri, 1 Dec 2006 19:39:32 +0000 (19:39 +0000)]
wrong spot

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

17 years agoTest for float varargs.
Jim Laskey [Fri, 1 Dec 2006 19:29:20 +0000 (19:29 +0000)]
Test for float varargs.

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

17 years agothis logic is broken for trunc to bool, replace the folding logic for trunc
Chris Lattner [Fri, 1 Dec 2006 19:22:41 +0000 (19:22 +0000)]
this logic is broken for trunc to bool, replace the folding logic for trunc
completely, as it is trivial.  We should probably do this for the rest of the
cast operations.  This fixes ConstProp/2006-12-01-TruncBoolBug.ll.

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

17 years agoadd a new ConstantIntegral::get method. Simplify the implementation of
Chris Lattner [Fri, 1 Dec 2006 19:20:02 +0000 (19:20 +0000)]
add a new ConstantIntegral::get method.  Simplify the implementation of
ConstantInt::get

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

17 years agonew 'cast' miscompilation, reduced from perlbmk by Evan
Chris Lattner [Fri, 1 Dec 2006 19:02:56 +0000 (19:02 +0000)]
new 'cast' miscompilation, reduced from perlbmk by Evan

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

17 years agoenable this now that codegen support is in place
Chris Lattner [Fri, 1 Dec 2006 18:04:08 +0000 (18:04 +0000)]
enable this now that codegen support is in place

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

17 years agoCopy and paste error. An initialized global cannot be a weak reference.
Evan Cheng [Fri, 1 Dec 2006 17:39:22 +0000 (17:39 +0000)]
Copy and paste error. An initialized global cannot be a weak reference.

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

17 years ago1. In ppc64 mode we need only use one GPR.
Jim Laskey [Fri, 1 Dec 2006 16:30:47 +0000 (16:30 +0000)]
1. In ppc64 mode we need only use one GPR.
2. Float values need to be promoted to double when they are vararg.

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

17 years agoExternalWeak case in wrong location.
Jim Laskey [Fri, 1 Dec 2006 14:37:39 +0000 (14:37 +0000)]
ExternalWeak case in wrong location.

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

17 years agoThis test is meant for X86 CPU which does not support SSE2.
Evan Cheng [Fri, 1 Dec 2006 10:17:36 +0000 (10:17 +0000)]
This test is meant for X86 CPU which does not support SSE2.

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

17 years agoFix 2005-05-08-FPStackifierPHI.ll failure.
Evan Cheng [Fri, 1 Dec 2006 10:11:51 +0000 (10:11 +0000)]
Fix 2005-05-08-FPStackifierPHI.ll failure.

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

17 years agoAdd a extern weak test case.
Evan Cheng [Fri, 1 Dec 2006 09:18:20 +0000 (09:18 +0000)]
Add a extern weak test case.

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

17 years agoA initialized global variable cannot be extern weak. However, if a global value's...
Evan Cheng [Fri, 1 Dec 2006 09:13:26 +0000 (09:13 +0000)]
A initialized global variable cannot be extern weak. However, if a global value's initializer is itself a external weak symbol, emit the weak reference.

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

17 years agoDarwin PPC external weak linkage support.
Evan Cheng [Fri, 1 Dec 2006 07:56:37 +0000 (07:56 +0000)]
Darwin PPC external weak linkage support.

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

17 years agoMinor code clean up.
Evan Cheng [Fri, 1 Dec 2006 07:38:23 +0000 (07:38 +0000)]
Minor code clean up.

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

17 years agoFix indentation.
Evan Cheng [Fri, 1 Dec 2006 07:17:00 +0000 (07:17 +0000)]
Fix indentation.

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

17 years agoDarwin X86 external weak linkage support.
Evan Cheng [Fri, 1 Dec 2006 07:15:24 +0000 (07:15 +0000)]
Darwin X86 external weak linkage support.

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

17 years agonew testcase to verify external weak continues to work
Chris Lattner [Fri, 1 Dec 2006 07:14:26 +0000 (07:14 +0000)]
new testcase to verify external weak continues to work

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

17 years agonew testcase for PR1027
Chris Lattner [Fri, 1 Dec 2006 06:34:56 +0000 (06:34 +0000)]
new testcase for PR1027

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

17 years agoFix a typo introduced by the cast patch that horribly broke a lot of vector
Chris Lattner [Fri, 1 Dec 2006 05:55:25 +0000 (05:55 +0000)]
Fix a typo introduced by the cast patch that horribly broke a lot of vector
code.  Testcase here: Transforms/ConstProp/2006-11-30-vector-cast.ll

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

17 years agonew testcase
Chris Lattner [Fri, 1 Dec 2006 05:54:48 +0000 (05:54 +0000)]
new testcase

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

17 years agoDon't fold "ptrtoint GV to bool" since this should be doing a truncate not
Reid Spencer [Fri, 1 Dec 2006 03:56:30 +0000 (03:56 +0000)]
Don't fold "ptrtoint GV to bool" since this should be doing a truncate not
a comparison against zero. Instead fold setne(GV,null) and seteq(GV,null)
to ConstantBool::True or ConstantBool::False, respectively.

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

17 years agoDefine the HAVE_PTHREAD symbol.
Reid Spencer [Fri, 1 Dec 2006 03:46:01 +0000 (03:46 +0000)]
Define the HAVE_PTHREAD symbol.

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

17 years agoThe InstCombine hack has been removed, no need to XFAIL this any more.
Reid Spencer [Fri, 1 Dec 2006 01:50:45 +0000 (01:50 +0000)]
The InstCombine hack has been removed, no need to XFAIL this any more.

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

17 years agoFix the CodeGen/PowerPC/vec_constants.ll regression.
Chris Lattner [Fri, 1 Dec 2006 01:45:39 +0000 (01:45 +0000)]
Fix the CodeGen/PowerPC/vec_constants.ll regression.

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

17 years agoRemove extra header.
Nick Lewycky [Fri, 1 Dec 2006 01:05:14 +0000 (01:05 +0000)]
Remove extra header.

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

17 years agoFix opt -o option. Don't pass a pointer to an auto variable which is going
Nick Lewycky [Fri, 1 Dec 2006 00:43:14 +0000 (00:43 +0000)]
Fix opt -o option. Don't pass a pointer to an auto variable which is going
away before it's needed, and don't try to delete that pointer!

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

17 years agoFor PR1019:
Reid Spencer [Fri, 1 Dec 2006 00:37:14 +0000 (00:37 +0000)]
For PR1019:
Add HAVE_PTHREAD to makefiles with support from configure and use it to
determine whether to build examples/ParallelJIT.
Patch by Anton Korobeynikov.

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

17 years agoRegenerate.
Reid Spencer [Fri, 1 Dec 2006 00:33:46 +0000 (00:33 +0000)]
Regenerate.

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

17 years agoIntroducing external weak linkage. Darwin codegen should be added later.
Anton Korobeynikov [Fri, 1 Dec 2006 00:25:12 +0000 (00:25 +0000)]
Introducing external weak linkage. Darwin codegen should be added later.

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

17 years agoRemove 4 FIXMEs to hack around cast-to-bool problems which no longer exist.
Reid Spencer [Thu, 30 Nov 2006 23:13:36 +0000 (23:13 +0000)]
Remove 4 FIXMEs to hack around cast-to-bool problems which no longer exist.

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

17 years agoFactor out GVRequiresExtraLoad() from .h to .cpp
Anton Korobeynikov [Thu, 30 Nov 2006 22:42:55 +0000 (22:42 +0000)]
Factor out GVRequiresExtraLoad() from .h to .cpp

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

17 years agoAdd X86-64 load / store codegen tests.
Evan Cheng [Thu, 30 Nov 2006 22:07:00 +0000 (22:07 +0000)]
Add X86-64 load / store codegen tests.

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

17 years ago- Use a different wrapper node for RIP-relative GV, etc.
Evan Cheng [Thu, 30 Nov 2006 21:55:46 +0000 (21:55 +0000)]
- Use a different wrapper node for RIP-relative GV, etc.
- Proper support for both small static and PIC modes under X86-64
- Some (non-optimal) support for medium modes.

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

17 years agobetter check for version
Jim Laskey [Thu, 30 Nov 2006 18:29:23 +0000 (18:29 +0000)]
better check for version

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

17 years agomake it clear that this is always a zext
Chris Lattner [Thu, 30 Nov 2006 17:35:08 +0000 (17:35 +0000)]
make it clear that this is always a zext

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

17 years agoOne more bugfix, 3 cases of making casts explicit.
Chris Lattner [Thu, 30 Nov 2006 17:32:29 +0000 (17:32 +0000)]
One more bugfix, 3 cases of making casts explicit.

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

17 years agoFix a bug in globalopt due to the recent cast patch.
Chris Lattner [Thu, 30 Nov 2006 17:26:08 +0000 (17:26 +0000)]
Fix a bug in globalopt due to the recent cast patch.

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

17 years agoAllow llvm-upgrade to read from stdin. Configure the lexer for reading
Reid Spencer [Thu, 30 Nov 2006 16:50:26 +0000 (16:50 +0000)]
Allow llvm-upgrade to read from stdin. Configure the lexer for reading
from C++ std::istream.

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

17 years agoAdd compile unit size test
Jim Laskey [Thu, 30 Nov 2006 15:36:44 +0000 (15:36 +0000)]
Add compile unit size test

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

17 years agoCorrect comment
Jim Laskey [Thu, 30 Nov 2006 15:31:49 +0000 (15:31 +0000)]
Correct comment

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

17 years agoPubnames test
Jim Laskey [Thu, 30 Nov 2006 15:25:59 +0000 (15:25 +0000)]
Pubnames test

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

17 years agoUpdate docs
Jim Laskey [Thu, 30 Nov 2006 14:36:22 +0000 (14:36 +0000)]
Update docs

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

17 years agoChange global descriptor names to provide name, full name and linkage name.
Jim Laskey [Thu, 30 Nov 2006 14:35:45 +0000 (14:35 +0000)]
Change global descriptor names to provide name, full name and linkage name.

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

17 years agoTemp fix to deal gdb issue.
Jim Laskey [Thu, 30 Nov 2006 11:09:42 +0000 (11:09 +0000)]
Temp fix to deal gdb issue.

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

17 years agoMachineInstr::setOpcode -> MachineInstr::setInstrDescriptor
Evan Cheng [Thu, 30 Nov 2006 07:12:03 +0000 (07:12 +0000)]
MachineInstr::setOpcode -> MachineInstr::setInstrDescriptor

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

17 years agoRemove the ugly SPARCV9 TargetInstrDescriptors hack.
Evan Cheng [Thu, 30 Nov 2006 07:10:43 +0000 (07:10 +0000)]
Remove the ugly SPARCV9 TargetInstrDescriptors hack.

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

17 years ago- MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
Evan Cheng [Thu, 30 Nov 2006 07:08:44 +0000 (07:08 +0000)]
- MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
- Remove the ugly TargetInstrDescriptors hack.

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

17 years agoIgnore generated files.
Reid Spencer [Thu, 30 Nov 2006 06:37:43 +0000 (06:37 +0000)]
Ignore generated files.

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

17 years agoInitial, non-functional, version of llvm-upgrade. This version just echos
Reid Spencer [Thu, 30 Nov 2006 06:36:44 +0000 (06:36 +0000)]
Initial, non-functional, version of llvm-upgrade. This version just echos
its input. Committed for safekeeping purposes. Don't use this yet.

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

17 years agoNew LSR test case.
Evan Cheng [Wed, 29 Nov 2006 23:48:37 +0000 (23:48 +0000)]
New LSR test case.

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

17 years agoIn PIC mode, GV not requiring an extra load can be used as address immediate.
Evan Cheng [Wed, 29 Nov 2006 23:48:14 +0000 (23:48 +0000)]
In PIC mode, GV not requiring an extra load can be used as address immediate.

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

17 years agoClean up.
Evan Cheng [Wed, 29 Nov 2006 23:46:27 +0000 (23:46 +0000)]
Clean up.

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

17 years agoFix for PR1018 - Better support for X86-64 Linux in small code model.
Evan Cheng [Wed, 29 Nov 2006 23:19:46 +0000 (23:19 +0000)]
Fix for PR1018 - Better support for X86-64 Linux in small code model.

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

17 years agoGet the delegation right for InstVisitor.
Reid Spencer [Wed, 29 Nov 2006 21:37:00 +0000 (21:37 +0000)]
Get the delegation right for InstVisitor.

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

17 years agoFix bug codegen'ing FP constant vectors with integer splats. Make sure the
Chris Lattner [Wed, 29 Nov 2006 19:58:49 +0000 (19:58 +0000)]
Fix bug codegen'ing FP constant vectors with integer splats.  Make sure the
created intrinsics have the right integer types.  This fixes
PowerPC/2006-11-29-AltivecFPSplat.ll

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

17 years agonew testcase
Chris Lattner [Wed, 29 Nov 2006 19:57:55 +0000 (19:57 +0000)]
new testcase

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

17 years agoAvoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
Evan Cheng [Wed, 29 Nov 2006 19:13:47 +0000 (19:13 +0000)]
Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.

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

17 years agoEliminate unnecessary scopes.
Jim Laskey [Wed, 29 Nov 2006 16:55:57 +0000 (16:55 +0000)]
Eliminate unnecessary scopes.

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

17 years agoOffset for load of 32-bit arg in 64-bit world was incorrect.
Jim Laskey [Wed, 29 Nov 2006 13:37:09 +0000 (13:37 +0000)]
Offset for load of 32-bit arg in 64-bit world was incorrect.

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

17 years agoAdd x86-64 llvm.readcyclecounter test.
Evan Cheng [Wed, 29 Nov 2006 08:29:59 +0000 (08:29 +0000)]
Add x86-64 llvm.readcyclecounter test.

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

17 years agoCustom lower READCYCLECOUNTER for x86-64.
Evan Cheng [Wed, 29 Nov 2006 08:28:13 +0000 (08:28 +0000)]
Custom lower READCYCLECOUNTER for x86-64.

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

17 years agoAllow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
Evan Cheng [Wed, 29 Nov 2006 08:26:18 +0000 (08:26 +0000)]
Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).

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

17 years agoFix test.
Evan Cheng [Wed, 29 Nov 2006 08:22:59 +0000 (08:22 +0000)]
Fix test.

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

17 years agoOops! didn't mean to put this in there yet.
Bill Wendling [Wed, 29 Nov 2006 07:31:23 +0000 (07:31 +0000)]
Oops! didn't mean to put this in there yet.

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

17 years agodone
Chris Lattner [Wed, 29 Nov 2006 07:21:46 +0000 (07:21 +0000)]
done

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

17 years agonew bswap idiom
Chris Lattner [Wed, 29 Nov 2006 07:21:08 +0000 (07:21 +0000)]
new bswap idiom

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

17 years agoimplement cast.ll:test35. With this, we recognize:
Chris Lattner [Wed, 29 Nov 2006 07:18:39 +0000 (07:18 +0000)]
implement cast.ll:test35.  With this, we recognize:

unsigned short swp(unsigned short a) {
       return ((a & 0xff00) >> 8 | (a & 0x00ff) << 8);
}

as an idiom for bswap.

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

17 years agonew testcase
Chris Lattner [Wed, 29 Nov 2006 07:17:32 +0000 (07:17 +0000)]
new testcase

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

17 years agoTeach instcombine to turn trunc(srl x, c) -> srl (trunc(x), c) when safe.
Chris Lattner [Wed, 29 Nov 2006 07:04:07 +0000 (07:04 +0000)]
Teach instcombine to turn trunc(srl x, c) -> srl (trunc(x), c) when safe.
This implements InstCombine/cast.ll:test34.  It fires hundreds of times on
176.gcc.

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

17 years agonew testcase
Chris Lattner [Wed, 29 Nov 2006 07:03:00 +0000 (07:03 +0000)]
new testcase

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

17 years agoThis fails on mainline.
Chris Lattner [Wed, 29 Nov 2006 05:19:32 +0000 (05:19 +0000)]
This fails on mainline.

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

17 years agoImplement Regression/Transforms/InstCombine/bswap-fold.ll,
Chris Lattner [Wed, 29 Nov 2006 05:02:16 +0000 (05:02 +0000)]
Implement Regression/Transforms/InstCombine/bswap-fold.ll,
folding   seteq (bswap(x)), c -> seteq(x,bswap(c))

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

17 years agonew testcase, bswaps should be eliminated.
Chris Lattner [Wed, 29 Nov 2006 05:00:14 +0000 (05:00 +0000)]
new testcase, bswaps should be eliminated.

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

17 years ago16-byte stack alignment for X86-64 ELF. Patch by Dan Gohman.
Evan Cheng [Wed, 29 Nov 2006 02:00:40 +0000 (02:00 +0000)]
16-byte stack alignment for X86-64 ELF. Patch by Dan Gohman.

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

17 years agoFix for PR1023 by Dan Gohman.
Evan Cheng [Wed, 29 Nov 2006 01:58:12 +0000 (01:58 +0000)]
Fix for PR1023 by Dan Gohman.

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

17 years agoAdd test cases for PR1022, 1023.
Evan Cheng [Wed, 29 Nov 2006 01:57:06 +0000 (01:57 +0000)]
Add test cases for PR1022, 1023.

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

17 years agoUpgrade the ugly darwin 64-bit bswap idiom (bswap %eax / bswap %edx /
Chris Lattner [Wed, 29 Nov 2006 01:48:01 +0000 (01:48 +0000)]
Upgrade the ugly darwin 64-bit bswap idiom (bswap %eax / bswap %edx /
xchgl %eax, %edx) to llvm.bswap.i64.  This compiles:

long long test2(long long A) {
  return _OSSwapInt64(A);
}

to:

_test2:
        movl 8(%esp), %eax
        movl 4(%esp), %edx
        bswapl %eax
        bswapl %edx
        ret

instead of:

_test2:
        movl 8(%esp), %edx
        movl 4(%esp), %eax
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        ret

GCC manages (with -fomit-frame-pointer) the uglier:

_test2:
        subl    $4, %esp
        movl    8(%esp), %eax
        movl    12(%esp), %edx
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        addl    $4, %esp
        ret

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

17 years agoFix for PR1022 (folding loads of static initializers) by Dan Gohman.
Evan Cheng [Wed, 29 Nov 2006 01:38:07 +0000 (01:38 +0000)]
Fix for PR1022 (folding loads of static initializers) by Dan Gohman.

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

17 years agoTrivially lower 'bswap $0' into llvm.bswap. This fixes hexxagon with the
Chris Lattner [Wed, 29 Nov 2006 01:14:06 +0000 (01:14 +0000)]
Trivially lower 'bswap $0' into llvm.bswap.  This fixes hexxagon with the
JIT on darwin/x86, which has htonl implemented as inline asm.

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

17 years agoWTF? These weird newlines got in there...
Bill Wendling [Wed, 29 Nov 2006 01:14:00 +0000 (01:14 +0000)]
WTF? These weird newlines got in there...

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

17 years agoadd a hook to allow targets to hack on inline asms to lower them to llvm
Chris Lattner [Wed, 29 Nov 2006 01:12:32 +0000 (01:12 +0000)]
add a hook to allow targets to hack on inline asms to lower them to llvm
when they want to.

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

17 years agoJoin a split line.
Reid Spencer [Wed, 29 Nov 2006 01:11:01 +0000 (01:11 +0000)]
Join a split line.

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

17 years agoConverted to using llvm streams instead of <iostream>s
Bill Wendling [Wed, 29 Nov 2006 00:39:47 +0000 (00:39 +0000)]
Converted to using llvm streams instead of <iostream>s

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

17 years agoReplacing std::iostreams with llvm iostreams. Some of these changes involve
Bill Wendling [Wed, 29 Nov 2006 00:19:40 +0000 (00:19 +0000)]
Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.

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

17 years agoConvert to using llvm streams instead of iostreams.
Bill Wendling [Tue, 28 Nov 2006 23:33:06 +0000 (23:33 +0000)]
Convert to using llvm streams instead of iostreams.

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

17 years agoSupport for llvm_ostreams.
Bill Wendling [Tue, 28 Nov 2006 23:31:42 +0000 (23:31 +0000)]
Support for llvm_ostreams.

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

17 years agogcc doesn't like an empty colbber list
Andrew Lenharth [Tue, 28 Nov 2006 23:07:32 +0000 (23:07 +0000)]
gcc doesn't like an empty colbber list

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

17 years agoUse ostream instead of iostream
Bill Wendling [Tue, 28 Nov 2006 22:49:32 +0000 (22:49 +0000)]
Use ostream instead of iostream

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

17 years agoUse llvm streams instead of <iostream>
Bill Wendling [Tue, 28 Nov 2006 22:48:48 +0000 (22:48 +0000)]
Use llvm streams instead of <iostream>

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

17 years agoRemoved #include <iostream> and used llvm streams
Bill Wendling [Tue, 28 Nov 2006 22:47:12 +0000 (22:47 +0000)]
Removed #include <iostream> and used llvm streams

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

17 years agoRemoved some of the iostream #includes. Moved towards converting to using
Bill Wendling [Tue, 28 Nov 2006 22:46:12 +0000 (22:46 +0000)]
Removed some of the iostream #includes. Moved towards converting to using
llvm streams

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

17 years agoSupport for llvm streams.
Bill Wendling [Tue, 28 Nov 2006 22:45:17 +0000 (22:45 +0000)]
Support for llvm streams.

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