Commit Graph

5741 Commits

Author SHA1 Message Date
Rafael Espindola
1db6a2bac8 Add testcase from bug 2770.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55897 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 11:17:54 +00:00
Duncan Sands
34c8847b2d Update the callgraph correctly in ArgumentPromotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55895 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 11:07:35 +00:00
Evan Cheng
98d2d07d41 Correctly handle physical register inputs. They are not explicit input operands in the resulting machine instrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55893 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 08:39:33 +00:00
Evan Cheng
10a8d9c737 Handle x86 truncate to i8 with target hook for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55877 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-07 08:47:42 +00:00
Duncan Sands
fec2c2bf5e When PruneEH turned an invoke into an ordinary
call (thus changing the call site) it didn't
inform the callgraph about this.  But the
call site does matter - as shown by the testcase,
the callgraph become invalid after the inliner
ran (with an edge between two functions simply
missing), resulting in wrong deductions by
GlobalsModRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55872 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-06 17:19:29 +00:00
Eli Friedman
d0c0fae63b Fix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x
i32>.  This is a little messy, but it works.

We should really get rid of the intrinsics, though, since they map
perfectly well to standard LLVM instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55864 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 23:07:03 +00:00
Duncan Sands
f8e3541990 Prevent our own passes from promoting this to
readonly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55858 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 21:34:32 +00:00
Evan Cheng
7f132122c8 Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55849 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 20:04:37 +00:00
Evan Cheng
e2471a9169 If SSE2 is available, x86 should pass first 3 f32/f64 arguments in XMM registers for fastcc calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55840 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 17:24:07 +00:00
Evan Cheng
4a03775777 For whatever the reason, x86 CallingConv::Fast (i.e. fastcc) was not passing scalar arguments in registers. This patch defines a new fastcc CC which is slightly different from the FastCall CC. In addition to passing integer arguments in ECX and EDX, it also specify doubles are passed in 8-byte slots which are 8-byte aligned (instead of 4-byte aligned). This avoids a potential performance hazard where doubles span cacheline boundaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55807 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 22:59:58 +00:00
Dale Johannesen
fe89669b77 Adjust tests to expect new math intrinsics to be
emitted only when errno is not in use.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 21:24:28 +00:00
Dale Johannesen
928e865d95 Adjust libcalls tests to expect intrinsic for exp2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 18:44:20 +00:00
Owen Anderson
79924eb6f5 Fix the ordering of operands to the store (inverted relative to LLVM IR), and fix the testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 16:48:33 +00:00
Owen Anderson
a3971dfbfe Add a first attempt at implementing stores for X86 fast isel using target hooks.
Dan or Evan, please review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 07:08:58 +00:00
Evan Cheng
373d50af1d Load from GV stub should be locally CSE'd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 06:18:33 +00:00
Evan Cheng
c2feb5c262 Remove code that pad number of bytes to pop for X86_FastCall CC. The code doesn't do the "aligning" for Cygwin, Mingw, and Windows. But aligning it on Darwin and Linux breaks gcc compatibility. That ruled out all the platforms we support!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 01:04:15 +00:00
Duncan Sands
faf600a9ed Testcase for commits 55700 and 55714.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 19:38:41 +00:00
Devang Patel
6bd8aa8399 Update test to check call instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55702 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 17:05:49 +00:00
Duncan Sands
d0ac373660 Since onlyReadsMemory returns true if in fact
doesNotAccessMemory, check doesNotAccessMemory
first, since otherwise functions may be
marked readonly rather than readnone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 15:31:24 +00:00
Duncan Sands
9a036b945c Cleanup GlobalsModRef a bit. When analysing the
callgraph, when one member of a SCC calls another
then the analysis would drop to mod-ref because
there is (usually) no function info for the callee
yet; fix this.  Teach the analysis about function
attributes, in particular the readonly attribute
(which requires being careful about globals).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 12:55:42 +00:00
Duncan Sands
dced0a3f53 Testcase for PR1678.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 07:52:01 +00:00
Evan Cheng
8b19e56051 Add X86 target hook to implement load (even from GlobalAddress).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 06:44:39 +00:00
Nick Lewycky
83c05e5d30 Don't crash when trying to constant fold a vector with some elements that can't
be folded. Instead, fail to fold the entire vector.

We could also return a vector with some elements folded and some not. If anyone
thinks that's a better approach, please speak up!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55689 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 05:54:33 +00:00
Devang Patel
a9348dc7ac Check iteration count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55680 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 00:10:56 +00:00
Devang Patel
108f92e376 If all IV uses are extending integer IV then change the type of IV itself, if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55674 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 22:18:08 +00:00
Devang Patel
691e52445e respect inline=never and inline=always notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 22:16:13 +00:00
Devang Patel
7ad033c9e7 Read and write function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 21:47:13 +00:00
Dale Johannesen
09a2ffef0f New testcase for targets without 64-bit atomics;
xfail old test for ppc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55651 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 21:19:30 +00:00
Devang Patel
9018f569be Function notes tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55648 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 20:58:16 +00:00
Duncan Sands
14a093ac4c Turn this legalize types test on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-01 12:00:55 +00:00
Bill Wendling
9440e35b98 Revert the "XFAIL" for the rotate_ops.ll testcase. Instead, mark ISD::ROTR
instructions in CellSPU as "Expand" so that they won't be generated. I added a
"FIXME" so that this hack can be addressed and reverted once ISD::ROTR is
supported in the .td files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55582 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-31 02:59:23 +00:00
Bill Wendling
70fcb6bf58 CellSPU doesn't appear to support fully the "ISD::ROTR" operation. The DAG
combiner can now generate ROTR if the backend says that it can handle it. Cell
SPU says this, but gets an error from code gen saying that it can't select
ROTR. I'm xfailing this test until this can be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-31 02:32:12 +00:00
Gordon Henriksen
07cabf6102 PR2731: C and Ocaml bindings for setTailCall and isTailCall.
Based on patch by Giorgos Korfiatis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55570 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-30 16:34:54 +00:00
Evan Cheng
cd04708f59 Re-apply 55467 with fix. If copy is being replaced by remat'ed def, transfer the implicit defs onto the remat'ed instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55564 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-30 09:09:33 +00:00
Evan Cheng
eb9f89287e Transform (x << (y&31)) -> (x << y). This takes advantage of the fact x86 shift instructions 2nd operand (shift count) is limited to 0 to 31 (or 63 in the x86-64 case).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-30 02:03:58 +00:00
Dale Johannesen
c4db7276e0 Testcases for ppc atomics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55556 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-30 00:54:31 +00:00
Evan Cheng
456704476f Swap fp comparison operands and change predicate to allow load folding (safely this time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55553 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-29 23:22:12 +00:00
Evan Cheng
50ead9099d xfail this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55550 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-29 22:59:13 +00:00
Chris Lattner
33e4e610b5 allow this to pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55540 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-29 17:18:26 +00:00
Chris Lattner
6ac28095c2 Add support for parsing .ll files that have numbers in front of
nameless values, such as:

%3 = add i32 4, 2

This fixes the first half of PR2480



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-29 17:12:13 +00:00
Evan Cheng
4d46d0af58 Swap fp comparison operands and change predicate to allow load folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 23:48:31 +00:00
Mon P Wang
5ad0bf658a In lowering SELECT_CC, removed cases where we can't flip the true and false when the compare value has a NaN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55499 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 21:04:05 +00:00
Dan Gohman
a3f8b7a4ce Optimize DAGCombiner's worklist processing. Previously it started
its work by putting all nodes in the worklist, requiring a big
dynamic allocation. Now, DAGCombiner just iterates over the AllNodes
list and maintains a worklist for nodes that are newly created or
need to be revisited. This allows the worklist to stay small in most
cases, so it can be a SmallVector.

This has the side effect of making DAGCombine not miss a folding
opportunity in alloca-align-rounding.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55498 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 21:01:56 +00:00
Dan Gohman
f641395435 Revert r55467; it causes regressions in UnitTests/Vector/divides,
Benchmarks/sim/sim, and others on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55475 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 17:22:54 +00:00
Evan Cheng
9242cb8b82 If a copy isn't coalesced, but its src is defined by trivial computation. Re-materialize the src to replace the copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55467 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 07:53:51 +00:00
Dale Johannesen
f2c785edf0 This test crashes on non-x86 host; make SSE explicit.
Feel free to fix a better way!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55456 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-28 01:51:09 +00:00
Dan Gohman
39dfc2cb9c Diagnose uses of unsized types with the byval attribute in the
verifier. See PR2711 for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55414 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 14:48:06 +00:00
Dan Gohman
10df0fa73e Basic FastISel support for floating-point constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55401 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 01:09:54 +00:00
Devang Patel
a0b3909d43 If IV is used in a int-to-float cast inside the loop then try to eliminate the cast operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55374 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-26 17:57:54 +00:00
Chris Lattner
6ba50a9252 If an xmm register is referenced explicitly in an inline asm, make sure to
assign it to a version of the xmm register with the regclass that matches its
type.  This fixes PR2715, a bug handling some crazy xpcom case in mozilla.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55358 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-26 06:19:02 +00:00
Evan Cheng
ab6c3bb44d Try approach to moving call address load inside of callseq_start. Now it's done during the preprocess of x86 isel. callseq_start's chain is changed to load's chain node; while load's chain is the last of callseq_start or the loads or copytoreg nodes inserted to move arguments to the right spot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55338 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 21:27:18 +00:00
Owen Anderson
6d0c25ec3a Add support for fast isel of (integer) immediate materialization pattens, and use them to support
bitcast of constants in fast isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55325 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 20:20:32 +00:00
Dale Johannesen
8bb2ef4760 Adjust grep's for new code sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55320 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 18:53:58 +00:00
Evan Cheng
e7321441ac Fix asm printing of MOVSDto64mr and MOV64toSDrm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55300 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25 04:11:42 +00:00
Bill Wendling
3574c2d849 Fix this test. Don't null out the file, just XFAIL it until patch can be fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55296 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 21:48:46 +00:00
Bill Wendling
59b63e4a18 Temporarily reverting r55292. It's causing a bootstraping failure:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc ... src/libiberty/make-temp-file.c -o make-temp-file.o
Assertion failed: (Node2Index[SU->NodeNum] > Node2Index[I->Dep->NodeNum] && "Wrong topological sorting"), function InitDAGTopologicalSorting, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp, line 508.
../../../../llvm-gcc.src/libiberty/hashtab.c:955: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[4]: *** [hashtab.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [multi-do] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libiberty] Error 2
make: *** [all] Error 2



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55295 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 21:45:30 +00:00
Evan Cheng
32c727cd95 Move callseq_start above the call address load to allow load to be folded into the call node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55292 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24 19:19:55 +00:00
Anton Korobeynikov
8ff7ce3dd2 Testcase for 64bit maskmovq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55239 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 15:53:47 +00:00
Chris Lattner
259f88e3c9 Verify that the alignment argument to llvm.memcpy is a constant
integer, PR2318.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55228 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 05:31:10 +00:00
Chris Lattner
88e6dc8bf1 Fix PR2423 by checking all indices for out of range access, not only
indices that start with an array subscript.  x->field[10000] is just 
as bad as (*X)[14][10000].


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55226 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 05:21:06 +00:00
Dale Johannesen
169b5ed46e Test all currently supported atomic builtins on x86-{32,64}.
These just test that they go through the BE.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55208 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-22 22:39:21 +00:00
Dale Johannesen
7916fad6ef Comprehensive test of FE handling of __sync builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55206 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-22 21:47:03 +00:00
Dan Gohman
22bb31103d Factor out the predicate check code from DAGISelEmitter.cpp
and use it in FastISelEmitter.cpp, and make FastISel
subtarget aware. Among other things, this lets it work
properly on x86 targets that don't have SSE, where it
successfully selects x87 instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55156 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-22 00:20:26 +00:00
Bill Wendling
403483c200 Testcase for PR2585.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55151 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 23:04:49 +00:00
Dan Gohman
c67670b1ae Add -mattr=sse2 so this test doesn't fail on non-x86 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55145 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 22:34:25 +00:00
Dale Johannesen
e2122a5e2e Make x86 and sse2 explicit for non-x86 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55141 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 21:26:06 +00:00
Evan Cheng
1887c1c2f9 Fix a number of byval / memcpy / memset related codegen issues.
1. x86-64 byval alignment should be max of 8 and alignment of type. Previously the code was not doing what the commit message was saying.
2. Do not use byte repeat move and store operations. These are slow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55139 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 21:00:15 +00:00
Dan Gohman
5cc101ec89 getelementptr doesn't work on x86-64 yet, because it
has MOV64ri32 and no plain MOV64ri.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55126 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 17:28:42 +00:00
Dan Gohman
7a0e6593d0 MVT::getMVT uses iPTR for pointer types, while we need the actual
intptr_t type in this case. FastISel can now select simple
getelementptr instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55125 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 17:25:26 +00:00
Nick Lewycky
5d52c4501a Revert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%
slowdown in bzip2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 05:56:10 +00:00
Dan Gohman
d5fe57d2f9 Basic fast-isel support for instructions with constant int operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55099 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 01:41:07 +00:00
Dan Gohman
5c6aea9714 Add a -march line for this test, and run it on x86-64 too for fun.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55030 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:56:07 +00:00
Chris Lattner
80b7bc865a ll printer prints each zeroinit on the same line now, update regex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:33:57 +00:00
Dan Gohman
8014e86580 Add FastISel support for floating-point operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:23:20 +00:00
Dan Gohman
bdedd44773 Add FastISel support for several more binary operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55020 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:11:48 +00:00
Bill Wendling
108ecf3975 Add support for the __sync_sub_and_fetch atomics and friends for X86. The code
was already present, but not hooked up to anything.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55018 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 23:09:18 +00:00
Dan Gohman
d3aedf445c Fast-isel is now *minimally* functional. Add a testcase to
demonstrate the extent of its capabilities. Note that it
only attempts to operate on one of the blocks in this
testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55016 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 22:37:59 +00:00
Dale Johannesen
140be2dfb7 Add support for 8 and 16 bit forms of __sync
builtins on X86.

Change "lock" instructions to be on a separate line.
This is needed to work around a bug in the Darwin
assembler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 18:47:28 +00:00
Bill Wendling
2dcca3a6d8 XFAIL this test for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54929 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-18 18:29:54 +00:00
Nick Lewycky
91a0f78265 Consider the case where xor by -1 and xor by 128 have been combined already to
produce an xor by 127.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54906 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 19:58:24 +00:00
Evan Cheng
4e49c80289 Didn't mean to change this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54904 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 19:25:28 +00:00
Evan Cheng
0ac3fc2a61 Fix a (u)comiss intrinsic lowering bug. It was using anyext which can return junk in higher bits. Patch by Nate Begeman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54903 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 19:22:34 +00:00
Gordon Henriksen
5eca075b74 Rename some GC classes so that their roll will hopefully be clearer.
In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:

  Collector               -> GCStrategy
  CollectorMetadata       -> GCFunctionInfo
  CollectorModuleMetadata -> GCModuleInfo
  CollectorRegistry       -> GCRegistry
  Function::getCollector  -> getGC (setGC, hasGC, clearGC)

Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 18:44:35 +00:00
Nick Lewycky
1b344bc986 Xor'ing both sides of icmp by sign-bit is equivalent to swapping signedness of
the predicate.

Also, make this optz'n apply in more cases where it's safe to do so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54876 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 07:34:14 +00:00
Owen Anderson
7c856c09cd Remove GCSE and LoadVN from the testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54832 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-16 00:00:54 +00:00
Devang Patel
35115f92e4 Reapply 54786. Add overflow and number of mantissa bits checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54821 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-15 21:21:34 +00:00
Evan Cheng
21066541ae Revert 54786. It's not checking for overflows, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54813 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-15 08:12:11 +00:00
Bill Wendling
0d9deac485 Renaming LLVMC/dg.exp to LLVM/llvmc.exp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 23:37:58 +00:00
Devang Patel
488dc6732d The pass manager is not able to schedule -loop-deletion -loop-index-split.
The loop-deletion pass does not preserve dom frontier, which is required by
loop-index-split. When the PM checks dom frontier for loop-index-split, it has
already verified that lcssa is availalble. However, new dom frontier forces new
loop pass manager, which does not  have lcssa yet.

The PM should recheck availability of required analysis passes in such cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54805 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 23:07:48 +00:00
Devang Patel
79ceb4463e If IV is used in a int-to-float cast inside the loop then try to eliminate the cast opeation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 20:58:31 +00:00
Dan Gohman
7f8613e5b8 Improve support for vector casts in LLVM IR and CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 20:04:46 +00:00
Dan Gohman
a60832b018 Fix a bogus srem rule - a negative value srem'd by a power-of-2
can have a non-negative result; for example, -16%16 is 0. Also,
clarify the related comments. This fixes PR2670.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54767 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 23:12:35 +00:00
Dan Gohman
6ab6422f25 Allow SelectionDAG to create EXTRACT_VECTOR_ELT nodes with
non-constant indices. Only a few of the peephole checks require
a constant index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 21:51:37 +00:00
Dan Gohman
2edeb63ece Fix SCCP's handling of struct value loads and stores. SCCP doesn't
track individual leaf values in such cases, so it needs to treat
struct values as normal values in this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 21:22:48 +00:00
Duncan Sands
81b06be055 Teach constant folding that an inttoptr of a
ptrtoint can be turned into a bitcast if the
integer is at least as wide as a pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:20:35 +00:00
Devang Patel
d16aba22c9 Check sign to detect overflow before changing compare stride.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54710 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 02:05:14 +00:00
Dan Gohman
3837218ea0 Extend ScalarEvolution's executesAtLeastOnce logic to be able to
continue past the first conditional branch when looking for a
relevant test. This helps it avoid using MAX expressions in
loop trip counts in more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 20:17:31 +00:00
Chris Lattner
b8cd4d3d49 Implement support for simplifying vector comparisons by 0.0 and 1.0 like we
do for scalars.  Patch contributed by Nicolas Capens

This also generalizes the previous xforms to work on long double, now that 
isExactlyValue works for long double.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54653 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 22:06:05 +00:00
Dan Gohman
00f19b6542 Improve the grep commands for this test to be tolerant of ABI
differences, and to be more specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54648 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 20:10:41 +00:00
Dan Gohman
8cea8ff34c Take the FrameOffset into account when computing the alignment
of stack objects. This fixes PR2656.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 18:27:03 +00:00