oota-llvm.git
13 years agoRemove outdated README entry.
Eli Friedman [Wed, 16 Feb 2011 07:41:19 +0000 (07:41 +0000)]
Remove outdated README entry.

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

13 years agoRemove outdated README entry.
Eli Friedman [Wed, 16 Feb 2011 07:18:18 +0000 (07:18 +0000)]
Remove outdated README entry.

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

13 years agoUpdate README entry.
Eli Friedman [Wed, 16 Feb 2011 07:17:44 +0000 (07:17 +0000)]
Update README entry.

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

13 years agoRefactor zero folding slightly. Clean up todo.
Eric Christopher [Wed, 16 Feb 2011 04:50:12 +0000 (04:50 +0000)]
Refactor zero folding slightly. Clean up todo.

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

13 years agoGas is very inconsistent about when a relaxation/relocation is needed. Do
Rafael Espindola [Wed, 16 Feb 2011 03:25:55 +0000 (03:25 +0000)]
Gas is very inconsistent about when a relaxation/relocation is needed. Do
the right thing and stop trying to copy it. Fixes PR8944.

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

13 years agoThe change for PR9190 wasn't quite right. We need to avoid making the
Eric Christopher [Wed, 16 Feb 2011 01:10:03 +0000 (01:10 +0000)]
The change for PR9190 wasn't quite right. We need to avoid making the
transformation if we can't legally create a build vector of the correct
type. Check that we can make the transformation first, and add a TODO to
refactor this code with similar cases.

Fixes: PR9223 and rdar://9000350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125631 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd testcase for PR9190.
Eric Christopher [Wed, 16 Feb 2011 01:08:31 +0000 (01:08 +0000)]
Add testcase for PR9190.

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

13 years agoAdd support for pushsection and popsection. Patch by Joerg Sonnenberger.
Rafael Espindola [Wed, 16 Feb 2011 01:08:29 +0000 (01:08 +0000)]
Add support for pushsection and popsection. Patch by Joerg Sonnenberger.

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

13 years agoRemove a duplicated check.
Evan Cheng [Wed, 16 Feb 2011 00:37:02 +0000 (00:37 +0000)]
Remove a duplicated check.

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

13 years agoSome single precision VFP instructions may be executed on NEON pipeline, but not...
Evan Cheng [Wed, 16 Feb 2011 00:35:02 +0000 (00:35 +0000)]
Some single precision VFP instructions may be executed on NEON pipeline, but not double precision ones.

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

13 years agoTeach PatternMatch that splat vectors could be floating point as well as
Nick Lewycky [Tue, 15 Feb 2011 23:13:23 +0000 (23:13 +0000)]
Teach PatternMatch that splat vectors could be floating point as well as
integer. Fixes PR9228!

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

13 years agoAdd support for parsing [expr].
Roman Divacky [Tue, 15 Feb 2011 20:43:39 +0000 (20:43 +0000)]
Add support for parsing [expr].

This is submitted by Joerg Sonnenberger and fixes his PR8685.

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

13 years agoTeach ARMLoadStoreOptimizer to remove kill flags from merged instructions as well.
Jakob Stoklund Olesen [Tue, 15 Feb 2011 19:51:58 +0000 (19:51 +0000)]
Teach ARMLoadStoreOptimizer to remove kill flags from merged instructions as well.

This is necessary to avoid a crash in certain tangled situations where a kill
flag is first correctly moved to a merged instruction, and then needs to be
moved again:

  STR %R0, a...
  STR %R0<kill>, b...

First becomes:

  STR %R0, b...
  STM a, %R0<kill>, ...

and then:

  STM a, %R0, ...
  STM b, %R0<kill>, ...

We can now remove the kill flag from the merged STM when needed. 8960050.

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

13 years agoIgnore DBG_VALUE machine instructions while constructing instruction ranges based...
Devang Patel [Tue, 15 Feb 2011 17:56:09 +0000 (17:56 +0000)]
Ignore DBG_VALUE machine instructions while constructing instruction ranges based on location info.
Machine instruction range consisting of only DBG_VALUE MIs only contributes consecutive labels in assembly output, which is harmless, and empty scope entry in DebugInfo, which confuses debugger tools.

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

13 years agoImplement a function from PathV2 whose definition is missing.
Argyrios Kyrtzidis [Tue, 15 Feb 2011 17:51:19 +0000 (17:51 +0000)]
Implement a function from PathV2 whose definition is missing.

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

13 years agoMove DbgInfoPrinter specific utlities inside DbgInfoPrinter.cpp
Devang Patel [Tue, 15 Feb 2011 17:36:11 +0000 (17:36 +0000)]
Move DbgInfoPrinter specific utlities inside DbgInfoPrinter.cpp

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

13 years agoPrint function info. Patch by Minjang Kim.
Devang Patel [Tue, 15 Feb 2011 17:24:56 +0000 (17:24 +0000)]
Print function info. Patch by Minjang Kim.

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

13 years agoSpelling fix: consequtive -> consecutive.
Duncan Sands [Tue, 15 Feb 2011 09:23:02 +0000 (09:23 +0000)]
Spelling fix: consequtive -> consecutive.

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

13 years agoWhen tablegen'ing the clang analyzer checkers:
Argyrios Kyrtzidis [Tue, 15 Feb 2011 07:42:16 +0000 (07:42 +0000)]
When tablegen'ing the clang analyzer checkers:

-Use the tablegen class name for the checker class name.
-Mark checker packages as hidden/not hidden.

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

13 years agoFix 9216 - Endless loop in InstCombine pass.
Nadav Rotem [Tue, 15 Feb 2011 07:13:48 +0000 (07:13 +0000)]
Fix 9216 - Endless loop in InstCombine pass.
The pattern "A&(A^B) -> A & ~B" recreated itself because ~B is
actually a xor -1.

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

13 years agoFix thinko. Cmp can be the first instruction in a MBB.
Evan Cheng [Tue, 15 Feb 2011 05:00:24 +0000 (05:00 +0000)]
Fix thinko. Cmp can be the first instruction in a MBB.

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

13 years agoDo not forget DebugLoc!
Devang Patel [Tue, 15 Feb 2011 02:02:30 +0000 (02:02 +0000)]
Do not forget DebugLoc!

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

13 years agotidy up a bit.
Chris Lattner [Tue, 15 Feb 2011 01:56:08 +0000 (01:56 +0000)]
tidy up a bit.

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

13 years agoMinor fixes to tutorial, patch by Benjamin Meyer!
Chris Lattner [Tue, 15 Feb 2011 00:24:32 +0000 (00:24 +0000)]
Minor fixes to tutorial, patch by Benjamin Meyer!

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

13 years agofix comments
Chris Lattner [Tue, 15 Feb 2011 00:23:53 +0000 (00:23 +0000)]
fix comments

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

13 years agoconvert ConstantVector::get to use ArrayRef.
Chris Lattner [Tue, 15 Feb 2011 00:14:00 +0000 (00:14 +0000)]
convert ConstantVector::get to use ArrayRef.

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

13 years agofix some typos.
Chris Lattner [Tue, 15 Feb 2011 00:06:37 +0000 (00:06 +0000)]
fix some typos.

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

13 years agoRemove unused bitvectors that record ARM callee-saved registers.
Bob Wilson [Mon, 14 Feb 2011 23:40:38 +0000 (23:40 +0000)]
Remove unused bitvectors that record ARM callee-saved registers.

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

13 years agoMove more fragments of spill weight calculation into CalcSpillWeights.h
Jakob Stoklund Olesen [Mon, 14 Feb 2011 23:15:38 +0000 (23:15 +0000)]
Move more fragments of spill weight calculation into CalcSpillWeights.h

Simplify the spill weight calculation a bit by bypassing
getApproximateInstructionCount() and using LiveInterval::getSize() directly.
This changes the computed spill weights, but only by a constant factor in each
function. It should not affect how spill weights compare against each other, and
so it shouldn't affect code generation.

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

13 years agoDo not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is...
Devang Patel [Mon, 14 Feb 2011 23:03:23 +0000 (23:03 +0000)]
Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.

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

13 years agoSwitch llvm to using comdats. For now always use groups with a single
Rafael Espindola [Mon, 14 Feb 2011 22:23:49 +0000 (22:23 +0000)]
Switch llvm to using comdats. For now always use groups with a single
section.

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

13 years agoPR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.
Bob Wilson [Mon, 14 Feb 2011 22:12:50 +0000 (22:12 +0000)]
PR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.

The i64_buildvector test in this file relies on the alignment of i64 and
f64 types being the same, which is true for Darwin but not AAPCS.

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

13 years agoFix PR8854. Track inserted copies to avoid read before write. Sorry, it's hard to...
Evan Cheng [Mon, 14 Feb 2011 21:50:37 +0000 (21:50 +0000)]
Fix PR8854. Track inserted copies to avoid read before write. Sorry, it's hard to reduce a sensible small test case.

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

13 years agoA fail to match coprocessor number and register number must fail instead of assert.
Bruno Cardoso Lopes [Mon, 14 Feb 2011 21:10:33 +0000 (21:10 +0000)]
A fail to match coprocessor number and register number must fail instead of assert.

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

13 years agoAdd current binary and source directories to the header search list
Oscar Fuentes [Mon, 14 Feb 2011 20:13:58 +0000 (20:13 +0000)]
Add current binary and source directories to the header search list
for all compiler invocations.

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

13 years agorevert my ConstantVector patch, it seems to have made the llvm-gcc
Chris Lattner [Mon, 14 Feb 2011 18:15:46 +0000 (18:15 +0000)]
revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.

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

13 years agoAdd the ClangSACheckersEmitter tablegen backend which will be used for the clang...
Argyrios Kyrtzidis [Mon, 14 Feb 2011 17:58:52 +0000 (17:58 +0000)]
Add the ClangSACheckersEmitter tablegen backend which will be used for the clang static analyzer.

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

13 years agoMove broken HasCommonSymbols to ELFWriter.cpp.
Rafael Espindola [Mon, 14 Feb 2011 16:51:08 +0000 (16:51 +0000)]
Move broken HasCommonSymbols to ELFWriter.cpp.

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

13 years agoFix encoding and add parsing support for the arm/thumb CPS instruction:
Bruno Cardoso Lopes [Mon, 14 Feb 2011 13:09:44 +0000 (13:09 +0000)]
Fix encoding and add parsing support for the arm/thumb CPS instruction:
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.

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

13 years agoSwitch ConstantVector::get to use ArrayRef instead of a pointer+size
Chris Lattner [Mon, 14 Feb 2011 07:55:32 +0000 (07:55 +0000)]
Switch ConstantVector::get to use ArrayRef instead of a pointer+size
idiom.  Change various clients to simplify their code.

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

13 years agoadd a new ArrayRef class. This is intended to replace the idiom we
Chris Lattner [Mon, 14 Feb 2011 07:35:09 +0000 (07:35 +0000)]
add a new ArrayRef class.  This is intended to replace the idiom we
use in many places where we pass a pointer and size to abstract APIs
that can take C arrays, std::vector, SmallVector, etc.  It is to arrays
what StringRef is to strings.

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

13 years agofix PR9210 by implementing some type legalization logic for
Chris Lattner [Mon, 14 Feb 2011 06:30:45 +0000 (06:30 +0000)]
fix PR9210 by implementing some type legalization logic for
vector fp conversions.

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

13 years agofix two comment thinkos
Chris Lattner [Mon, 14 Feb 2011 06:14:42 +0000 (06:14 +0000)]
fix two comment thinkos

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

13 years agoFix typo in comment.
Nick Lewycky [Mon, 14 Feb 2011 06:14:20 +0000 (06:14 +0000)]
Fix typo in comment.

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

13 years agoAdd some statistics to StrongPHIElimination.
Cameron Zwarich [Mon, 14 Feb 2011 02:09:18 +0000 (02:09 +0000)]
Add some statistics to StrongPHIElimination.

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

13 years agoAdd a statistic to PHIElimination tracking the number of critical edges split.
Cameron Zwarich [Mon, 14 Feb 2011 02:09:11 +0000 (02:09 +0000)]
Add a statistic to PHIElimination tracking the number of critical edges split.

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

13 years agomissed a header
Chris Lattner [Sun, 13 Feb 2011 22:30:09 +0000 (22:30 +0000)]
missed a header

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

13 years agoEnhance ComputeMaskedBits to know that aligned frameindexes
Chris Lattner [Sun, 13 Feb 2011 22:25:43 +0000 (22:25 +0000)]
Enhance ComputeMaskedBits to know that aligned frameindexes
have their low bits set to zero.  This allows us to optimize
out explicit stack alignment code like in stack-align.ll:test4 when
it is redundant.

Doing this causes the code generator to start turning FI+cst into
FI|cst all over the place, which is general goodness (that is the
canonical form) except that various pieces of the code generator
don't handle OR aggressively.  Fix this by introducing a new
SelectionDAG::isBaseWithConstantOffset predicate, and using it
in places that are looking for ADD(X,CST).  The ARM backend in
particular was missing a lot of addressing mode folding opportunities
around OR.

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

13 years agoAdapt docs to '-loopsimplify -> -loop-simplify' change
Tobias Grosser [Sun, 13 Feb 2011 20:57:25 +0000 (20:57 +0000)]
Adapt docs to '-loopsimplify -> -loop-simplify' change

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

13 years agofix thinko :)
Chris Lattner [Sun, 13 Feb 2011 19:53:36 +0000 (19:53 +0000)]
fix thinko :)

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

13 years agoRevisit my fix for PR9028: the issue is that DAGCombine was
Chris Lattner [Sun, 13 Feb 2011 19:09:16 +0000 (19:09 +0000)]
Revisit my fix for PR9028: the issue is that DAGCombine was
generating i8 shift amounts for things like i1024 types.  Add
an assert in getNode to prevent this from occuring in the future,
fix the buggy transformation, revert my previous patch, and
document this gotcha in ISDOpcodes.h

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

13 years agoremove a now-unneccesary cast.
Chris Lattner [Sun, 13 Feb 2011 18:30:09 +0000 (18:30 +0000)]
remove a now-unneccesary cast.

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

13 years agoRemove pointless blank line.
Duncan Sands [Sun, 13 Feb 2011 18:11:05 +0000 (18:11 +0000)]
Remove pointless blank line.

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

13 years agoTeach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,
Duncan Sands [Sun, 13 Feb 2011 17:15:40 +0000 (17:15 +0000)]
Teach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,
plus some variations of this.  According to my auto-simplifier this occurs a lot
but usually in combination with max/min idioms.  Because max/min aren't handled
yet this unfortunately doesn't have much effect in the testsuite.

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

13 years agoFix test
Nadav Rotem [Sun, 13 Feb 2011 16:13:16 +0000 (16:13 +0000)]
Fix test

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

13 years agoFix a regression from r125393;
Nadav Rotem [Sun, 13 Feb 2011 15:45:34 +0000 (15:45 +0000)]
Fix a regression from r125393;

It caused a crash in MultiSource/Benchmarks/Bullet.
Opt hit an assertion with "opt -std-compile-opts" because
Constant::getAllOnesValue doesn't know how to handle floats.

This patch added a test to reproduce the problem and a check that the
destination vector is of integer type.

Thank you Benjamin!

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

13 years agowhen legalizing extremely wide shifts, make sure that
Chris Lattner [Sun, 13 Feb 2011 09:10:56 +0000 (09:10 +0000)]
when legalizing extremely wide shifts, make sure that
the shift amounts are in a suitably wide type so that
we don't generate out of range constant shift amounts.

This fixes PR9028.

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

13 years agofix visitShift to properly zero extend the shift amount if the provided operand
Chris Lattner [Sun, 13 Feb 2011 09:02:52 +0000 (09:02 +0000)]
fix visitShift to properly zero extend the shift amount if the provided operand
is narrower than the shift register.  Doing an anyext provides undefined bits in
the top part of the register.

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

13 years agoimprove solaris support, from PR9109, patch by Yuri!
Chris Lattner [Sun, 13 Feb 2011 08:38:44 +0000 (08:38 +0000)]
improve solaris support, from PR9109, patch by Yuri!

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

13 years agoadd PR#
Chris Lattner [Sun, 13 Feb 2011 08:27:31 +0000 (08:27 +0000)]
add PR#

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

13 years agoimplement instcombine folding for things like (x >> c) < 42.
Chris Lattner [Sun, 13 Feb 2011 08:07:21 +0000 (08:07 +0000)]
implement instcombine folding for things like (x >> c) < 42.
We were previously simplifying divisions, but not right shifts!

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

13 years agoadd a helper method.
Chris Lattner [Sun, 13 Feb 2011 08:04:16 +0000 (08:04 +0000)]
add a helper method.

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

13 years agoWrap the struct in an anonymous namespace.
Argyrios Kyrtzidis [Sun, 13 Feb 2011 07:51:19 +0000 (07:51 +0000)]
Wrap the struct in an anonymous namespace.

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

13 years agorefactor some code out into a helper method.
Chris Lattner [Sun, 13 Feb 2011 07:43:07 +0000 (07:43 +0000)]
refactor some code out into a helper method.

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

13 years agoteach SCEV that the scale and addition of an inbounds gep don't NSW.
Chris Lattner [Sun, 13 Feb 2011 03:14:49 +0000 (03:14 +0000)]
teach SCEV that the scale and addition of an inbounds gep don't NSW.
This fixes a FIXME in scev-aa.ll (allowing a new no-alias result) and
generally makes things more precise.

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

13 years agoAdd encodings and mnemonics for FXSAVE64 and FXRSTOR64.
Reid Kleckner [Sat, 12 Feb 2011 23:24:13 +0000 (23:24 +0000)]
Add encodings and mnemonics for FXSAVE64 and FXRSTOR64.

These are just FXSAVE and FXRSTOR with REX.W prefixes.  These versions use
64-bit pointer values instead of 32-bit pointer values in the memory map they
dump and restore.

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

13 years agoPrevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.
Venkatraman Govindaraju [Sat, 12 Feb 2011 19:02:33 +0000 (19:02 +0000)]
Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.

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

13 years agoSimplifyLibCalls: Add missing legalize check on various printf to puts and
Daniel Dunbar [Sat, 12 Feb 2011 18:19:57 +0000 (18:19 +0000)]
SimplifyLibCalls: Add missing legalize check on various printf to puts and
putchar transforms, their return values are not compatible.

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

13 years agotests: FileCheckize
Daniel Dunbar [Sat, 12 Feb 2011 18:19:53 +0000 (18:19 +0000)]
tests: FileCheckize

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

13 years agoPreserve aliases if needed.
Rafael Espindola [Sat, 12 Feb 2011 18:03:13 +0000 (18:03 +0000)]
Preserve aliases if needed.

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

13 years agoAdd a note about SSE4.1 roundss/roundsd.
Benjamin Kramer [Sat, 12 Feb 2011 17:58:16 +0000 (17:58 +0000)]
Add a note about SSE4.1 roundss/roundsd.

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

13 years agoA fix for 9165.
Nadav Rotem [Sat, 12 Feb 2011 14:40:33 +0000 (14:40 +0000)]
A fix for 9165.

The DAGCombiner created illegal BUILD_VECTOR operations.
The patch added a check that either illegal operations are
allowed or that the created operation is legal.

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

13 years agoAsmMatcher custom operand parser failure enhancements.
Jim Grosbach [Sat, 12 Feb 2011 01:34:40 +0000 (01:34 +0000)]
AsmMatcher custom operand parser failure enhancements.

Teach the AsmMatcher handling to distinguish between an error custom-parsing
an operand and a failure to match. The former should propogate the error
upwards, while the latter should continue attempting to parse with
alternative matchers.

Update the ARM asm parser accordingly.

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

13 years agoFix a silly bug I introduced when dropping std::string.
Rafael Espindola [Sat, 12 Feb 2011 00:19:56 +0000 (00:19 +0000)]
Fix a silly bug I introduced when dropping std::string.

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

13 years agoattempt to capture recent discussion about overflow and inbounds geps.
Chris Lattner [Fri, 11 Feb 2011 21:50:52 +0000 (21:50 +0000)]
attempt to capture recent discussion about overflow and inbounds geps.

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

13 years agoAlso fold (A+B) == A -> B == 0 when the add is commuted.
Benjamin Kramer [Fri, 11 Feb 2011 21:46:48 +0000 (21:46 +0000)]
Also fold (A+B) == A -> B == 0 when the add is commuted.

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

13 years agoPer discussion with Dan G, inbounds geps *certainly* can have
Chris Lattner [Fri, 11 Feb 2011 21:43:33 +0000 (21:43 +0000)]
Per discussion with Dan G, inbounds geps *certainly* can have
unsigned overflow (e.g. "gep P, -1"), and while they can have
signed wrap in theoretical situations, modelling an AddRec as
not having signed wrap is going enough for any case we can
think of today.  In the future if this isn't enough, we can
revisit this.  Modeling them as having NUW isn't causing any
known problems either FWIW.

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

13 years agoWhen lowering an inbounds gep, the intermediate adds can have
Chris Lattner [Fri, 11 Feb 2011 21:37:43 +0000 (21:37 +0000)]
When lowering an inbounds gep, the intermediate adds can have
unsigned overflow (e.g. due to a negative array index), but
the scales on array size multiplications are known to not
sign wrap.

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

13 years agoTidy out asm matcher .inc output.
Jim Grosbach [Fri, 11 Feb 2011 21:31:55 +0000 (21:31 +0000)]
Tidy out asm matcher .inc output.

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

13 years agoAdds llvm::sys::path::is_separator() to test whether a char is a path separator
Zhanyong Wan [Fri, 11 Feb 2011 21:24:40 +0000 (21:24 +0000)]
Adds llvm::sys::path::is_separator() to test whether a char is a path separator
on the host OS.  Reviewed by dgregor.

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

13 years agoImplement sdiv & udiv for <4 x i16> and <8 x i8> NEON vector types.
Nate Begeman [Fri, 11 Feb 2011 20:53:29 +0000 (20:53 +0000)]
Implement sdiv & udiv for <4 x i16> and <8 x i8> NEON vector types.
This avoids moving each element to the integer register file and calling __divsi3 etc. on it.

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

13 years agoSimplifySelectOps can only handle selects with a scalar condition. Add a check
Nadav Rotem [Fri, 11 Feb 2011 19:57:47 +0000 (19:57 +0000)]
SimplifySelectOps can only handle selects with a scalar condition. Add a check
that the condition is not a vector.

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

13 years agoFix 9173.
Nadav Rotem [Fri, 11 Feb 2011 19:37:55 +0000 (19:37 +0000)]
Fix 9173.

Add more folding patterns to constant expressions of vector selects and vector
bitcasts.

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

13 years agoFix #9190
Nadav Rotem [Fri, 11 Feb 2011 19:20:37 +0000 (19:20 +0000)]
Fix #9190

The bug happens when the DAGCombiner attempts to optimize one of the patterns
of the SUB opcode. It tries to create a zero of type v2i64. This type is legal
on 32bit machines, but the initializer of this vector (i64) is target dependent.
Currently, the initializer attempts to create an i64 zero constant, which fails.
Added a flag to tell the DAGCombiner to create a legal zero, if we require that
the pass would generate legal types.

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

13 years agoTest commit.
Nadav Rotem [Fri, 11 Feb 2011 19:11:57 +0000 (19:11 +0000)]
Test commit.

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

13 years agoMore whitespace cleanup...
Jim Grosbach [Fri, 11 Feb 2011 19:05:56 +0000 (19:05 +0000)]
More whitespace cleanup...

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

13 years agoRemove trailing whitespace.
Jim Grosbach [Fri, 11 Feb 2011 18:45:44 +0000 (18:45 +0000)]
Remove trailing whitespace.

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

13 years agoPoison the relational operators ==, !=, <, <=, >=, > on llvm::Optional
Douglas Gregor [Fri, 11 Feb 2011 18:13:20 +0000 (18:13 +0000)]
Poison the relational operators ==, !=, <, <=, >=, > on llvm::Optional
objects, since they'll end up using the implicit conversion to "bool"
and causing some very "fun" surprises.

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

13 years agoMake LoopUnswitch preserve ScalarEvolution by just forgetting everything about
Cameron Zwarich [Fri, 11 Feb 2011 06:08:28 +0000 (06:08 +0000)]
Make LoopUnswitch preserve ScalarEvolution by just forgetting everything about
a loop when unswitching it. It only does this in the complex case, because
everything should be fine already in the simple case.

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

13 years agoLoopInstSimplify preserves ScalarEvolution.
Cameron Zwarich [Fri, 11 Feb 2011 06:08:25 +0000 (06:08 +0000)]
LoopInstSimplify preserves ScalarEvolution.

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

13 years agofix dumping of METADATA_ATTACHMENT2 names, patch by Peter Housel!
Chris Lattner [Fri, 11 Feb 2011 05:50:01 +0000 (05:50 +0000)]
fix dumping of METADATA_ATTACHMENT2 names, patch by Peter Housel!

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

13 years agomake ConstantExpr::replaceUsesOfWithOnConstant preserve the inbounds
Chris Lattner [Fri, 11 Feb 2011 05:37:21 +0000 (05:37 +0000)]
make ConstantExpr::replaceUsesOfWithOnConstant preserve the inbounds
flag.  Noticed by Jin Gu Kang!

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

13 years agomake the constantexpr interfaces for inbounds GEPs follow the same style
Chris Lattner [Fri, 11 Feb 2011 05:34:33 +0000 (05:34 +0000)]
make the constantexpr interfaces for inbounds GEPs follow the same style
as other constantexpr flags, reducing redundancy.

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

13 years agoRemove std::string version of getNameWithPrefix.
Rafael Espindola [Fri, 11 Feb 2011 05:23:09 +0000 (05:23 +0000)]
Remove std::string version of getNameWithPrefix.

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

13 years agoDisable this test for now...
Daniel Dunbar [Fri, 11 Feb 2011 02:59:08 +0000 (02:59 +0000)]
Disable this test for now...

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

13 years agoFix buggy fcopysign lowering.
Evan Cheng [Fri, 11 Feb 2011 02:28:55 +0000 (02:28 +0000)]
Fix buggy fcopysign lowering.
This
define float @foo(float %x, float %y) nounwind readnone {
entry:
  %0 = tail call float @copysignf(float %x, float %y) nounwind readnone
  ret float %0
}

Was compiled to:
    vmov     s0, r1
    bic      r0, r0, #-2147483648
    vmov     s1, r0
    vcmpe.f32    s0, #0
    vmrs         apsr_nzcv, fpscr
    it           lt
    vneglt.f32   s1, s1
    vmov         r0, s1
    bx           lr

This fails to copy the sign of -0.0f because it's lost during the float to int
conversion. Also, it's sub-optimal when the inputs are in GPR registers.

Now it uses integer and + or operations when it's profitable. And it's correct!
    lsrs    r1, r1, #31
    bfi     r0, r1, #31, #1
    bx      lr
rdar://8984306

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

13 years agoRemove trailing whitespace.
Jim Grosbach [Fri, 11 Feb 2011 01:21:00 +0000 (01:21 +0000)]
Remove trailing whitespace.

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

13 years agoAdd a test for the LSR issue exposed by r125254.
Cameron Zwarich [Fri, 11 Feb 2011 00:49:27 +0000 (00:49 +0000)]
Add a test for the LSR issue exposed by r125254.

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

13 years agoTolerate degenerate phi nodes that can occur in the middle of optimization
Nick Lewycky [Thu, 10 Feb 2011 23:54:10 +0000 (23:54 +0000)]
Tolerate degenerate phi nodes that can occur in the middle of optimization
passes. Fixes PR9112. Patch by Jakub Staszak!

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

13 years agoIf we can't avoid running loop-simplify twice for now, at least avoid running
Cameron Zwarich [Thu, 10 Feb 2011 23:53:14 +0000 (23:53 +0000)]
If we can't avoid running loop-simplify twice for now, at least avoid running
iv-users twice.

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