Dan Gohman [Sat, 14 Aug 2010 00:43:09 +0000 (00:43 +0000)]
LoopSimplify shouldn't split loop backedges that use indirectbr. PR7867.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111061
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Aug 2010 00:29:42 +0000 (00:29 +0000)]
Teach SimplifyCFG how to simplify indirectbr instructions.
- Eliminate redundant successors.
- Convert an indirectbr with one successor into a direct branch.
Also, generalize SimplifyCFG to be able to be run on a function entry block.
It knows quite a few simplifications which are applicable to the entry
block, and it only needs a few checks to avoid trouble with the entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111060
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 14 Aug 2010 00:15:52 +0000 (00:15 +0000)]
Add a local stack object block allocation pass. This is still an
experimental pass that allocates locals relative to one another before
register allocation and then assigns them to actual stack slots as a block
later in PEI. This will eventually allow targets with limited index offset
range to allocate additional base registers (not just FP and SP) to
more efficiently reference locals, as well as handle situations where
locals cannot be referenced via SP or FP at all (dynamic stack realignment
together with variable sized objects, for example). It's currently
incomplete and almost certainly buggy. Work in progress.
Disabled by default and gated via the -enable-local-stack-alloc command
line option.
rdar://
8277890
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111059
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 23:56:28 +0000 (23:56 +0000)]
Add a lint check for an indirectbr destination which has not
had its address taken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111058
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 13 Aug 2010 23:24:25 +0000 (23:24 +0000)]
Add a Thumb2 t2RSBrr instruction for disassembly only.
This fixes another part of PR7792.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111057
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Aug 2010 22:56:53 +0000 (22:56 +0000)]
Clean up the Spiller.h interface.
The earliestStart argument is entirely specific to linear scan allocation, and
can be easily calculated by RegAllocLinearScan.
Replace std::vector with SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111055
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 13 Aug 2010 22:43:33 +0000 (22:43 +0000)]
Temporarily disable tail calls on ARM to work around some linker problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111050
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 13 Aug 2010 21:48:10 +0000 (21:48 +0000)]
Move the Thumb2 SSAT and USAT optional shift operator out of the
instruction opcode. This fixes part of PR7792.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111047
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 21:24:58 +0000 (21:24 +0000)]
Various optimizations. Don't compare two loops' depths
when they are the same loop. Don't compare two instructions'
loop depths when they are in the same block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111045
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Aug 2010 21:18:48 +0000 (21:18 +0000)]
Implement splitting inside a single block.
When a live range is contained a single block, we can split it around
instruction clusters. The current approach is very primitive, splitting before
and after the largest gap between uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111043
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 21:17:19 +0000 (21:17 +0000)]
Fix LSR's ExtractImmediate and ExtractSymbol to avoid calling
ScalarEvolution::getAddExpr, which can be pretty expensive, when nothing
has changed, which is pretty common.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111042
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 13 Aug 2010 20:39:01 +0000 (20:39 +0000)]
Add comments to some pattern fragments in x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111041
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 13 Aug 2010 20:32:35 +0000 (20:32 +0000)]
tidy up comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111040
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 20:23:25 +0000 (20:23 +0000)]
When testing whether one loop contains another, test this directly
rather than testing whether the loop contains the other's header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111039
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 20:17:27 +0000 (20:17 +0000)]
Add a const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111038
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 20:17:14 +0000 (20:17 +0000)]
When creating a symmetric SCEV with a constant operand, put
the constant operand on the left, as that's where ScalarEvolution
will end up canonicalizing to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111037
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 20:11:39 +0000 (20:11 +0000)]
An add recurrence is loop-invariant in any loop inside of its
associated loop. This avoids potentially expensive traversals
of the add recurrence's operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111034
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 13 Aug 2010 20:08:59 +0000 (20:08 +0000)]
tidy up 80 column and whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111033
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 13 Aug 2010 20:08:53 +0000 (20:08 +0000)]
Revert r111007.
Apparently, this is now fixed in Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111032
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Aug 2010 20:03:15 +0000 (20:03 +0000)]
Implement hasComputableLoopEvolution for Add, Mul, and Trunc operators,
since they can support trivial implementations. This avoids potentially
expensive traversals of the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111031
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 13 Aug 2010 19:04:21 +0000 (19:04 +0000)]
Refactor the code for disassembling Thumb2 saturate instructions along the
same lines as the change I made for ARM saturate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111029
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Aug 2010 18:43:45 +0000 (18:43 +0000)]
Revert 110491. While not wrong, it was based on a
misanalysis and is undesirable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111028
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 13 Aug 2010 17:50:47 +0000 (17:50 +0000)]
Fix comment to reflect code, and remove an unused argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111022
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 13 Aug 2010 17:44:10 +0000 (17:44 +0000)]
Improve comment to make explicit why not to touch this could before JIT goes MC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111021
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 13 Aug 2010 16:55:08 +0000 (16:55 +0000)]
tidy up whitespace a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111019
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 13 Aug 2010 07:03:56 +0000 (07:03 +0000)]
One more XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111010
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 13 Aug 2010 07:01:55 +0000 (07:01 +0000)]
More XFAILs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111008
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 13 Aug 2010 06:02:45 +0000 (06:02 +0000)]
Add a workaround for building with Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111007
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 13 Aug 2010 04:15:45 +0000 (04:15 +0000)]
Add an XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111004
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Aug 2010 02:37:50 +0000 (02:37 +0000)]
Revert last patch and r110954 as I meant to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111001
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Aug 2010 02:30:00 +0000 (02:30 +0000)]
Revert r110954 for now, pseudo instructions can't make it through to the JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111000
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 13 Aug 2010 02:29:35 +0000 (02:29 +0000)]
Remove -fexceptions from llvmc tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110999
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 13 Aug 2010 02:29:24 +0000 (02:29 +0000)]
llvmc: fix two tests, remove XFAILs.
Tested on Linux and Darwin; please add platform-specific XFAILs/mail me a bug
report if this still fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110998
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Aug 2010 01:05:26 +0000 (01:05 +0000)]
Let LiveInterval::addRange extend existing ranges, it will verify that value
numbers match. The old check could accidentally leave holes in openli.
Also let useIntv add all ranges for the phi-def value inserted by
enterIntvAtEnd. This works as long at the value mapping is established in
enterIntvAtEnd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110995
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Aug 2010 01:05:23 +0000 (01:05 +0000)]
Remember to actually update SplitAnalysis statistics now that we have a fancy
function to do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110994
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 13 Aug 2010 00:29:44 +0000 (00:29 +0000)]
Use getAllOnesValue, saves a copy and looks better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110991
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 13 Aug 2010 00:17:53 +0000 (00:17 +0000)]
Reapply this transformation now that it is passing the external test which it previously failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110987
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 13 Aug 2010 00:16:46 +0000 (00:16 +0000)]
Move some code from Verifier into SVI::isValidOperands. This allows us to catch bad shufflevector operations when they are created, rather than waiting for someone to notice later on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110986
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Aug 2010 23:56:03 +0000 (23:56 +0000)]
Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110983
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Aug 2010 23:50:08 +0000 (23:50 +0000)]
Tidy up whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110982
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Aug 2010 23:46:28 +0000 (23:46 +0000)]
Use .empty() instead of .size().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110981
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 12 Aug 2010 23:02:57 +0000 (23:02 +0000)]
Handle an empty dupli.
This can happen if the original interval has been broken into two disconnected
parts. Ideally, we should be able to detect when the graph is disconnected and
create separate intervals, but that code is not implemented yet.
Example:
Two basic blocks are both branching to a loop header. Our interval is defined in
both basic blocks, and live into the loop along both edges.
We decide to split the interval around the loop. The interval is split into an
inside part and an outside part. The outside part now has two disconnected
segments, one in each basic block.
If we later decide to split the outside interval into single blocks, we get one
interval per basic block and an empty dupli for the remainder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110976
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 12 Aug 2010 23:02:55 +0000 (23:02 +0000)]
Update the SplitAnalysis statistics as uses are moved from curli to the new
split intervals. THis means the analysis can be used for multiple splits as long
as curli doesn't shrink.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110975
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Aug 2010 22:25:23 +0000 (22:25 +0000)]
fix PR7876: If ipsccp decides that a function's address is taken
before it rewrites the code, we need to use that in the post-rewrite pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110962
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 12 Aug 2010 20:55:18 +0000 (20:55 +0000)]
Some small clean-up: use of pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110954
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 12 Aug 2010 20:46:17 +0000 (20:46 +0000)]
Cleaned up the for-disassembly-only entries in the arm instruction table so that
the memory barrier variants (other than 'SY' full system domain read and write)
are treated as one instruction with option operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110951
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 12 Aug 2010 20:38:03 +0000 (20:38 +0000)]
Also recompute HasPHIKill flags in LiveInterval::RenumberValues.
If a phi-def value were removed from the interval, the phi-kill flags are no
longer valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110949
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Aug 2010 20:30:05 +0000 (20:30 +0000)]
Make sure ARM constant island pass does not break up an IT block. If the split point is in the middle of an IT block, it should move it up to just above the IT instruction. rdar://
8302637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110947
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 12 Aug 2010 20:20:53 +0000 (20:20 +0000)]
- Teach SSEDomainFix to switch between different levels of AVX instructions. Here we guess that AVX will have domain issues, so just implement them for consistency and in the future we remove if it's unnecessary.
- Make foldMemoryOperandImpl aware of 256-bit zero vectors folding and support the 128-bit counterparts of AVX too.
- Make sure MOV[AU]PS instructions are only selected when SSE1 is enabled, and duplicate the patterns to match AVX.
- Add a testcase for a simple 128-bit zero vector creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110946
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 12 Aug 2010 20:01:23 +0000 (20:01 +0000)]
Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110944
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 12 Aug 2010 18:50:55 +0000 (18:50 +0000)]
Clean up debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110940
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 12 Aug 2010 18:20:59 +0000 (18:20 +0000)]
Define AVX 128-bit pattern versions of SET0PS/PD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110937
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 12 Aug 2010 17:31:41 +0000 (17:31 +0000)]
Add a test for llvm-gcc svn 110632.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110935
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 12 Aug 2010 17:07:14 +0000 (17:07 +0000)]
Implement single block splitting.
Before spilling a live range, we split it into a separate range for each basic
block where it is used. That way we only get one reload per basic block if the
new smaller ranges can allocate to a register.
This type of splitting is already present in the standard spiller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110934
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Aug 2010 15:00:23 +0000 (15:00 +0000)]
Optimize ScalarEvolution::getAddExpr's operand factoring code by
having it finish processing all of the muliply operands before
starting the whole getAddExpr process over again, instead of
immediately after the first simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110916
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Aug 2010 14:52:55 +0000 (14:52 +0000)]
Hoist some loop-invariant code out of a hot loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110915
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Aug 2010 14:46:54 +0000 (14:46 +0000)]
Optimize ScalarEvolution::getAddExpr's duplicate operand detection
by having it finish processing the whole operand list before
starting the whole getAddExpr process over again, instead of
immediately after the first duplicate is found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110914
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 12 Aug 2010 11:31:39 +0000 (11:31 +0000)]
Add a 'normalize' method to the Triple class, which takes a mucked up
target triple and straightens it out. This does less than gcc's script
config.sub, for example it turns i386-mingw32 into i386--mingw32 not
i386-pc-mingw32, but it does a decent job of turning funky triples into
something that the rest of the Triple class can understand. The plan
is to use this to canonicalize triple's when they are first provided
by users, and have the rest of LLVM only deal with canonical triples.
Once this is done the special case workarounds in the Triple constructor
can be removed, making the class more regular and easier to use. The
comments and unittests for the Triple class are already adjusted in this
patch appropriately for this brave new world of increased uniformity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110909
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Aug 2010 07:01:22 +0000 (07:01 +0000)]
Temporarily revert 110737 and 110734, they were causing failures
in an external testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110905
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 12 Aug 2010 02:08:52 +0000 (02:08 +0000)]
Fix comment order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110898
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 12 Aug 2010 02:06:36 +0000 (02:06 +0000)]
Begin to support some vector operations for AVX 256-bit intructions. The long
term goal here is to be able to match enough of vector_shuffle and build_vector
so all avx intrinsics which aren't mapped to their own built-ins but to
shufflevector calls can be codegen'd. This is the first (baby) step, support
building zeroed vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110897
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 12 Aug 2010 01:40:54 +0000 (01:40 +0000)]
The autogened decoder was confusing the ARM STRBT for ARM USAT, because the .td
entry for ARM STRBT is actually a super-instruction for A8.6.199 STRBT A1 & A2.
Recover by looking for ARM:USAT encoding pattern before delegating to the auto-
gened decoder.
Added a "usat" test case to arm-tests.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110894
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Aug 2010 00:55:42 +0000 (00:55 +0000)]
MC/X86/AsmParser: Give an explicit error message when we reject an instruction
because it could have an ambiguous suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110890
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Aug 2010 00:55:38 +0000 (00:55 +0000)]
MC/AsmParser: Push the burdon of emitting diagnostics about unmatched
instructions onto the target specific parser, which can do a better job.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110889
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Aug 2010 00:55:32 +0000 (00:55 +0000)]
tblgen/AsmMatcher: Always emit the match function as 'MatchInstructionImpl',
target specific parsers can adapt the TargetAsmParser to this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110888
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 12 Aug 2010 00:17:38 +0000 (00:17 +0000)]
This is x86 only test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110887
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Aug 2010 23:53:59 +0000 (23:53 +0000)]
configure: Add detection of the linker version string.
- Review appreciated, as long as you understand that I understand that this is
a horrible hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110883
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 11 Aug 2010 23:35:12 +0000 (23:35 +0000)]
Changed the format of DMBsy, DSBsy, and friends from Pseudo to MiscFrm.
Added two test cases to arm-tests.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110880
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Aug 2010 23:17:54 +0000 (23:17 +0000)]
Even if a variable has constant value all the time, it is still a variable in gdb's eyes.
Tested by scope.exp in gdb testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110876
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 11 Aug 2010 23:10:46 +0000 (23:10 +0000)]
Move the ARM SSAT and USAT optional shift amount operand out of the
instruction opcode. This also fixes part of PR7792.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110875
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 11 Aug 2010 23:08:22 +0000 (23:08 +0000)]
Fix <rdar://problem/
8282498> even if it doesn't reproduce on trunk.
When a register is defined by a partial load:
%reg1234:sub_32 = MOV32mr <fi#-1>; GR64:%reg1234
That load cannot be folded into an instruction using the full 64-bit register.
It would become a 64-bit load.
This is related to the recent change to have isLoadFromStackSlot return false on
a sub-register load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110874
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 11 Aug 2010 22:36:04 +0000 (22:36 +0000)]
Fix a subtle use-after-free issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110863
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 11 Aug 2010 22:04:36 +0000 (22:04 +0000)]
Clean up ConstantRange a bit:
- remove ashr which never worked.
- fix lshr and shl and add tests.
- remove dead function "intersect1Wrapped".
- add a new sub method to subtract ranges, with test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110861
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 11 Aug 2010 21:12:09 +0000 (21:12 +0000)]
Add testcases for all AVX 256-bit intrinsics added in the last couple days
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110854
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 20:34:43 +0000 (20:34 +0000)]
Make LoopPass::getContainedPass return a LoopPass* instead of a Pass*
and remove casts from all its callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110848
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 20:28:16 +0000 (20:28 +0000)]
Remove BasicBlockPass::runOnFunction, which was unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110847
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 11 Aug 2010 19:21:05 +0000 (19:21 +0000)]
Remove rsqrt/sqrt_nr intrinsics since there are no more builtins for them on clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110845
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 19:11:05 +0000 (19:11 +0000)]
Delete FunctionPass::run, which is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110843
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 19:05:53 +0000 (19:05 +0000)]
Delete FunctionPass::runOnModule, which is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110842
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 18:15:01 +0000 (18:15 +0000)]
Don't use unsigned char for alignments in TargetData. There aren't
that many of these things, so the memory savings isn't significant,
and there are now situations where there can be alignments greater
than 128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110836
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 18:14:00 +0000 (18:14 +0000)]
Use ISD::ADD instead of ISD::SUB with a negated constant. This
avoids trouble if the return type of TD->getPointerSize() is
changed to something which doesn't promote to a signed type,
and is simpler anyway.
Also, use getCopyFromReg instead of getRegister to read a
physical register's value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110835
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 11 Aug 2010 17:39:23 +0000 (17:39 +0000)]
Reapply r109881 using a more strict command line for llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110833
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Aug 2010 17:32:46 +0000 (17:32 +0000)]
fix silly typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110831
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Aug 2010 17:31:12 +0000 (17:31 +0000)]
Add a target triple, as the runtime library invocation varies a bit by
platform. It's apparently "bl __muldf3" on linux, for example. Since that's
not what we're checking here, it's more robust to just force a triple. We
just wwant to check that the inline FP instructions are only generated
on cpus that have them."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110830
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Aug 2010 17:25:51 +0000 (17:25 +0000)]
Fix test and re-enable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110829
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 11 Aug 2010 16:50:17 +0000 (16:50 +0000)]
Fix a FIXME. The SlotIndex::Slot enum should be private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110826
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 16:36:07 +0000 (16:36 +0000)]
Temporarily disable some failing tests, until they can be
properly investigated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110825
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Aug 2010 15:44:15 +0000 (15:44 +0000)]
cortex m4 has floating point support, but only single precision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110810
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Aug 2010 15:09:00 +0000 (15:09 +0000)]
Temporarily disable some failing tests, until they can be
properly investigated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110808
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 11 Aug 2010 08:43:16 +0000 (08:43 +0000)]
Consider this code snippet:
float t1(int argc) {
return (argc == 1123) ? 1.234f : 2.38213f;
}
We would generate truly awful code on ARM (those with a weak stomach should look
away):
_t1:
movw r1, #1123
movs r2, #1
movs r3, #0
cmp r0, r1
mov.w r0, #0
it eq
moveq r0, r2
movs r1, #4
cmp r0, #0
it ne
movne r3, r1
adr r0, #LCPI1_0
ldr r0, [r0, r3]
bx lr
The problem was that legalization was creating a cascade of SELECT_CC nodes, for
for the comparison of "argc == 1123" which was fed into a SELECT node for the ?:
statement which was itself converted to a SELECT_CC node. This is because the
ARM back-end doesn't have custom lowering for SELECT nodes, so it used the
default "Expand".
I added a fairly simple "LowerSELECT" to the ARM back-end. It takes care of this
testcase, but can obviously be expanded to include more cases.
Now we generate this, which looks optimal to me:
_t1:
movw r1, #1123
movs r2, #0
cmp r0, r1
adr r0, #LCPI0_0
it eq
moveq r2, #4
ldr r0, [r0, r2]
bx lr
.align 2
LCPI0_0:
.long
1075344593 @ float 2.
382130e+00
.long
1067316150 @ float 1.
234000e+00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110799
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Aug 2010 07:17:46 +0000 (07:17 +0000)]
Report error if codegen tries to instantiate a ARM target when the cpu does support it. e.g. cortex-m* processors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110798
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Aug 2010 07:00:16 +0000 (07:00 +0000)]
ArchV7M implies HW division instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110797
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Aug 2010 06:57:53 +0000 (06:57 +0000)]
ArchV6T2, V7A, and V7M implies Thumb2; Archv7A implies NEON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110796
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Aug 2010 06:51:54 +0000 (06:51 +0000)]
Add ARM Archv6M and let it implies FeatureDB (having dmb, etc.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110795
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Aug 2010 06:37:20 +0000 (06:37 +0000)]
MC/ARM: Add basic support for handling predication by parsing it out of the mnemonic into a separate operand form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110794
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Aug 2010 06:37:16 +0000 (06:37 +0000)]
MC/ARM: Split mnemonic on '.' characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110793
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Aug 2010 06:37:12 +0000 (06:37 +0000)]
MC/ARM: Fill in ARMOperand::dump a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110792
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Aug 2010 06:37:09 +0000 (06:37 +0000)]
llvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation before matching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110791
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Aug 2010 06:37:04 +0000 (06:37 +0000)]
MCAsmParser: Add dump() hook to MCParsedAsmOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110790
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Aug 2010 06:36:59 +0000 (06:36 +0000)]
tblgen/AsmMatcher: Treat '.' in assembly strings as a token separator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110789
91177308-0d34-0410-b5e6-
96231b3b80d8