Commit Graph

22897 Commits

Author SHA1 Message Date
Chris Lattner
205065ae0c add a small and simple case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 05:17:43 +00:00
Evan Cheng
3032410f9b A couple of new entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26325 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 02:50:21 +00:00
Evan Cheng
a0ea0539e3 PIC related bug fixes.
1. Various asm printer bug.
2. Lowering bug. Now TargetGlobalAddress is wrapped in X86ISD::TGAWrapper.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26324 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 02:43:52 +00:00
Evan Cheng
224ec39cab X86 codegen tweak to use lea in another case:
Suppose base == %eax and it has multiple uses, then instead of
  movl %eax, %ecx
  addl $8, %ecx
use
  leal 8(%eax), %ecx.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 00:13:58 +00:00
Evan Cheng
4ba9cd53ba Add a test case for 'lea'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26322 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-23 00:12:12 +00:00
Evan Cheng
f1616dadad Missing .globl for weak / link-once .text symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:59:57 +00:00
Chris Lattner
f8bf116f80 Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which
caused SPASS to fail building last night.

We can't trivially unswitch a loop if the exit block has phi nodes in it,
because we don't know which predecessor to use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26320 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:55:00 +00:00
Chris Lattner
116ae7c067 new testcase distilled from SPASS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26319 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:54:15 +00:00
Chris Lattner
9b6fb5de49 This fixes a couple of problems with expansion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:09:03 +00:00
Chris Lattner
b3befd41b4 Don't return registers from register classes that aren't legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26317 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 23:00:51 +00:00
Chris Lattner
864635ad7b Change a whole bunch of code to be built around RegsForValue instead of
a single register number.  This fully implements promotion for inline asms,
expand is close but not quite right yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 22:37:12 +00:00
Evan Cheng
4c1aa86657 - Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 20:19:42 +00:00
Jim Laskey
0420f2aaf9 Coordinate activities with llvm-gcc4 and dwarf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 19:02:11 +00:00
Chris Lattner
410354fe0c Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Patch by Martin Partel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 16:23:43 +00:00
Chris Lattner
a2a51607a6 Turn on loop unswitching tonight
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 07:33:49 +00:00
Chris Lattner
bd28e3f8ef Add some comments, simplify some code, and fix a bug that caused rewriting
to rewrite with the wrong value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 06:37:14 +00:00
Evan Cheng
470a6adc78 Added MMX, SSE1, and SSE2 vector instructions and some simple patterns.
Fixed some existing bugs (wrong predicates, prefixes) at the same time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26310 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 02:26:30 +00:00
Chris Lattner
e7988aae94 reorder some libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:59:06 +00:00
Chris Lattner
1efa40f6a4 split register class handling from explicit physreg handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:56:39 +00:00
Chris Lattner
16d597a20d expose the set of values types holdable in a regclass to clients
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:51:58 +00:00
Chris Lattner
0f0b7d4927 Adjust to changes in getRegForInlineAsmConstraint prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26306 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:12:12 +00:00
Chris Lattner
4217ca8dc1 Updates to match change of getRegForInlineAsmConstraint prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26305 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:11:00 +00:00
Chris Lattner
aba3b13fb3 Pass in a value type to getRegForInlineAsmConstraint, allowing targets to
select different sets of registers depending on the type requested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26304 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 23:10:29 +00:00
Evan Cheng
4e4c71e423 One more round of reorg so sabre doesn't freak out. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 20:00:20 +00:00
Evan Cheng
beb07e117d A big more cleaning up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26302 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 19:30:30 +00:00
Evan Cheng
bf156d1ae6 Moving things to their proper places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26301 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 19:26:52 +00:00
Evan Cheng
ffcb95beab Split instruction info into multiple files, one for each of x87, MMX, and SSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26300 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 19:13:53 +00:00
Chris Lattner
a1532bc283 missed optzn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 18:29:44 +00:00
Chris Lattner
2deb87f201 The HasNoV9 hack isn't needed here, now that tblgen knows that CustomDAGSchedInserter
instructions are expensive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 18:04:32 +00:00
Evan Cheng
747a90d887 Added separate alias instructions for SSE logical ops that operate on non-packed types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26297 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 02:24:38 +00:00
Evan Cheng
7dbc0a3351 Added MMX and XMM packed integer move instructions, movd and movq.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26296 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 01:39:57 +00:00
Evan Cheng
933be3318b Added SSE2 128-bit integer packed types: V16I8, V8I16, V4I32, and V2I64.
Added generic vector types: VR64 and VR128.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26295 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-21 01:38:21 +00:00
Evan Cheng
aea20f50e5 Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 22:34:53 +00:00
Evan Cheng
755ee8f9aa Some updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26292 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 19:58:27 +00:00
Chris Lattner
7d20d39009 Fix a problem Nate and Duraid reported where simplifying nodes can cause
them to get ressurected, in which case, deleting the undead nodes is
unfriendly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26291 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 06:51:04 +00:00
Chris Lattner
dca7abed91 Fix a problem on itanium with memset. The value to set has been promoted to
i64 before this code, so zero_ext doesn't work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 06:38:35 +00:00
Chris Lattner
a6fc94b71e improved support for branch folding, still not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26289 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 07:57:38 +00:00
Evan Cheng
45af8fd8c2 If SSE3 is available, promote FP_TO_UINT i32 to FP_TO_SINT i64 to take
advantage of fisttpll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 07:26:17 +00:00
Jeff Cohen
bce4805d6f Fix bugs identified by VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 03:20:33 +00:00
Nate Begeman
003a272319 Add a fold for add that exchanges it with a constant shift if possible, so
that the shift may be more easily folded into other operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:43:25 +00:00
Chris Lattner
db41024a85 Implement deletion of dead blocks, currently disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26285 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:42:34 +00:00
Nate Begeman
b0d04a7dea Add checks to make sure we don't create bogus extend nodes, and fix a bug
where we were doing exactly that which was causing failures on x86 and
alpha.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26284 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:40:58 +00:00
Evan Cheng
2b15271571 Added fisttp for fp to int conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:36:28 +00:00
Evan Cheng
fbad70808c Bump up pattern cost if the resulting instruction is marked
usesCustomDAGSchedInserter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26282 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:33:09 +00:00
Evan Cheng
6428302f3d Disable PIC for JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 01:49:25 +00:00
Chris Lattner
caf4893536 a previous patch completely disabled trivial unswitching, this fixees it.
Thanks to nate for pointing this out :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26280 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 01:32:04 +00:00
Chris Lattner
f4412d890d initial trivial support for folding branches that have now-constant destinations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 01:27:45 +00:00
Evan Cheng
5e8b5558f7 Jit does not support PIC yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:57:10 +00:00
Chris Lattner
25cae0fd1c When unswitching a loop, make sure to update loop info with exit blocks in
the right loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:55:32 +00:00
Chris Lattner
299520de7c Fix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 00:33:17 +00:00