oota-llvm.git
18 years agoA big more cleaning up.
Evan Cheng [Tue, 21 Feb 2006 19:30:30 +0000 (19:30 +0000)]
A big more cleaning up.

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

18 years agoMoving things to their proper places.
Evan Cheng [Tue, 21 Feb 2006 19:26:52 +0000 (19:26 +0000)]
Moving things to their proper places.

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

18 years agoSplit instruction info into multiple files, one for each of x87, MMX, and SSE.
Evan Cheng [Tue, 21 Feb 2006 19:13:53 +0000 (19:13 +0000)]
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

18 years agomissed optzn
Chris Lattner [Tue, 21 Feb 2006 18:29:44 +0000 (18:29 +0000)]
missed optzn

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

18 years agoThe HasNoV9 hack isn't needed here, now that tblgen knows that CustomDAGSchedInserter
Chris Lattner [Tue, 21 Feb 2006 18:04:32 +0000 (18:04 +0000)]
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

18 years agoAdded separate alias instructions for SSE logical ops that operate on non-packed...
Evan Cheng [Tue, 21 Feb 2006 02:24:38 +0000 (02:24 +0000)]
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

18 years agoAdded MMX and XMM packed integer move instructions, movd and movq.
Evan Cheng [Tue, 21 Feb 2006 01:39:57 +0000 (01:39 +0000)]
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

18 years agoAdded SSE2 128-bit integer packed types: V16I8, V8I16, V4I32, and V2I64.
Evan Cheng [Tue, 21 Feb 2006 01:38:21 +0000 (01:38 +0000)]
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

18 years agoAdded x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
Evan Cheng [Mon, 20 Feb 2006 22:34:53 +0000 (22:34 +0000)]
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

18 years agoSome updates
Evan Cheng [Mon, 20 Feb 2006 19:58:27 +0000 (19:58 +0000)]
Some updates

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

18 years agoFix a problem Nate and Duraid reported where simplifying nodes can cause
Chris Lattner [Mon, 20 Feb 2006 06:51:04 +0000 (06:51 +0000)]
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

18 years agoFix a problem on itanium with memset. The value to set has been promoted to
Chris Lattner [Mon, 20 Feb 2006 06:38:35 +0000 (06:38 +0000)]
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

18 years agoimproved support for branch folding, still not enabled.
Chris Lattner [Sat, 18 Feb 2006 07:57:38 +0000 (07:57 +0000)]
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

18 years agoIf SSE3 is available, promote FP_TO_UINT i32 to FP_TO_SINT i64 to take
Evan Cheng [Sat, 18 Feb 2006 07:26:17 +0000 (07:26 +0000)]
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

18 years agoFix bugs identified by VC++.
Jeff Cohen [Sat, 18 Feb 2006 03:20:33 +0000 (03:20 +0000)]
Fix bugs identified by VC++.

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

18 years agoAdd a fold for add that exchanges it with a constant shift if possible, so
Nate Begeman [Sat, 18 Feb 2006 02:43:25 +0000 (02:43 +0000)]
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

18 years agoImplement deletion of dead blocks, currently disabled.
Chris Lattner [Sat, 18 Feb 2006 02:42:34 +0000 (02:42 +0000)]
Implement deletion of dead blocks, currently disabled.

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

18 years agoAdd checks to make sure we don't create bogus extend nodes, and fix a bug
Nate Begeman [Sat, 18 Feb 2006 02:40:58 +0000 (02:40 +0000)]
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

18 years agoAdded fisttp for fp to int conversion.
Evan Cheng [Sat, 18 Feb 2006 02:36:28 +0000 (02:36 +0000)]
Added fisttp for fp to int conversion.

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

18 years agoBump up pattern cost if the resulting instruction is marked
Evan Cheng [Sat, 18 Feb 2006 02:33:09 +0000 (02:33 +0000)]
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

18 years agoDisable PIC for JIT.
Evan Cheng [Sat, 18 Feb 2006 01:49:25 +0000 (01:49 +0000)]
Disable PIC for JIT.

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

18 years agoa previous patch completely disabled trivial unswitching, this fixees it.
Chris Lattner [Sat, 18 Feb 2006 01:32:04 +0000 (01:32 +0000)]
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

18 years agoinitial trivial support for folding branches that have now-constant destinations.
Chris Lattner [Sat, 18 Feb 2006 01:27:45 +0000 (01:27 +0000)]
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

18 years agoJit does not support PIC yet.
Evan Cheng [Sat, 18 Feb 2006 00:57:10 +0000 (00:57 +0000)]
Jit does not support PIC yet.

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

18 years agoWhen unswitching a loop, make sure to update loop info with exit blocks in
Chris Lattner [Sat, 18 Feb 2006 00:55:32 +0000 (00:55 +0000)]
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

18 years agoFix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
Chris Lattner [Sat, 18 Feb 2006 00:33:17 +0000 (00:33 +0000)]
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

18 years agonew testcase that crashes simplifycfg
Chris Lattner [Sat, 18 Feb 2006 00:32:44 +0000 (00:32 +0000)]
new testcase that crashes simplifycfg

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

18 years agox86 / Darwin PIC support.
Evan Cheng [Sat, 18 Feb 2006 00:15:05 +0000 (00:15 +0000)]
x86 / Darwin PIC support.

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

18 years agoMoved PICEnabled to include/llvm/Target/TargetOptions.h
Evan Cheng [Sat, 18 Feb 2006 00:08:58 +0000 (00:08 +0000)]
Moved PICEnabled to include/llvm/Target/TargetOptions.h

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

18 years agoMove PICEnabled declaration here.
Evan Cheng [Sat, 18 Feb 2006 00:06:03 +0000 (00:06 +0000)]
Move PICEnabled declaration here.

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

18 years agoFix a tricky issue in the SimplifyDemandedBits code where CombineTo wasn't
Chris Lattner [Fri, 17 Feb 2006 21:58:01 +0000 (21:58 +0000)]
Fix a tricky issue in the SimplifyDemandedBits code where CombineTo wasn't
exactly the API we wanted to call into.  This fixes the crash on crafty last
night.

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

18 years agoadd a new method
Chris Lattner [Fri, 17 Feb 2006 21:57:00 +0000 (21:57 +0000)]
add a new method

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

18 years agoA few final (for now) tests
Nate Begeman [Fri, 17 Feb 2006 21:38:45 +0000 (21:38 +0000)]
A few final (for now) tests

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

18 years agoYet another test
Nate Begeman [Fri, 17 Feb 2006 21:32:46 +0000 (21:32 +0000)]
Yet another test

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

18 years agoNew tests!
Nate Begeman [Fri, 17 Feb 2006 21:22:08 +0000 (21:22 +0000)]
New tests!

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

18 years agoAdded documentation for vset and vselect.
Robert Bocchino [Fri, 17 Feb 2006 21:18:08 +0000 (21:18 +0000)]
Added documentation for vset and vselect.

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

18 years agoClean up DemandedBitsAreZero interface
Nate Begeman [Fri, 17 Feb 2006 19:54:08 +0000 (19:54 +0000)]
Clean up DemandedBitsAreZero interface
Make more use of the new mask helpers in valuetypes.h
Combine (sra (srl x, c1), c1) -> sext_inreg if legal

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

18 years agoFix a nit sabre noticed
Nate Begeman [Fri, 17 Feb 2006 18:06:19 +0000 (18:06 +0000)]
Fix a nit sabre noticed

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

18 years agoDon't expand sdiv by power of two before legalize, since it will likely
Nate Begeman [Fri, 17 Feb 2006 07:26:20 +0000 (07:26 +0000)]
Don't expand sdiv by power of two before legalize, since it will likely
generate illegal nodes.

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

18 years agounbreak the build
Chris Lattner [Fri, 17 Feb 2006 07:09:27 +0000 (07:09 +0000)]
unbreak the build

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

18 years agoUnbreak x86 be
Evan Cheng [Fri, 17 Feb 2006 07:01:52 +0000 (07:01 +0000)]
Unbreak x86 be

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

18 years agoFix loops where the header has an exit, fixing a loop-unswitch crash on crafty
Chris Lattner [Fri, 17 Feb 2006 06:39:56 +0000 (06:39 +0000)]
Fix loops where the header has an exit, fixing a loop-unswitch crash on crafty

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

18 years agoFix a comment sabre noticed :)
Nate Begeman [Fri, 17 Feb 2006 06:24:31 +0000 (06:24 +0000)]
Fix a comment sabre noticed :)

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

18 years agoA couple new regression tests to make sure we always pattern match the new
Nate Begeman [Fri, 17 Feb 2006 06:16:56 +0000 (06:16 +0000)]
A couple new regression tests to make sure we always pattern match the new
opcodes on ppc.

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

18 years agokill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC
Nate Begeman [Fri, 17 Feb 2006 05:43:56 +0000 (05:43 +0000)]
kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC
and SUBE nodes that actually expose what's going on and allow for
significant simplifications in the targets.

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

18 years agoFix another miscompilation exposed by lencode, where we lowered i64->f32
Chris Lattner [Fri, 17 Feb 2006 04:32:33 +0000 (04:32 +0000)]
Fix another miscompilation exposed by lencode, where we lowered i64->f32
conversions to __floatdidf instead of __floatdisf on targets that support
f32 but not i64 (e.g. sparc).

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

18 years agoadd note about div by power of 2
Chris Lattner [Fri, 17 Feb 2006 04:20:13 +0000 (04:20 +0000)]
add note about div by power of 2

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

18 years agoFix bug noticed by VC++.
Jeff Cohen [Fri, 17 Feb 2006 02:12:18 +0000 (02:12 +0000)]
Fix bug noticed by VC++.

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

18 years agoInform Visual Studio of deleted file.
Jeff Cohen [Fri, 17 Feb 2006 02:11:34 +0000 (02:11 +0000)]
Inform Visual Studio of deleted file.

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

18 years agoWhoops, didn't mean to check this in yet.
Nate Begeman [Fri, 17 Feb 2006 00:56:19 +0000 (00:56 +0000)]
Whoops, didn't mean to check this in yet.

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

18 years agoAdd a missing and useful pat frag
Nate Begeman [Fri, 17 Feb 2006 00:51:06 +0000 (00:51 +0000)]
Add a missing and useful pat frag

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

18 years agostart of some new simplification code, not thoroughly tested, use at your own
Chris Lattner [Fri, 17 Feb 2006 00:31:07 +0000 (00:31 +0000)]
start of some new simplification code, not thoroughly tested, use at your own
risk :)

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

18 years agoRemind ourselves to revisit the "pxor vs. xorps/xorpd to clear XMM registers"
Evan Cheng [Fri, 17 Feb 2006 00:04:28 +0000 (00:04 +0000)]
Remind ourselves to revisit the "pxor vs. xorps/xorpd to clear XMM registers"
issue. Need to do more experiments.

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

18 years agoKill the x86 pattern isel. boom.
Nate Begeman [Fri, 17 Feb 2006 00:03:04 +0000 (00:03 +0000)]
Kill the x86 pattern isel.  boom.

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

18 years agoRemove the entry about using movapd for SSE reg-reg moves.
Evan Cheng [Fri, 17 Feb 2006 00:00:58 +0000 (00:00 +0000)]
Remove the entry about using movapd for SSE reg-reg moves.

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

18 years agopxor (for FLD0SS) encoding was missing the OpSize prefix.
Evan Cheng [Thu, 16 Feb 2006 23:59:30 +0000 (23:59 +0000)]
pxor (for FLD0SS) encoding was missing the OpSize prefix.

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

18 years agoRemove the skeleton target, it doesn't produce useful code and there are
Chris Lattner [Thu, 16 Feb 2006 23:14:50 +0000 (23:14 +0000)]
Remove the skeleton target, it doesn't produce useful code and there are
other small targets that do that can be learned from.  They also have
the added advantage of being tested :)

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

18 years agoDumb bug. Code sees a memcpy from X+c so it increments src offset. But it
Evan Cheng [Thu, 16 Feb 2006 23:11:42 +0000 (23:11 +0000)]
Dumb bug. Code sees a memcpy from X+c so it increments src offset. But it
turns out not to point to a constant string but it forgot change the offset
back.

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

18 years ago1. Use pxor instead of xoraps / xorapd to clear FR32 / FR64 registers. This
Evan Cheng [Thu, 16 Feb 2006 22:45:17 +0000 (22:45 +0000)]
1. Use pxor instead of xoraps / xorapd to clear FR32 / FR64 registers. This
   proves to be worth 20% on Ptrdist/ks. Might be related to dependency
   breaking support.
2. Added FsMOVAPSrr and FsMOVAPDrr as aliases to MOVAPSrr and MOVAPDrr. These
   are used for FR32 / FR64 reg-to-reg copies.
3. Tell reg-allocator to generate MOVSSrm / MOVSDrm and MOVSSmr / MOVSDmr to
   spill / restore FsMOVAPSrr and FsMOVAPDrr.

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

18 years agoUse movaps / movapd to spill / restore V4F4 / V2F8 registers.
Evan Cheng [Thu, 16 Feb 2006 21:20:26 +0000 (21:20 +0000)]
Use movaps / movapd to spill / restore V4F4 / V2F8 registers.

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

18 years agoremove skeleton target
Chris Lattner [Thu, 16 Feb 2006 21:12:54 +0000 (21:12 +0000)]
remove skeleton target

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

18 years agoRework the SelectionDAG-based implementations of SimplifyDemandedBits
Nate Begeman [Thu, 16 Feb 2006 21:11:51 +0000 (21:11 +0000)]
Rework the SelectionDAG-based implementations of SimplifyDemandedBits
and ComputeMaskedBits to match the new improved versions in instcombine.
Tested against all of multisource/benchmarks on ppc.

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

18 years agodon't build the skeleton target
Chris Lattner [Thu, 16 Feb 2006 21:11:49 +0000 (21:11 +0000)]
don't build the skeleton target

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

18 years agoremove support for the skeleton target
Chris Lattner [Thu, 16 Feb 2006 21:10:57 +0000 (21:10 +0000)]
remove support for the skeleton target

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

18 years agoChange SplitBlock to increment a BasicBlock::iterator, not an Instruction*. Apparent...
Chris Lattner [Thu, 16 Feb 2006 19:36:22 +0000 (19:36 +0000)]
Change SplitBlock to increment a BasicBlock::iterator, not an Instruction*.  Apparently they do different things :)

This fixes a testcase that nate reduced from spass.

Also included are a couple minor code changes that don't affect the generated
code at all.

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

18 years agoMOVAPSrr and MOVAPDrr instruction format should be MRMSrcReg.
Evan Cheng [Thu, 16 Feb 2006 19:34:41 +0000 (19:34 +0000)]
MOVAPSrr and MOVAPDrr instruction format should be MRMSrcReg.

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

18 years agodistinguish between objects and register names, now we can have stuff
Duraid Madina [Thu, 16 Feb 2006 13:12:57 +0000 (13:12 +0000)]
distinguish between objects and register names, now we can have stuff
with names like "f84", "in6" etc etc.

this should fix one or two tests

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

18 years agoIf the false case is the current basic block, then this is a self loop.
Evan Cheng [Thu, 16 Feb 2006 08:27:56 +0000 (08:27 +0000)]
If the false case is the current basic block, then this is a self loop.
We do not want to emit "Loop: ... brcond Out; br Loop", as it adds an extra
instruction in the loop.  Instead, invert the condition and emit
"Loop: ... br!cond Loop; br Out.

Generalize the fix by moving it from PPCDAGToDAGISel to SelectionDAGLowering.

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

18 years agoLowering of sdiv X, pow2 was broken, this fixes it. This patch is written
Chris Lattner [Thu, 16 Feb 2006 08:02:36 +0000 (08:02 +0000)]
Lowering of sdiv X, pow2 was broken, this fixes it.  This patch is written
by Nate, I'm just committing it for him.

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

18 years agoFix a minor makefile bug with lex/yacc handling that nate noticed. We don't
Chris Lattner [Thu, 16 Feb 2006 05:10:48 +0000 (05:10 +0000)]
Fix a minor makefile bug with lex/yacc handling that nate noticed.  We don't
want to copy the files when the .cpp file changes, we want to copy them
to the .cvs versions when the .l/.y file change (like the comments even say).
This avoids having bogus changes show up in diffs.

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

18 years agoFix VC++ warning.
Jeff Cohen [Thu, 16 Feb 2006 04:07:37 +0000 (04:07 +0000)]
Fix VC++ warning.

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

18 years agoVisual Studio enters the future of bisoning.
Jeff Cohen [Thu, 16 Feb 2006 04:07:03 +0000 (04:07 +0000)]
Visual Studio enters the future of bisoning.

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

18 years agoUse movaps / movapd (instead of movss / movsd) to do FR32 / FR64 reg to reg
Evan Cheng [Thu, 16 Feb 2006 01:50:02 +0000 (01:50 +0000)]
Use movaps / movapd (instead of movss / movsd) to do FR32 / FR64 reg to reg
transfer.

According to the Intel P4 Optimization Manual:

Moves that write a portion of a register can introduce unwanted
dependences. The movsd reg, reg instruction writes only the bottom
64 bits of a register, not to all 128 bits. This introduces a dependence on
the preceding instruction that produces the upper 64 bits (even if those
bits are not longer wanted). The dependence inhibits register renaming,
and thereby reduces parallelism.

Not to mention movaps is shorter than movss.

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

18 years agofix a bug where we unswitched the wrong way
Chris Lattner [Thu, 16 Feb 2006 01:24:41 +0000 (01:24 +0000)]
fix a bug where we unswitched the wrong way

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

18 years agoA bit more memset / memcpy optimization.
Evan Cheng [Thu, 16 Feb 2006 00:21:07 +0000 (00:21 +0000)]
A bit more memset / memcpy optimization.
Turns them into calls to memset / memcpy if 1) buffer(s) are not DWORD aligned,
2) size is not known to be greater or equal to some minimum value (currently 128).

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

18 years agoImplement trivial unswitching for switch stmts. This allows us to trivial
Chris Lattner [Wed, 15 Feb 2006 22:52:05 +0000 (22:52 +0000)]
Implement trivial unswitching for switch stmts.  This allows us to trivial
unswitch this loop on 2 before sweating to unswitch on 1/3.

void test4(int N, int i, int C, int*P, int*Q) {
  int j;
  for (j = 0; j < N; ++j) {
    switch (C) {                // general unswitching.
    default: P[i+j] = 0; break;
    case 1: Q[i+j] = 0; break;
    case 3: P[i+j] = Q[i+j]; break;
    case 2: break;              //  TRIVIAL UNSWITCH on C==2
    }
  }
}

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

18 years agoRemove an entry.
Evan Cheng [Wed, 15 Feb 2006 22:14:34 +0000 (22:14 +0000)]
Remove an entry.

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

18 years agoRemove an unused function parameter.
Evan Cheng [Wed, 15 Feb 2006 22:12:35 +0000 (22:12 +0000)]
Remove an unused function parameter.

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

18 years agomake "trivial" unswitching significantly more general. It can now handle
Chris Lattner [Wed, 15 Feb 2006 22:03:36 +0000 (22:03 +0000)]
make "trivial" unswitching significantly more general.  It can now handle
this for example:

  for (j = 0; j < N; ++j) {     // trivial unswitch
    if (C)
      P[i+j] = 0;
  }

turning it into the obvious code without bothering to duplicate an empty loop.

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

18 years agoTurn a memcpy from string constant into a series of stores of constant values.
Evan Cheng [Wed, 15 Feb 2006 21:59:04 +0000 (21:59 +0000)]
Turn a memcpy from string constant into a series of stores of constant values.

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

18 years agofix a bunch of alpha regressions. see bug 709
Andrew Lenharth [Wed, 15 Feb 2006 21:13:37 +0000 (21:13 +0000)]
fix a bunch of alpha regressions.  see bug 709

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

18 years agonew test
Chris Lattner [Wed, 15 Feb 2006 19:52:06 +0000 (19:52 +0000)]
new test

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

18 years agoShould not combine ISD::LOCATIONs until we have scheme to remove from
Jim Laskey [Wed, 15 Feb 2006 19:34:44 +0000 (19:34 +0000)]
Should not combine ISD::LOCATIONs until we have scheme to remove from
MachineDebugInfo tables.

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

18 years agoChecking the wrong value. This caused us to emit silly code like
Chris Lattner [Wed, 15 Feb 2006 19:05:52 +0000 (19:05 +0000)]
Checking the wrong value.  This caused us to emit silly code like
Y = seteq bool X, true
instead of just using X :)

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

18 years agoCode sufficiently protected against this test.
Jim Laskey [Wed, 15 Feb 2006 17:20:59 +0000 (17:20 +0000)]
Code sufficiently protected against this test.

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

18 years agoreverting previous change, will add support for other compilers later
Duraid Madina [Wed, 15 Feb 2006 07:57:42 +0000 (07:57 +0000)]
reverting previous change, will add support for other compilers later

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

18 years agoConvert over to the new way of handling lex/bison checked into cvs
Chris Lattner [Wed, 15 Feb 2006 07:26:07 +0000 (07:26 +0000)]
Convert over to the new way of handling lex/bison checked into cvs

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

18 years agoCheck the new form for bison output into CVS
Chris Lattner [Wed, 15 Feb 2006 07:24:01 +0000 (07:24 +0000)]
Check the new form for bison output into CVS

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

18 years agobugfixes
Chris Lattner [Wed, 15 Feb 2006 07:23:05 +0000 (07:23 +0000)]
bugfixes

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

18 years agoConvert this over to work with the new makefiles
Chris Lattner [Wed, 15 Feb 2006 07:22:58 +0000 (07:22 +0000)]
Convert this over to work with the new makefiles

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

18 years agoConvert the bison-output-checked-into-cvs makefile handling stuff to work
Chris Lattner [Wed, 15 Feb 2006 07:16:57 +0000 (07:16 +0000)]
Convert the bison-output-checked-into-cvs makefile handling stuff to work
like the flex stuff, which actually works when people do cvs updates and
get conflicts in the updated checked in file.

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

18 years agoSparc actually *DOES* have a directive for emitting zeros. In fact, it requires
Chris Lattner [Wed, 15 Feb 2006 07:07:14 +0000 (07:07 +0000)]
Sparc actually *DOES* have a directive for emitting zeros.  In fact, it requires
it, because this:

.bss
X:
.byte 0

results in the assembler warning: "initialization in bss segment".  Annoying.

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

18 years agorandom lexer change to test the makefile updating stuff
Chris Lattner [Wed, 15 Feb 2006 07:02:59 +0000 (07:02 +0000)]
random lexer change to test the makefile updating stuff

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

18 years agoFix SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c on Sparc.
Chris Lattner [Wed, 15 Feb 2006 06:41:34 +0000 (06:41 +0000)]
Fix SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c on Sparc.

The ABI specifies that there is a register save area at the bottom of the
stack, which means the actual used pointer needs to be an offset from
the subtracted value.

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

18 years agoHP aCC (and a bunch of other compilers, no doubt) don't share
Duraid Madina [Wed, 15 Feb 2006 03:23:26 +0000 (03:23 +0000)]
HP aCC (and a bunch of other compilers, no doubt) don't share
GCC's syntax for auto-dependency generation stuff. This should
be changed to be disabling dependency stuff unless GCC/ICC is
found.

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

18 years agooops, I meant this
Duraid Madina [Wed, 15 Feb 2006 03:20:16 +0000 (03:20 +0000)]
oops, I meant this

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

18 years agozap
Duraid Madina [Wed, 15 Feb 2006 03:16:52 +0000 (03:16 +0000)]
zap

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

18 years agopreviously, configure would die if GCC or ICC was not found. Now it'll
Duraid Madina [Wed, 15 Feb 2006 03:15:55 +0000 (03:15 +0000)]
previously, configure would die if GCC or ICC was not found. Now it'll
go through, but we do want to know if we're using GCC/ICC since they
share certain funky command line options (for dependency generation
stuff)

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

18 years agoRemove an entry.
Evan Cheng [Wed, 15 Feb 2006 01:56:48 +0000 (01:56 +0000)]
Remove an entry.

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

18 years agoUse .zerofill on x86/darwin.
Evan Cheng [Wed, 15 Feb 2006 01:56:23 +0000 (01:56 +0000)]
Use .zerofill on x86/darwin.

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