oota-llvm.git
15 years agoadd a method to BumpPtrAllocator that allows allocating elements
Chris Lattner [Tue, 3 Feb 2009 07:39:50 +0000 (07:39 +0000)]
add a method to BumpPtrAllocator that allows allocating elements
with a specified alignment.

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

15 years agoAdd LLVM plugin for gold.
Nick Lewycky [Tue, 3 Feb 2009 07:13:24 +0000 (07:13 +0000)]
Add LLVM plugin for gold.

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

15 years agoRegenerate configure.
Nick Lewycky [Tue, 3 Feb 2009 07:10:30 +0000 (07:10 +0000)]
Regenerate configure.

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

15 years agoAdd the ability to pass the path to binutils source to configure. This is
Nick Lewycky [Tue, 3 Feb 2009 07:10:08 +0000 (07:10 +0000)]
Add the ability to pass the path to binutils source to configure. This is
needed to build the LLVM gold plugin.

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

15 years agoadd another case of undefined behavior without crashing, PR3466.
Chris Lattner [Tue, 3 Feb 2009 07:08:57 +0000 (07:08 +0000)]
add another case of undefined behavior without crashing, PR3466.

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

15 years agoRevert r63600. It didn't fix the bug, it just moved it a bit.
Nick Lewycky [Tue, 3 Feb 2009 06:30:37 +0000 (06:30 +0000)]
Revert r63600. It didn't fix the bug, it just moved it a bit.

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

15 years agoTeach AliasAnalysis that a bunch of the atomic intrinsics only dereference their...
Owen Anderson [Tue, 3 Feb 2009 06:27:22 +0000 (06:27 +0000)]
Teach AliasAnalysis that a bunch of the atomic intrinsics only dereference their arguments.

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

15 years agoUpdate the callgraph when replacing InvokeInst with CallInst when inlining.
Nick Lewycky [Tue, 3 Feb 2009 04:34:40 +0000 (04:34 +0000)]
Update the callgraph when replacing InvokeInst with CallInst when inlining.

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

15 years agoExplicitly pass in debug location information to BuildMI.
Bill Wendling [Tue, 3 Feb 2009 02:29:34 +0000 (02:29 +0000)]
Explicitly pass in debug location information to BuildMI.

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

15 years agoPass in something sensible for the debug location information when creating the
Bill Wendling [Tue, 3 Feb 2009 02:20:52 +0000 (02:20 +0000)]
Pass in something sensible for the debug location information when creating the
initial PHI nodes of the machine function.

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

15 years agofix a bitcode reader bug where it can't handle extractelement correctly:
Chris Lattner [Tue, 3 Feb 2009 02:11:28 +0000 (02:11 +0000)]
fix a bitcode reader bug where it can't handle extractelement correctly:
the index of the value being extracted is always an i32.  This fixes PR3465

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

15 years agoTeach ConvertUsesToScalar to handle memset, allowing it to handle
Chris Lattner [Tue, 3 Feb 2009 02:01:43 +0000 (02:01 +0000)]
Teach ConvertUsesToScalar to handle memset, allowing it to handle
crazy cases like:

struct f {  int A, B, C, D, E, F; };
short test4() {
  struct f A;
  A.A = 1;
  memset(&A.B, 2, 12);
  return A.C;
}

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

15 years agoFill in some missing DL propagation in getNode()s.
Dale Johannesen [Tue, 3 Feb 2009 01:55:44 +0000 (01:55 +0000)]
Fill in some missing DL propagation in getNode()s.

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

15 years agoUse SDL->getCurDebugLoc() instead of unknown loc for landing pads.
Bill Wendling [Tue, 3 Feb 2009 01:55:42 +0000 (01:55 +0000)]
Use SDL->getCurDebugLoc() instead of unknown loc for landing pads.

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

15 years agoExplicitly pass in the "unknown" debug location. This is probably not
Bill Wendling [Tue, 3 Feb 2009 01:33:28 +0000 (01:33 +0000)]
Explicitly pass in the "unknown" debug location. This is probably not
correct. We need more infrastructure before we can get the DebugLoc info for
these instructions.

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

15 years agoDelete these two tests. They are specific to x86-64, and there's no
Dan Gohman [Tue, 3 Feb 2009 01:33:26 +0000 (01:33 +0000)]
Delete these two tests. They are specific to x86-64, and there's no
reliable way to do this with the current dejagnu infrastructure.
If someone can figure out how to fix these tests so that they test
what they are intended to test without spuriously failing on any
popular platforms, they are invited to reinstate them.

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

15 years agoAlphabetize includes.
Bill Wendling [Tue, 3 Feb 2009 01:32:22 +0000 (01:32 +0000)]
Alphabetize includes.

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

15 years agorearrange how SRoA handles promotion of allocas to vectors.
Chris Lattner [Tue, 3 Feb 2009 01:30:09 +0000 (01:30 +0000)]
rearrange how SRoA handles promotion of allocas to vectors.
With the new world order, it can handle cases where the first
store into the alloca is an element of the vector, instead of
requiring the first analyzed store to have the vector type
itself.  This allows us to un-xfail
test/CodeGen/X86/vec_ins_extract.ll.

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

15 years agoMove isIdentifiedObject and isNoAliasCall into AliasAnalysis.cpp since
Dan Gohman [Tue, 3 Feb 2009 01:28:32 +0000 (01:28 +0000)]
Move isIdentifiedObject and isNoAliasCall into AliasAnalysis.cpp since
they are useful to analyses other than BasicAliasAnalysis.cpp. Include
the full comment for isIdentifiedObject in the header file. Thanks to
Chris for suggeseting this.

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

15 years agothis test produces an undefined value, we don't care
Chris Lattner [Tue, 3 Feb 2009 01:13:52 +0000 (01:13 +0000)]
this test produces an undefined value, we don't care
what it is, but we do want the alloca promoted.

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

15 years agoPropagate debug loc info during SDNode -> machine instr creation.
Bill Wendling [Tue, 3 Feb 2009 01:02:39 +0000 (01:02 +0000)]
Propagate debug loc info during SDNode -> machine instr creation.

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

15 years agoCreate DebugLoc information in FastISel. Several temporary methods were
Bill Wendling [Tue, 3 Feb 2009 00:55:04 +0000 (00:55 +0000)]
Create DebugLoc information in FastISel. Several temporary methods were
created. Specifically, those BuildMIs which use
"DebugLoc::getUnknownLoc()". I'll remove them soon.

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

15 years agoPropagation in TargetLowering. Includes passing a DL
Dale Johannesen [Tue, 3 Feb 2009 00:47:48 +0000 (00:47 +0000)]
Propagation in TargetLowering.  Includes passing a DL
into SimplifySetCC which gets called elsewhere.

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

15 years agoIt fails on Linux. XFAIL that machine.
Bill Wendling [Tue, 3 Feb 2009 00:35:11 +0000 (00:35 +0000)]
It fails on Linux. XFAIL that machine.

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

15 years agoThis is passing for us. Should it have been reenabled?
Bill Wendling [Tue, 3 Feb 2009 00:27:09 +0000 (00:27 +0000)]
This is passing for us. Should it have been reenabled?

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

15 years agoAdd explicit -march=x86 to these tests so that they don't
Dan Gohman [Tue, 3 Feb 2009 00:20:22 +0000 (00:20 +0000)]
Add explicit -march=x86 to these tests so that they don't
default to -march=x86-64 on 64-bit hosts.

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

15 years agoUse the SubclassData field to hold ExtType, isTrunc, and MemIndexedMode
Dan Gohman [Tue, 3 Feb 2009 00:08:45 +0000 (00:08 +0000)]
Use the SubclassData field to hold ExtType, isTrunc, and MemIndexedMode
information. This eliminates the need for the Flags field in MemSDNode,
so this makes LoadSDNode and StoreSDNode smaller. Also, it makes
FoldingSetNodeIDs for loads and stores two AddIntegers smaller.

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

15 years agoChange Feature64Bit to not imply FeatureSSE2. All x86-64 hardware has
Dan Gohman [Tue, 3 Feb 2009 00:04:43 +0000 (00:04 +0000)]
Change Feature64Bit to not imply FeatureSSE2. All x86-64 hardware has
SSE2, however it's possible to disable SSE2, and the subtarget support
code thinks that if 64-bit implies SSE2 and SSE2 is disabled then
64-bit should also be disabled. Instead, just mark all the 64-bit
subtargets as explicitly supporting SSE2.

Also, move the code that makes -march=x86-64 enable 64-bit support by
default to only apply when there is no explicit subtarget. If you
need to specify a subtarget and you want 64-bit code, you'll need to
select a subtarget that supports 64-bit code.

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

15 years agoLast DebugLoc propagation for this file.
Dale Johannesen [Mon, 2 Feb 2009 23:46:53 +0000 (23:46 +0000)]
Last DebugLoc propagation for this file.

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

15 years agoFix another test to not use -mcpu=yonah with 64-bit code.
Dan Gohman [Mon, 2 Feb 2009 23:43:59 +0000 (23:43 +0000)]
Fix another test to not use -mcpu=yonah with 64-bit code.

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

15 years agoYonah does not support x86-64. Change the -mcpu value to one that does.
Dan Gohman [Mon, 2 Feb 2009 22:50:08 +0000 (22:50 +0000)]
Yonah does not support x86-64. Change the -mcpu value to one that does.

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

15 years agoMore DebugLoc propagation. This should be everything
Dale Johannesen [Mon, 2 Feb 2009 22:49:46 +0000 (22:49 +0000)]
More DebugLoc propagation.  This should be everything
except LegalizeOp itself.

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

15 years agoImprove -fno-opt style option processing to not require an extra
Mike Stump [Mon, 2 Feb 2009 22:48:49 +0000 (22:48 +0000)]
Improve -fno-opt style option processing to not require an extra
option to make the -fno- form on the option.  We also document the new
form in the CommandLine documentation.

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

15 years agoMergeValueInto is too smart: it might choose to do the merge the opposite direction.
Owen Anderson [Mon, 2 Feb 2009 22:42:01 +0000 (22:42 +0000)]
MergeValueInto is too smart: it might choose to do the merge the opposite direction.
Live interval reconstruction needs to account for this, and scour its maps to
prevent dangling references.

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

15 years agoDebugLoc propagation. ExpandOp and PromoteOp,
Dale Johannesen [Mon, 2 Feb 2009 22:12:50 +0000 (22:12 +0000)]
DebugLoc propagation.  ExpandOp and PromoteOp,
among others.

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

15 years agoOnly force SSE level if it is not correct.
Torok Edwin [Mon, 2 Feb 2009 21:57:34 +0000 (21:57 +0000)]
Only force SSE level if it is not correct.
Add an assert to check HasX86_64 status.

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

15 years agoRun dsymutil on darwin, when it is expected, before running gdb test.
Devang Patel [Mon, 2 Feb 2009 21:09:36 +0000 (21:09 +0000)]
Run dsymutil on darwin, when it is expected, before running gdb test.

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

15 years agoCommit missing files.
Dale Johannesen [Mon, 2 Feb 2009 20:47:48 +0000 (20:47 +0000)]
Commit missing files.

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

15 years agoinline SROA::ConvertToScalar, no functionality change.
Chris Lattner [Mon, 2 Feb 2009 20:44:45 +0000 (20:44 +0000)]
inline SROA::ConvertToScalar, no functionality change.

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

15 years agoMore DebugLoc propagation.
Dale Johannesen [Mon, 2 Feb 2009 20:41:04 +0000 (20:41 +0000)]
More DebugLoc propagation.

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

15 years agoremove #if 0 code on Bill's request.
Torok Edwin [Mon, 2 Feb 2009 20:23:02 +0000 (20:23 +0000)]
remove #if 0 code on Bill's request.

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

15 years agoRemove trailing spaces.
Duncan Sands [Mon, 2 Feb 2009 19:46:41 +0000 (19:46 +0000)]
Remove trailing spaces.

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

15 years agoUpdate hand-crafted VC++ build.
Steve Naroff [Mon, 2 Feb 2009 19:22:02 +0000 (19:22 +0000)]
Update hand-crafted VC++ build.
- Add PACKAGE_STRING definition to Windows config.h.

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

15 years agoDebugLoc propagation for int<->fp conversions.
Dale Johannesen [Mon, 2 Feb 2009 19:03:57 +0000 (19:03 +0000)]
DebugLoc propagation for int<->fp conversions.

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

15 years agoRefactor PerformPHIConstruction, no functionality changes.
Evan Cheng [Mon, 2 Feb 2009 18:33:18 +0000 (18:33 +0000)]
Refactor PerformPHIConstruction, no functionality changes.

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

15 years agoxfail this for now, will fix shortly.
Chris Lattner [Mon, 2 Feb 2009 18:15:33 +0000 (18:15 +0000)]
xfail this for now, will fix shortly.

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

15 years agoupdate test
Chris Lattner [Mon, 2 Feb 2009 18:12:58 +0000 (18:12 +0000)]
update test

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

15 years agoReposition the DebugLoc field to reduce padding space
Dan Gohman [Mon, 2 Feb 2009 18:04:24 +0000 (18:04 +0000)]
Reposition the DebugLoc field to reduce padding space
on LP64 hosts.

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

15 years agoFix a bug which caused us to miscompile a couple of Ada
Chris Lattner [Mon, 2 Feb 2009 18:02:59 +0000 (18:02 +0000)]
Fix a bug which caused us to miscompile a couple of Ada
tests.  Thanks for the beautiful reduced testcase Duncan!

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

15 years agoDo not add redundant arguments in a method definition DIE.
Devang Patel [Mon, 2 Feb 2009 17:51:41 +0000 (17:51 +0000)]
Do not add redundant arguments in a method definition DIE.

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

15 years agoMake this test case smaller.
Devang Patel [Mon, 2 Feb 2009 17:50:43 +0000 (17:50 +0000)]
Make this test case smaller.

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

15 years agoDuncan's patch. Further to 64382. Takes care of illegal types for shift amount.
Sanjiv Gupta [Mon, 2 Feb 2009 17:19:39 +0000 (17:19 +0000)]
Duncan's patch. Further to 64382. Takes care of illegal types for shift amount.

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

15 years agoMade the common case of default address space directive as non-virtual for performanc...
Sanjiv Gupta [Mon, 2 Feb 2009 16:53:06 +0000 (16:53 +0000)]
Made the common case of default address space directive as non-virtual for performance reasons. Provide a single virtual interface for directives of all sizes in  non-default address spaces.

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

15 years agoFix a comment (bytes -> bits), reformat a comment
Duncan Sands [Mon, 2 Feb 2009 10:06:20 +0000 (10:06 +0000)]
Fix a comment (bytes -> bits), reformat a comment
and remove trailing whitespace.  No functionality
change.

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

15 years agoFix an obvious thinko.
Duncan Sands [Mon, 2 Feb 2009 09:53:14 +0000 (09:53 +0000)]
Fix an obvious thinko.

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

15 years agoADD / SUB / SMUL / UMUL with overflow second result top bits must be zero.
Evan Cheng [Mon, 2 Feb 2009 09:15:04 +0000 (09:15 +0000)]
ADD / SUB / SMUL / UMUL with overflow second result top bits must be zero.

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

15 years agoThis passes on x86-32 linux at least.
Duncan Sands [Mon, 2 Feb 2009 09:10:57 +0000 (09:10 +0000)]
This passes on x86-32 linux at least.

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

15 years agoMake the XFAIL line actually match x86-32 targets.
Duncan Sands [Mon, 2 Feb 2009 09:07:13 +0000 (09:07 +0000)]
Make the XFAIL line actually match x86-32 targets.

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

15 years agoAdd comment.
Evan Cheng [Mon, 2 Feb 2009 08:19:07 +0000 (08:19 +0000)]
Add comment.

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

15 years agoTeach LowerBRCOND to recognize (xor (setcc x), 1). The xor inverts the condition...
Evan Cheng [Mon, 2 Feb 2009 08:07:36 +0000 (08:07 +0000)]
Teach LowerBRCOND to recognize (xor (setcc x), 1). The xor inverts the condition. It's normally transformed by the dag combiner, unless the condition is set by a arithmetic op with overflow.

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

15 years agoreject things like: zext <4 x i32> %tmp to i256
Chris Lattner [Mon, 2 Feb 2009 07:40:17 +0000 (07:40 +0000)]
reject things like: zext <4 x i32> %tmp to i256

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

15 years agovalidation error fix.
Chris Lattner [Mon, 2 Feb 2009 07:33:15 +0000 (07:33 +0000)]
validation error fix.

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

15 years agoDocument type upreferences (PR3380), patch by Stein Roger Skafløtten
Chris Lattner [Mon, 2 Feb 2009 07:32:36 +0000 (07:32 +0000)]
Document type upreferences (PR3380), patch by Stein Roger Skafløtten
with enhancements and corrections by me.

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

15 years agoFix PR3372
Chris Lattner [Mon, 2 Feb 2009 07:24:28 +0000 (07:24 +0000)]
Fix PR3372

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

15 years agoreduce indentation, (~XorCST->getValue()).isSignBit() -> isMaxSignedValue()
Chris Lattner [Mon, 2 Feb 2009 07:15:30 +0000 (07:15 +0000)]
reduce indentation, (~XorCST->getValue()).isSignBit() -> isMaxSignedValue()

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

15 years agoreduce testcase.
Chris Lattner [Mon, 2 Feb 2009 06:55:45 +0000 (06:55 +0000)]
reduce testcase.

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

15 years agoPreserve more SourceValue information.
Mon P Wang [Mon, 2 Feb 2009 06:37:55 +0000 (06:37 +0000)]
Preserve more SourceValue information.

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

15 years agoadd 2 more testcases for -mattr=-sse (r63495).
Torok Edwin [Sun, 1 Feb 2009 18:24:20 +0000 (18:24 +0000)]
add 2 more testcases for -mattr=-sse (r63495).
--This line, and those below, will be ignaored--

A    test/CodeGen/X86/nosse-error1.ll
A    test/CodeGen/X86/nosse-error2.ll

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

15 years agoImplement -mno-sse: if SSE is disabled on x86-64, don't store XMM on stack for
Torok Edwin [Sun, 1 Feb 2009 18:15:56 +0000 (18:15 +0000)]
Implement -mno-sse: if SSE is disabled on x86-64, don't store XMM on stack for
var-args, and don't allow FP return values

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

15 years agoFix PR3453 and probably a bunch of other potential
Duncan Sands [Sun, 1 Feb 2009 18:06:53 +0000 (18:06 +0000)]
Fix PR3453 and probably a bunch of other potential
crashes or wrong code with codegen of large integers:
eliminate the legacy getIntegerVTBitMask and
getIntegerVTSignBit methods, which returned their
value as a uint64_t, so couldn't handle huge types.

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

15 years agoForgot some more DebugLoc propagations.
Bill Wendling [Sun, 1 Feb 2009 11:19:36 +0000 (11:19 +0000)]
Forgot some more DebugLoc propagations.

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

15 years agoFix test failures causes by my previous commit.
Owen Anderson [Sun, 1 Feb 2009 08:41:54 +0000 (08:41 +0000)]
Fix test failures causes by my previous commit.

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

15 years agoFix an issue in PHI construction that was exposed by GCC 4.2 producing a different...
Owen Anderson [Sun, 1 Feb 2009 07:06:00 +0000 (07:06 +0000)]
Fix an issue in PHI construction that was exposed by GCC 4.2 producing a different set iteration order for the reg_iterator.

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

15 years agoFix PR3423: Link llvm on ARM EABI machines. Patch by Robert Schuster.
Evan Cheng [Sun, 1 Feb 2009 06:42:27 +0000 (06:42 +0000)]
Fix PR3423: Link llvm on ARM EABI machines. Patch by Robert Schuster.

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

15 years agoDebugLoc propagation.
Dale Johannesen [Sat, 31 Jan 2009 22:04:51 +0000 (22:04 +0000)]
DebugLoc propagation.

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

15 years agoReinstate this optimization to fold icmp of xor when possible. Don't try to
Nick Lewycky [Sat, 31 Jan 2009 21:30:05 +0000 (21:30 +0000)]
Reinstate this optimization to fold icmp of xor when possible. Don't try to
turn icmp eq a+x, b+x into icmp eq a, b if a+x or b+x has other uses. This
may have been increasing register pressure leading to the bzip2 slowdown.

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

15 years agoDebugLoc propagation. Done with file.
Dale Johannesen [Sat, 31 Jan 2009 21:04:24 +0000 (21:04 +0000)]
DebugLoc propagation.  Done with file.

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

15 years agoDebugLoc propagation. Done with file.
Dale Johannesen [Sat, 31 Jan 2009 20:01:02 +0000 (20:01 +0000)]
DebugLoc propagation.  Done with file.

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

15 years agoFix PR3452 (an infinite loop bootstrapping) by disabling the recent
Chris Lattner [Sat, 31 Jan 2009 19:05:27 +0000 (19:05 +0000)]
Fix PR3452 (an infinite loop bootstrapping) by disabling the recent
improvements to the EvaluateInDifferentType code.  This code works
by just inserted a bunch of new code and then seeing if it is
useful.  Instcombine is not allowed to do this: it can only insert
new code if it is useful, and only when it is converging to a more
canonical fixed point.  Now that we iterate when DCE makes progress,
this causes an infinite loop when the code ends up not being used.

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

15 years agoFix PR3401: when using large integers, the type
Duncan Sands [Sat, 31 Jan 2009 15:50:11 +0000 (15:50 +0000)]
Fix PR3401: when using large integers, the type
returned by getShiftAmountTy may be too small
to hold shift values (it is an i8 on x86-32).
Before and during type legalization, use a large
but legal type for shift amounts: getPointerTy;
afterwards use getShiftAmountTy, fixing up any
shift amounts with a big type during operation
legalization.  Thanks to Dan for writing the
original patch (which I shamelessly pillaged).

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

15 years agonow that all the pieces are in place, teach instcombine's
Chris Lattner [Sat, 31 Jan 2009 08:40:03 +0000 (08:40 +0000)]
now that all the pieces are in place, teach instcombine's
simplifydemandedbits to simplify instructions with *multiple
uses* in contexts where it can get away with it.  This allows
it to simplify the code in multi-use-or.ll into a single 'add
double'.

This change is particularly interesting because it will cover
up for some common codegen bugs with large integers created due
to the recent SROA patch.  When working on fixing those bugs,
this should be disabled.

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

15 years agosimplify/clarify control flow and improve comments, no functionality change.
Chris Lattner [Sat, 31 Jan 2009 08:24:16 +0000 (08:24 +0000)]
simplify/clarify control flow and improve comments, no functionality change.

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

15 years agomake some fairly meaty internal changes to how SimplifyDemandedBits works.
Chris Lattner [Sat, 31 Jan 2009 08:15:18 +0000 (08:15 +0000)]
make some fairly meaty internal changes to how SimplifyDemandedBits works.
Now, if it detects that "V" is the same as some other value,
SimplifyDemandedBits returns the new value instead of RAUW'ing it immediately.
This has two benefits:
1) simpler code in the recursive SimplifyDemandedBits routine.
2) it allows future fun stuff in instcombine where an operation has multiple
   uses and can be simplified in one context, but not all.

#2 isn't implemented yet, this patch should have no functionality change.

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

15 years agoadd accessors
Chris Lattner [Sat, 31 Jan 2009 07:34:19 +0000 (07:34 +0000)]
add accessors

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

15 years agominor cleanups
Chris Lattner [Sat, 31 Jan 2009 07:26:06 +0000 (07:26 +0000)]
minor cleanups

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

15 years agomake sure to set Changed=true when instcombine hacks on the code,
Chris Lattner [Sat, 31 Jan 2009 07:04:22 +0000 (07:04 +0000)]
make sure to set Changed=true when instcombine hacks on the code,
not doing so prevents it from properly iterating and prevents it
from deleting the entire body of dce-iterate.ll

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

15 years agoUsed "-enable-unsafe-fp-math" to allow this transformation - (a * b -c) = c - a *b.
Mon P Wang [Sat, 31 Jan 2009 06:50:54 +0000 (06:50 +0000)]
Used "-enable-unsafe-fp-math" to allow this transformation - (a * b -c) = c - a *b.

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

15 years agoIf unsafe FP optimization is not set, don't allow -(A-B) => B-A because
Mon P Wang [Sat, 31 Jan 2009 06:07:45 +0000 (06:07 +0000)]
If unsafe FP optimization is not set, don't allow -(A-B) => B-A because
when A==B, -0.0 != +0.0.

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

15 years agoDon't use DebugLoc::getUnknownLoc(). Default to something hopefully sensible.
Bill Wendling [Sat, 31 Jan 2009 03:12:48 +0000 (03:12 +0000)]
Don't use DebugLoc::getUnknownLoc(). Default to something hopefully sensible.

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

15 years agoSimplify and generalize the SROA "convert to scalar" transformation to
Chris Lattner [Sat, 31 Jan 2009 02:28:54 +0000 (02:28 +0000)]
Simplify and generalize the SROA "convert to scalar" transformation to
be able to handle *ANY* alloca that is poked by loads and stores of
bitcasts and GEPs with constant offsets.  Before the code had a number
of annoying limitations and caused it to miss cases such as storing into
holes in structs and complex casts (as in bitfield-sroa) where we had
unions of bitfields etc.  This also handles a number of important cases
that are exposed due to the ABI lowering stuff we do to pass stuff by
value.

One case that is pretty great is that we compile
2006-11-07-InvalidArrayPromote.ll into:

define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind {
%tmp10 = call <4 x i32> @llvm.x86.sse2.cvttps2dq(<4 x float> %v1)
%tmp105 = bitcast <4 x i32> %tmp10 to i128
%tmp1056 = zext i128 %tmp105 to i256
%tmp.upgrd.43 = lshr i256 %tmp1056, 96
%tmp.upgrd.44 = trunc i256 %tmp.upgrd.43 to i32
ret i32 %tmp.upgrd.44
}

which turns into:

_func:
subl $28, %esp
cvttps2dq %xmm1, %xmm0
movaps %xmm0, (%esp)
movl 12(%esp), %eax
addl $28, %esp
ret

Which is pretty good code all things considering :).

One effect of this is that SROA will start generating arbitrary bitwidth
integers that are a multiple of 8 bits.  In the case above, we got a
256 bit integer, but the codegen guys assure me that it can handle the
simple and/or/shift/zext stuff that we're doing on these operations.

This addresses rdar://6532315

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

15 years agoMove CurDebugLoc into SelectionDAGLowering.
Dale Johannesen [Sat, 31 Jan 2009 02:22:37 +0000 (02:22 +0000)]
Move CurDebugLoc into SelectionDAGLowering.

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

15 years agoback out my previous change, it exposes a latent bug. investigating
Gabor Greif [Sat, 31 Jan 2009 01:31:59 +0000 (01:31 +0000)]
back out my previous change, it exposes a latent bug. investigating

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

15 years agouse precise accessors
Gabor Greif [Sat, 31 Jan 2009 00:58:14 +0000 (00:58 +0000)]
use precise accessors

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

15 years agoPropagate debug info in LegalizeFloatTypes.
Dale Johannesen [Sat, 31 Jan 2009 00:43:08 +0000 (00:43 +0000)]
Propagate debug info in LegalizeFloatTypes.
Complete (modulo bugs).

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

15 years agoPropagate debug info. This file complete
Dale Johannesen [Sat, 31 Jan 2009 00:20:43 +0000 (00:20 +0000)]
Propagate debug info.  This file complete
(modulo bugs)

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

15 years agoPropagate debug info through MakeLibCall and a
Dale Johannesen [Sat, 31 Jan 2009 00:11:23 +0000 (00:11 +0000)]
Propagate debug info through MakeLibCall and a
couple of things that use it.

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

15 years agoMore DebugLoc propagation.
Bill Wendling [Fri, 30 Jan 2009 23:59:18 +0000 (23:59 +0000)]
More DebugLoc propagation.

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

15 years agoMore DebugLoc propagation.
Bill Wendling [Fri, 30 Jan 2009 23:36:47 +0000 (23:36 +0000)]
More DebugLoc propagation.

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

15 years agoMore DebugLoc propagation in LOAD etc. methods.
Bill Wendling [Fri, 30 Jan 2009 23:27:35 +0000 (23:27 +0000)]
More DebugLoc propagation in LOAD etc. methods.

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

15 years agoFix build on case-sensitive filesystems (i.e. everybody else)
Dale Johannesen [Fri, 30 Jan 2009 23:20:42 +0000 (23:20 +0000)]
Fix build on case-sensitive filesystems (i.e. everybody else)

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