Commit Graph

6294 Commits

Author SHA1 Message Date
Bill Wendling 6cf1f8fd5b Now with RUN line.
llvm-svn: 62716
2009-01-21 21:28:03 +00:00
Bill Wendling ba11cd338b Run this through -simplifycfg and -mem2reg to test only what we need to test.
llvm-svn: 62714
2009-01-21 21:02:27 +00:00
Dale Johannesen 1f86498f93 Do not use host floating point types when emitting
ASCII IR; loading and storing these can change the
bits of NaNs on some hosts.  Remove or add warnings
at a few other places using host floating point;
this is a bad thing to do in general.

llvm-svn: 62712
2009-01-21 20:32:55 +00:00
Dan Gohman 7e6b932f18 Simplify ReduceLoadWidth's logic: it doesn't need several different
special cases after producing the new reduced-width load, because the
new load already has the needed adjustments built into it. This fixes
several bugs due to the special cases, including PR3317.

llvm-svn: 62692
2009-01-21 15:17:51 +00:00
Dan Gohman b43c8996f2 Fix a recent regression. ClrOpcode is not set for i8; for i8, if
we want to clear %ah to zero before a division, just use a
zero-extending mov to %al. This fixes PR3366.

llvm-svn: 62691
2009-01-21 14:50:16 +00:00
Mikhail Glushenkov bf9716e15d Allow hooks with arguments.
llvm-svn: 62685
2009-01-21 13:04:00 +00:00
Duncan Sands d56cf3025f This was causing invalid memory accesses when
generating debug info in the compiler.

llvm-svn: 62684
2009-01-21 11:51:17 +00:00
Duncan Sands 1de451d0d0 Let's try to have our cake and eat it to: move
this test into FrontendC to ensure that llvm-gcc
is available; assemble using "llvm-gcc -xassembler"
rather than "as".

llvm-svn: 62683
2009-01-21 11:37:31 +00:00
Duncan Sands 696f4a8598 Don't rely on grep -w working.
llvm-svn: 62682
2009-01-21 09:41:42 +00:00
Scott Michel ed7d79fce4 CellSPU:
- Ensure that (operation) legalization emits proper FDIV libcall when needed.
- Fix various bugs encountered during llvm-spu-gcc build, along with various
  cleanups.
- Start supporting double precision comparisons for remaining libgcc2 build.
  Discovered interesting DAGCombiner feature, which is currently solved via
  custom lowering (64-bit constants are not legal on CellSPU, but DAGCombiner
  insists on inserting one anyway.)
- Update README.

llvm-svn: 62664
2009-01-21 04:58:48 +00:00
Evan Cheng 201501995f Favors generating "not" over "xor -1". For example.
unsigned test(unsigned a) {
  return ~a;
}
llvm used to generate:
movl    $4294967295, %eax
xorl    4(%esp), %eax

Now it generates:
movl      4(%esp), %eax
notl      %eax

It's 3 bytes shorter.

llvm-svn: 62661
2009-01-21 02:09:05 +00:00
Dale Johannesen 287b4bc44e Disable on x86_64 until I figure out what's wrong.
llvm-svn: 62660
2009-01-21 02:08:30 +00:00
Dale Johannesen b5721632ee Make special cases (0 inf nan) work for frem.
Besides APFloat, this involved removing code
from two places that thought they knew the
result of frem(0., x) but were wrong.

llvm-svn: 62645
2009-01-21 00:35:19 +00:00
Owen Anderson be7a29de0b Be more aggressive about renumbering vregs after splitting them.
llvm-svn: 62639
2009-01-21 00:13:28 +00:00
Devang Patel 6bbacbe372 Appropriately mark fowrad decls.
llvm-svn: 62625
2009-01-20 22:27:02 +00:00
Devang Patel 6fbec1c230 Need compile unit to find location.
llvm-svn: 62624
2009-01-20 22:26:11 +00:00
Dale Johannesen e75fdb0510 Calls to fmod, it turns out, are constant-folded by
invoking the host fmod, not by lowering to frem and
constant-folding that.  Fix this so it tests what I
want to test.

llvm-svn: 62622
2009-01-20 21:58:13 +00:00
Chris Lattner f8a8c13c1e Don't bother running the assembler, we don't know that it will be configured
for whatever llc defaults to.  This fixes PR3363

llvm-svn: 62619
2009-01-20 21:41:53 +00:00
Evan Cheng f1e873a221 Fix PR3243: a LiveVariables bug. When HandlePhysRegKill is checking whether the last reference is also the last def (i.e. dead def), it should also check if last reference is the current machine instruction being processed. This can happen when it is processing a physical register use and setting the current machine instruction as sub-register's last ref.
llvm-svn: 62617
2009-01-20 21:25:12 +00:00
Evan Cheng 4022b7c3f4 Add test case for PR3154.
llvm-svn: 62604
2009-01-20 19:29:54 +00:00
Duncan Sands 489c5484d3 Check that the "don't barf on k8" fix is not
accidentally reverted again.

llvm-svn: 62587
2009-01-20 18:08:39 +00:00
Bill Wendling a908b60fb2 Temporarily XFAIL until this can be looked at. r62557 is what caused it to start failing.
llvm-svn: 62578
2009-01-20 10:28:39 +00:00
Bill Wendling 1d9c8e5522 Testcase for limited precision stuff.
llvm-svn: 62572
2009-01-20 06:23:59 +00:00
Chris Lattner c59945b4bd another fix for PR3354
llvm-svn: 62561
2009-01-20 01:15:41 +00:00
Dan Gohman 161b7b66ac Fix a dagcombine to not generate loads of non-round integer types,
as its comment says, even in the case where it will be generating
extending loads. This fixes PR3216.

llvm-svn: 62557
2009-01-20 01:06:45 +00:00
Evan Cheng 8f79775a66 Make linear scan's trivial coalescer slightly more aggressive.
llvm-svn: 62547
2009-01-20 00:16:18 +00:00
Chris Lattner ea9f1d3c47 Fix a problem exposed by PR3354: simplifycfg was making a potentially
trapping instruction be executed unconditionally.

llvm-svn: 62541
2009-01-19 23:03:13 +00:00
Dale Johannesen d067ecd1c7 Move & restructure test per review.
llvm-svn: 62538
2009-01-19 22:33:12 +00:00
Chris Lattner 7eeb1cc605 convert this to an unfoldable potentially trapping constant expr.
llvm-svn: 62536
2009-01-19 22:12:33 +00:00
Dan Gohman cd0b1bf0a0 Fix SelectionDAG::ReplaceAllUsesWith to behave correctly when
uses are added to the From node while it is processing From's
use list, because of automatic local CSE. The fix is to avoid
visiting any new uses.

Fix a few places in the DAGCombiner that assumed that after
a RAUW call, the From node has no users and may be deleted.

This fixes PR3018.

llvm-svn: 62533
2009-01-19 21:44:21 +00:00
Chris Lattner 6f34e317e9 Fix PR3353, infinitely jump threading an infinite loop make from switches.
llvm-svn: 62529
2009-01-19 21:20:34 +00:00
Dale Johannesen 740e98704d compile-time fmod was done incorrectly. PR 3316.
llvm-svn: 62528
2009-01-19 21:17:05 +00:00
Devang Patel 8c8aa2ac29 Verify Intrinsic::dbg_declare.
llvm-svn: 62526
2009-01-19 21:00:48 +00:00
Evan Cheng 44cc554311 DIVREM isel deficiency: If sign bit is known zero, zero out DX/EDX/RDX instead of sign extending the low part (in AX/EAX/RAX) into it.
llvm-svn: 62519
2009-01-19 19:06:11 +00:00
Nick Lewycky ee22611e33 Port this test from dejagnu to unit testing.
The way this worked before was to test APInt by running
"lli -force-interpreter=true" knowing the lli uses APInt under the hood to
store its values. Now, we test APInt directly.

llvm-svn: 62514
2009-01-19 18:08:33 +00:00
Bill Wendling 534d2e0bae Temporarily revert r62487. It's causing this error during a release bootstrap of
llvm-gcc. Most likely, it's miscompiling one of the "gen*" programs:

/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/bin/ -c -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -mdynamic-no-pic -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/build -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -o build/gencondmd.o build/gencondmd.c
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: excess elements in struct initializer
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: (near initialization for 'insn_conditions[4]')
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected ',' or ';' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:927: error: expected identifier or '(' before ',' token
../../llvm-gcc.src/gcc/config/i386/sse.md:3458: error: expected identifier or '(' before ',' token
...

llvm-svn: 62506
2009-01-19 08:46:20 +00:00
Evan Cheng 7e9ef4d776 Now not UINT_TO_FP is legal (it's marked custom), dag combiner won't
optimize it to a SINT_TO_FP when the sign bit is known zero. X86 isel should perform the optimization itself.

llvm-svn: 62504
2009-01-19 08:08:22 +00:00
Chris Lattner f2bb4ea39c Fix PR3016, a bug which can occur do to an invalid assumption:
we assumed a CFG structure that would be valid when all code in 
the function is reachable, but not all code is necessarily 
reachable.  Do a simple, but horrible, CFG walk to check for this
case.

llvm-svn: 62487
2009-01-19 02:46:28 +00:00
Chris Lattner 64b7bd7f9e Fix rdar://6505632, an llc crash on 483.xalancbmk
llvm-svn: 62470
2009-01-18 20:35:00 +00:00
Nick Lewycky e5be1cd635 Forgot this in the previous checkin: fopen now has nocapture, realloc is
supposed to take two arguments.

llvm-svn: 62457
2009-01-18 04:46:10 +00:00
Bill Wendling 9880a2cb2f Testcase for last commit.
llvm-svn: 62418
2009-01-17 07:42:44 +00:00
Evan Cheng bf38a5e540 Fix MatchAddress bug that's preventing negative displacement from being folded in 64-bit mode.
llvm-svn: 62413
2009-01-17 07:09:27 +00:00
Mon P Wang ca6d6dea0b Simplify extract element of a scalar to vector.
llvm-svn: 62383
2009-01-17 00:07:25 +00:00
Evan Cheng 41e9f6a854 Fix PPC ISD::Declare isel and eliminate the need for PPCTargetLowering::LowerGlobalAddress to check if isVerifiedDebugInfoDesc() is true. Given the recent changes, it would falsely return true for a lot of GlobalAddressSDNode's.
llvm-svn: 62373
2009-01-16 22:57:32 +00:00
Dan Gohman f1002495e3 Disable the post-RA scheduler on this test, since it uses a
simple %prcontext which doesn't find what it's looking for
if the scheduler has rearranged the instructions.

llvm-svn: 62363
2009-01-16 21:40:12 +00:00
Evan Cheng 968e2e7b3d CreateVirtualRegisters does trivial copy coalescing. If a node def is used by a single CopyToReg, it reuses the virtual register assigned to the CopyToReg. This won't work for SDNode that is a clone or is itself cloned. Disable this optimization for those nodes or it can end up with non-SSA machine instructions.
llvm-svn: 62356
2009-01-16 20:57:18 +00:00
Chris Lattner db2d9613d2 Fix PR3335 by not turning a store to one address space into a store to another.
llvm-svn: 62351
2009-01-16 20:12:52 +00:00
Bill Wendling e04334730e Add support for non-zero __builtin_return_address values on X86.
llvm-svn: 62338
2009-01-16 19:25:27 +00:00
Evan Cheng 2d9e40ed24 This is now passing.
llvm-svn: 62308
2009-01-16 06:59:14 +00:00
Evan Cheng beac6f8b0c Clean up previous cast optimization a bit. Also make zext elimination a bit more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.
llvm-svn: 62297
2009-01-16 02:11:43 +00:00