oota-llvm.git
10 years agoAdd a test for llvm-ar's m operation.
Rafael Espindola [Thu, 11 Jul 2013 19:09:04 +0000 (19:09 +0000)]
Add a test for llvm-ar's m operation.

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

10 years agoPPC: Add some missing V_SET0 patterns
Hal Finkel [Thu, 11 Jul 2013 17:43:32 +0000 (17:43 +0000)]
PPC: Add some missing V_SET0 patterns

We had patterns to match v4i32 immAllZerosV -> V_SET0, but not patterns for
v8i16 (which occurs in the test case) or v16i8. The same was true for
V_SETALLONES (so I added the associated patterns for those as well).

Another bug found by llvm-stress.

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

10 years agoindvars: Improve LFTR by eliminating truncation when comparing against a constant.
Andrew Trick [Thu, 11 Jul 2013 17:08:59 +0000 (17:08 +0000)]
indvars: Improve LFTR by eliminating truncation when comparing against a constant.

Patch by Michele Scandale!

Adds a special handling of the case where, during the loop exit
condition rewriting, the exit value is a constant of bitwidth lower
than the type of the induction variable: instead of introducing a
trunc operation in order to match correctly the operand types, it
allows to convert the constant value to an equivalent constant,
depending on the initial value of the induction variable and the trip
count, in order have an equivalent comparison between the induction
variable and the new constant.

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

10 years agoPPCDAGToDAGISel::isRunOfOnes should return false on zero
Hal Finkel [Thu, 11 Jul 2013 16:31:51 +0000 (16:31 +0000)]
PPCDAGToDAGISel::isRunOfOnes should return false on zero

This fixes a bug (found by csmith) at -O0 where we attempt to create a RLWIMI
with an out-of-range operand. Most uses of the isRunOfOnes function are guarded
by a condition that the value is not zero. This was not true in two places, and
in both places a zero input would result in an out-of-rage MB value (= 32).

To fix this, isRunOfOnes returns false on a zero input (and I've remove one
now-redundant guard).

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

10 years agoUse SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
Craig Topper [Thu, 11 Jul 2013 16:22:38 +0000 (16:22 +0000)]
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

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

10 years agoAdd back code for supporting old mingw versions. Should bring the bots back.
Rafael Espindola [Thu, 11 Jul 2013 16:11:21 +0000 (16:11 +0000)]
Add back code for supporting old mingw versions. Should bring the bots back.

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

10 years agoDon't use a potentially expensive shift if all we want is one set bit.
Benjamin Kramer [Thu, 11 Jul 2013 16:05:50 +0000 (16:05 +0000)]
Don't use a potentially expensive shift if all we want is one set bit.

No functionality change.

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

10 years agoInsertBefore is the same as AddBefore. Delete it.
Rafael Espindola [Thu, 11 Jul 2013 15:54:53 +0000 (15:54 +0000)]
InsertBefore is the same as AddBefore. Delete it.

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

10 years agoLooks like some versions of mingw don't have errno_t. Use int.
Rafael Espindola [Thu, 11 Jul 2013 15:47:04 +0000 (15:47 +0000)]
Looks like some versions of mingw don't have errno_t. Use int.

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

10 years agoUse move semantics if possible to construct ConstantRanges.
Benjamin Kramer [Thu, 11 Jul 2013 15:37:27 +0000 (15:37 +0000)]
Use move semantics if possible to construct ConstantRanges.

Arithmetic on ConstantRanges creates a lot of large temporary APInts that
benefit from move semantics.

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

10 years agoFix a FIXME about the format and add a test.
Rafael Espindola [Thu, 11 Jul 2013 15:35:23 +0000 (15:35 +0000)]
Fix a FIXME about the format and add a test.

While at it, use strftime on Unix too and use the thread safe versions
of localtime.

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

10 years agoLoopVectorize: Vectorize all accesses in address space zero with unit stride
Arnold Schwaighofer [Thu, 11 Jul 2013 15:21:55 +0000 (15:21 +0000)]
LoopVectorize: Vectorize all accesses in address space zero with unit stride

We can vectorize them because in the case where we wrap in the address space the
unvectorized code would have had to access a pointer value of zero which is
undefined behavior in address space zero according to the LLVM IR semantics.
(Thank you Duncan, for pointing this out to me).

Fixes PR16592.

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

10 years agoMerge these tests.
Rafael Espindola [Thu, 11 Jul 2013 13:44:10 +0000 (13:44 +0000)]
Merge these tests.

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

10 years agoUse a more unique name to avoid conflicting with directory.ll tests when running
Rafael Espindola [Thu, 11 Jul 2013 13:31:38 +0000 (13:31 +0000)]
Use a more unique name to avoid conflicting with directory.ll tests when running
in parallel.

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

10 years agoAdd a test for llvm-ar's 'd' operation.
Rafael Espindola [Thu, 11 Jul 2013 13:24:27 +0000 (13:24 +0000)]
Add a test for llvm-ar's 'd' operation.

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

10 years agoAdd tests for the 'x' operation.
Rafael Espindola [Thu, 11 Jul 2013 13:13:09 +0000 (13:13 +0000)]
Add tests for the 'x' operation.

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

10 years agoRemove the 'N' modifier from llvm-ar.
Rafael Espindola [Thu, 11 Jul 2013 13:03:27 +0000 (13:03 +0000)]
Remove the 'N' modifier from llvm-ar.

* It is not present on OS X.
* It is untested.
* It is not needed for using ar in a build system.

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

10 years agoDelete dead code.
Rafael Espindola [Thu, 11 Jul 2013 12:54:11 +0000 (12:54 +0000)]
Delete dead code.

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

10 years agoRemove support for truncating names in archives.
Rafael Espindola [Thu, 11 Jul 2013 12:38:02 +0000 (12:38 +0000)]
Remove support for truncating names in archives.

* All systems we support have some form of long name support.
* The options has different names and semantics in different implementations
  ('f' on gnu, 'T' on OS X), which makes it unlikely it is normally used on
  build systems.
* It was completely untested.

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

10 years agoSync llvm-ar's help string with the options it supports.
Rafael Espindola [Thu, 11 Jul 2013 12:28:36 +0000 (12:28 +0000)]
Sync llvm-ar's help string with the options it supports.

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

10 years agoReduce the number of indirections in the attributes implementation.
Benjamin Kramer [Thu, 11 Jul 2013 12:13:16 +0000 (12:13 +0000)]
Reduce the number of indirections in the attributes implementation.

- Coallocate entires for AttributeSetImpls and Nodes after the class itself.
- Remove mutable iterators from immutable classes.
- Remove unused context field from AttributeImpl.
- Derive Enum/Align/String attribute implementations from AttributeImpl instead
  of having a whole new inheritance tree for them.
- Derive AlignAttributeImpl from EnumAttributeImpl.

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

10 years ago[SystemZ] Add testcase missing from r186073
Richard Sandiford [Thu, 11 Jul 2013 09:10:38 +0000 (09:10 +0000)]
[SystemZ] Add testcase missing from r186073

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

10 years ago[SystemZ] Use zeroing form of RISBG for shift-and-AND sequences
Richard Sandiford [Thu, 11 Jul 2013 09:10:09 +0000 (09:10 +0000)]
[SystemZ] Use zeroing form of RISBG for shift-and-AND sequences

Extend r186072 to handle shifts and ANDs.

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

10 years ago[SystemZ] Use zeroing form of RISBG for some AND sequences
Richard Sandiford [Thu, 11 Jul 2013 08:59:12 +0000 (08:59 +0000)]
[SystemZ] Use zeroing form of RISBG for some AND sequences

RISBG can handle some ANDs for which no AND IMMEDIATE exists.
It also acts as a three-operand AND for some cases where an
AND IMMEDIATE could be used instead.

It might be worth adding a pass to replace RISBG with AND IMMEDIATE
in cases where the register operands end up being the same and where
AND IMMEDIATE is smaller.

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

10 years ago[SystemZ] Allow 8-bit operands to RISBG
Richard Sandiford [Thu, 11 Jul 2013 08:37:13 +0000 (08:37 +0000)]
[SystemZ] Allow 8-bit operands to RISBG

RISBG has three 8-bit operands (I3, I4 and I5).  I'd originally
restricted all three to 6 bits, since that's the only range we intended
to use at the time.  However, the top bit of I4 acts as a "zero" flag for
RISBG, while the top bit of I3 acts as a "test" flag for RNSBG & co.
This patch therefore allows them to have the full 8-bit range.
I've left the fifth operand as a 6-bit value for now since the
upper 2 bits have no defined meaning.

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

10 years agoTryToSimplifyUncondBranchFromEmptyBlock was checking that any common
Duncan Sands [Thu, 11 Jul 2013 08:28:20 +0000 (08:28 +0000)]
TryToSimplifyUncondBranchFromEmptyBlock was checking that any common
predecessors of the two blocks it is attempting to merge supply the
same incoming values to any phi in the successor block.  This change
allows merging in the case where there is one or more incoming values
that are undef.  The undef values are rewritten to match the non-undef
value that flows from the other edge.  Patch by Mark Lacey.

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

10 years agoInitialize AsmPrinter::MF in the constructor
Hal Finkel [Thu, 11 Jul 2013 06:41:14 +0000 (06:41 +0000)]
Initialize AsmPrinter::MF in the constructor

MF is normally initialized in AsmPrinter::SetupMachineFunction, but if the file
contains only globals (no functions), then we need this to be initialized
because, when encountering an error, lowerConstant() references it.

This should fix the non-deterministic failures of
test/CodeGen/X86/nonconst-static-iv.ll, etc.

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

10 years agoRegScavenger should not exclude undef uses
Hal Finkel [Thu, 11 Jul 2013 05:55:57 +0000 (05:55 +0000)]
RegScavenger should not exclude undef uses

When computing currently-live registers, the register scavenger excludes undef
uses. As a result, undef uses are ignored when computing the restore points of
registers spilled into the emergency slots. While the register scavenger
normally excludes from consideration, when scavenging, registers used by the
current instruction, we need to not exclude undef uses. Otherwise, we might end
up requiring more emergency spill slots than we have (in the case where the
undef use *is* the currently-spilled register).

Another bug found by llvm-stress.

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

10 years agoFix indentation. No functional change.
Craig Topper [Thu, 11 Jul 2013 05:39:44 +0000 (05:39 +0000)]
Fix indentation. No functional change.

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

10 years agoFix a warning.
Nadav Rotem [Thu, 11 Jul 2013 05:39:02 +0000 (05:39 +0000)]
Fix a warning.

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

10 years agoConsolidate more lit tests.
Nadav Rotem [Thu, 11 Jul 2013 05:15:11 +0000 (05:15 +0000)]
Consolidate more lit tests.

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

10 years agoConsolidate some of the lit tests.
Nadav Rotem [Thu, 11 Jul 2013 05:11:33 +0000 (05:11 +0000)]
Consolidate some of the lit tests.

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

10 years agoConsolidate some of the lit tests.
Nadav Rotem [Thu, 11 Jul 2013 05:01:50 +0000 (05:01 +0000)]
Consolidate some of the lit tests.

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

10 years agoSLPVectorizer: refactor the code that places extracts. Place the code that decides...
Nadav Rotem [Thu, 11 Jul 2013 04:54:05 +0000 (04:54 +0000)]
SLPVectorizer: refactor the code that places extracts. Place the code that decides where to put extracts in the build-tree phase. This allows us to take the cost of the extracts into account.

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

10 years agoTeach TailRecursionElimination to handle certain cases of nocapture escaping allocas.
Michael Gottesman [Thu, 11 Jul 2013 04:40:01 +0000 (04:40 +0000)]
Teach TailRecursionElimination to handle certain cases of nocapture escaping allocas.

Without the changes introduced into this patch, if TRE saw any allocas at all,
TRE would not perform TRE *or* mark callsites with the tail marker.

Because TRE runs after mem2reg, this inadequacy is not a death sentence. But
given a callsite A without escaping alloca argument, A may not be able to have
the tail marker placed on it due to a separate callsite B having a write-back
parameter passed in via an argument with the nocapture attribute.

Assume that B is the only other callsite besides A and B only has nocapture
escaping alloca arguments (*NOTE* B may have other arguments that are not passed
allocas). In this case not marking A with the tail marker is unnecessarily
conservative since:

  1. By assumption A has no escaping alloca arguments itself so it can not
     access the caller's stack via its arguments.

  2. Since all of B's escaping alloca arguments are passed as parameters with
     the nocapture attribute, we know that B does not stash said escaping
     allocas in a manner that outlives B itself and thus could be accessed
     indirectly by A.

With the changes introduced by this patch:

  1. If we see any escaping allocas passed as a capturing argument, we do
     nothing and bail early.

  2. If we do not see any escaping allocas passed as captured arguments but we
     do see escaping allocas passed as nocapture arguments:

       i. We do not perform TRE to avoid PR962 since the code generator produces
          significantly worse code for the dynamic allocas that would be created
          by the TRE algorithm.

       ii. If we do not return twice, mark call sites without escaping allocas
           with the tail marker. *NOTE* This excludes functions with escaping
           nocapture allocas.

  3. If we do not see any escaping allocas at all (whether captured or not):

       i. If we do not have usage of setjmp, mark all callsites with the tail
          marker.

       ii. If there are no dynamic/variable sized allocas in the function,
           attempt to perform TRE on all callsites in the function.

Based off of a patch by Nick Lewycky.

rdar://14324281.

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

10 years agoMove r186044 tests into CodeGen/X86
Hal Finkel [Thu, 11 Jul 2013 01:55:55 +0000 (01:55 +0000)]
Move r186044 tests into CodeGen/X86

I had thought that these tests could be target-neutral, but in practice this is
not the case (on some targets, like Hexagon and Darwin), they trigger an assert
(a different assert than the one that r186044 fixes).

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

10 years agoSet REQUIRES shell on the test cases for r186044
Hal Finkel [Wed, 10 Jul 2013 23:25:03 +0000 (23:25 +0000)]
Set REQUIRES shell on the test cases for r186044

Trying to fix the i686-mingw32 build.

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

10 years agoXFAIL the test cases for r186044 on Hexagon
Hal Finkel [Wed, 10 Jul 2013 23:11:14 +0000 (23:11 +0000)]
XFAIL the test cases for r186044 on Hexagon

For some reason, the Hexagon backend does not reject these invalid static
initializer expressions, but instead crashes in AsmPrinter::EmitGlobalConstant.

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

10 years agoDon't assert if we can't constant fold extract/insertvalue
Hal Finkel [Wed, 10 Jul 2013 22:51:01 +0000 (22:51 +0000)]
Don't assert if we can't constant fold extract/insertvalue

A non-constant-foldable static initializer expression containing insertvalue or
extractvalue had been causing an assert:

  Constants.cpp:1971: Assertion `FC && "ExtractValue constant expr couldn't be
                                 folded!"' failed.

Now we report a more-sensible "Unsupported expression in static initializer"
error instead.

Fixes PR15417.

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

10 years agoRemove this test for now.
Rafael Espindola [Wed, 10 Jul 2013 22:15:29 +0000 (22:15 +0000)]
Remove this test for now.

It is not reliable to depend on the output of llvm_unreachable. The original
change will have proper tests when llvm-ar moves to lib/Object (soon).

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

10 years agoCommandLine.rst: remove tiny bit of bad mark-up
Hans Wennborg [Wed, 10 Jul 2013 22:09:22 +0000 (22:09 +0000)]
CommandLine.rst: remove tiny bit of bad mark-up

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

10 years agoFind the symbol table on archives created on OS X.
Rafael Espindola [Wed, 10 Jul 2013 22:07:59 +0000 (22:07 +0000)]
Find the symbol table on archives created on OS X.

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

10 years agoMove tests from test/Archive to test/Object.
Rafael Espindola [Wed, 10 Jul 2013 21:47:16 +0000 (21:47 +0000)]
Move tests from test/Archive to test/Object.

There is no lib/Archive anymore and some archive tests were in test/Archive and
others in test/Object. Since archive is just one of the formats supported by
lib/Object, test/Object is probably the best location.

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

10 years agoAdd a comment.
Adrian Prantl [Wed, 10 Jul 2013 21:08:02 +0000 (21:08 +0000)]
Add a comment.

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

10 years agoPut ELF COMDAT relocations into the relevant COMDAT group.
Tim Northover [Wed, 10 Jul 2013 20:58:17 +0000 (20:58 +0000)]
Put ELF COMDAT relocations into the relevant COMDAT group.

Patch from Ð˜Ð³Ð¾Ñ€ÑŒ ÐŸÐ°ÑˆÐµÐ²  (I do hope we support utf-8 commit messages; I
also hope he'll forgive me for transliterating it as Igor Pashev in
case things go horribly wrong).

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

10 years agoRemove trailing whitespac
Stephen Lin [Wed, 10 Jul 2013 20:47:39 +0000 (20:47 +0000)]
Remove trailing whitespac

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

10 years agoAdd a testcase for r186014.
Adrian Prantl [Wed, 10 Jul 2013 20:43:29 +0000 (20:43 +0000)]
Add a testcase for r186014.

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

10 years agoDon't crash in 'llvm -s' when an archive has no symtab.
Rafael Espindola [Wed, 10 Jul 2013 20:14:22 +0000 (20:14 +0000)]
Don't crash in 'llvm -s' when an archive has no symtab.

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

10 years agoFix %t typo in Ocaml bindings test.
Reid Kleckner [Wed, 10 Jul 2013 18:55:06 +0000 (18:55 +0000)]
Fix %t typo in Ocaml bindings test.

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

10 years ago[objc-arc] Changed 'mode: c++' => 'C++' at Nick Lewycky's suggestion. Also removed...
Michael Gottesman [Wed, 10 Jul 2013 18:49:00 +0000 (18:49 +0000)]
[objc-arc] Changed 'mode: c++' => 'C++' at Nick Lewycky's suggestion. Also removed unnecessary mode: c++ lines from .cpp files.

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

10 years agoChanged "mode: c++" => "C++" at the suggestion of Nick Lewycky.
Michael Gottesman [Wed, 10 Jul 2013 18:40:49 +0000 (18:40 +0000)]
Changed "mode: c++" => "C++" at the suggestion of Nick Lewycky.

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

10 years agoUpdate doxygen comment to match renamed parameters.
Benjamin Kramer [Wed, 10 Jul 2013 18:01:16 +0000 (18:01 +0000)]
Update doxygen comment to match renamed parameters.

Found by -Wdocumentation.

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

10 years agoMemoryBuffer::getFile handles zero sized files, no need to duplicate the test.
Rafael Espindola [Wed, 10 Jul 2013 17:30:39 +0000 (17:30 +0000)]
MemoryBuffer::getFile handles zero sized files, no need to duplicate the test.

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

10 years agoReplacing an empty switch with its moral equivalent. No functional changes intended.
Aaron Ballman [Wed, 10 Jul 2013 17:19:22 +0000 (17:19 +0000)]
Replacing an empty switch with its moral equivalent.  No functional changes intended.

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

10 years agoUse status to implement file_size.
Rafael Espindola [Wed, 10 Jul 2013 17:16:40 +0000 (17:16 +0000)]
Use status to implement file_size.

The status function is already using a syscall that returns the file size.
Remember it and implement file_size as a simple wrapper.

No functionally change, but clients that already use status now can avoid
calling file_size.

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

10 years agoUse the appropriate unsigned int type for the offset.
Adrian Prantl [Wed, 10 Jul 2013 16:56:52 +0000 (16:56 +0000)]
Use the appropriate unsigned int type for the offset.

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

10 years agoSafeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.
Adrian Prantl [Wed, 10 Jul 2013 16:56:47 +0000 (16:56 +0000)]
Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.

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

10 years agoSimplify code.
Craig Topper [Wed, 10 Jul 2013 16:38:35 +0000 (16:38 +0000)]
Simplify code.

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

10 years agoR600/SI: Initial local memory support
Michel Danzer [Wed, 10 Jul 2013 16:37:07 +0000 (16:37 +0000)]
R600/SI: Initial local memory support

Enough for the radeonsi driver to use it for calculating derivatives.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186012 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Add pattern for the AMDGPU.barrier.local intrinsic
Michel Danzer [Wed, 10 Jul 2013 16:36:57 +0000 (16:36 +0000)]
R600/SI: Add pattern for the AMDGPU.barrier.local intrinsic

lit test coverage to follow in the next commit.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186011 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Add intrinsic for retrieving the current thread ID
Michel Danzer [Wed, 10 Jul 2013 16:36:52 +0000 (16:36 +0000)]
R600/SI: Add intrinsic for retrieving the current thread ID

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186010 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Initial support for LDS/GDS instructions
Michel Danzer [Wed, 10 Jul 2013 16:36:43 +0000 (16:36 +0000)]
R600/SI: Initial support for LDS/GDS instructions

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186009 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Add intrinsics for texture sampling with user derivatives
Michel Danzer [Wed, 10 Jul 2013 16:36:36 +0000 (16:36 +0000)]
R600/SI: Add intrinsics for texture sampling with user derivatives

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186008 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove llvm/ADT/NullablePtr.h, there are no uses of it in-tree.
Argyrios Kyrtzidis [Wed, 10 Jul 2013 15:33:20 +0000 (15:33 +0000)]
Remove llvm/ADT/NullablePtr.h, there are no uses of it in-tree.

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

10 years agoPPC: Add a better comment about the i64 FI fixup
Hal Finkel [Wed, 10 Jul 2013 15:29:01 +0000 (15:29 +0000)]
PPC: Add a better comment about the i64 FI fixup

In discussing this change with Bill Schmidt, it was decided that the original
comment about negative FIs was incorrect. We'll still exclude them for now, but
now with a more-accurate explanation.

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

10 years agoReverting commit r185999 due to buildboot failure.
Vladimir Medic [Wed, 10 Jul 2013 12:27:25 +0000 (12:27 +0000)]
Reverting commit r185999 due to buildboot failure.

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

10 years agoReverting commit r185999 due to buildboot failure.
Vladimir Medic [Wed, 10 Jul 2013 12:26:26 +0000 (12:26 +0000)]
Reverting commit r185999 due to buildboot failure.

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

10 years agoAdd support for Mips break and syscall insructions. The corresponding test cases...
Vladimir Medic [Wed, 10 Jul 2013 10:18:10 +0000 (10:18 +0000)]
Add support for Mips break and syscall insructions. The corresponding test cases are added.

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

10 years agoFix typo
Stephen Lin [Wed, 10 Jul 2013 01:57:39 +0000 (01:57 +0000)]
Fix typo

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

10 years agoExplicitly define ARMISelLowering::isFMAFasterThanFMulAndFAdd. No functionality change.
Stephen Lin [Wed, 10 Jul 2013 01:54:24 +0000 (01:54 +0000)]
Explicitly define ARMISelLowering::isFMAFasterThanFMulAndFAdd. No functionality change.

Currently ARM is the only backend that supports FMA instructions (for at least some subtargets) but does not implement this virtual, so FMAs are never generated except from explicit fma intrinsic calls. Apparently this is due to the fact that it supports both fused (one rounding step) and unfused (two rounding step) multiply + add instructions. This patch clarifies that this the case without changing behavior by implementing the virtual function to simply return false, as the default TargetLoweringBase version does.

It is possible that some cpus perform the fused version faster than the unfused version and vice-versa, so the function implementation should be revisited if hard data is found.

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

10 years agoUn-break the buildbot by tweaking the indirection flag.
Adrian Prantl [Wed, 10 Jul 2013 01:53:37 +0000 (01:53 +0000)]
Un-break the buildbot by tweaking the indirection flag.
Pulled in a testcase from the debuginfo-test suite.

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

10 years agoDocument a known limitation of the status quo.
Adrian Prantl [Wed, 10 Jul 2013 01:53:30 +0000 (01:53 +0000)]
Document a known limitation of the status quo.

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

10 years agoCorrect comment.
Duncan Sands [Wed, 10 Jul 2013 00:52:41 +0000 (00:52 +0000)]
Correct comment.

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

10 years agoFix comment.
Eric Christopher [Tue, 9 Jul 2013 23:48:45 +0000 (23:48 +0000)]
Fix comment.

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

10 years agoARM: Fix incorrect pack pattern for thumb2
Jim Grosbach [Tue, 9 Jul 2013 22:59:22 +0000 (22:59 +0000)]
ARM: Fix incorrect pack pattern for thumb2

Propagate the fix from r185712 to Thumb2 codegen as well. Original
commit message applies here as well:

A "pkhtb x, x, y asr #num" uses the lower 16 bits of "y asr #num" and
packs them in the bottom half of "x". An arithmetic and logic shift are
only equivalent in this context if the shift amount is 16. We would be
shifting in ones into the bottom 16bits instead of zeros if "y" is
negative.

rdar://14338767

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

10 years agoImplement categories for special case lists.
Peter Collingbourne [Tue, 9 Jul 2013 22:03:17 +0000 (22:03 +0000)]
Implement categories for special case lists.

A special case list can now specify categories for specific globals,
which can be used to instruct an instrumentation pass to treat certain
functions or global variables in a specific way, such as by omitting
certain aspects of instrumentation while keeping others, or informing
the instrumentation pass that a specific uninstrumentable function
has certain semantics, thus allowing the pass to instrument callers
according to those semantics.

For example, AddressSanitizer now uses the "init" category instead of
global-init prefixes for globals whose initializers should not be
instrumented, but which in all other respects should be instrumented.

The motivating use case is DataFlowSanitizer, which will have a
number of different categories for uninstrumentable functions, such
as "functional" which specifies that a function has pure functional
semantics, or "discard" which indicates that a function's return
value should not be labelled.

Differential Revision: http://llvm-reviews.chandlerc.com/D1092

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

10 years agoAdd some SpecialCaseList unit tests.
Peter Collingbourne [Tue, 9 Jul 2013 22:03:12 +0000 (22:03 +0000)]
Add some SpecialCaseList unit tests.

Differential Revision: http://llvm-reviews.chandlerc.com/D1091

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

10 years agoIntroduce a SpecialCaseList ctor which takes a MemoryBuffer to make
Peter Collingbourne [Tue, 9 Jul 2013 22:03:09 +0000 (22:03 +0000)]
Introduce a SpecialCaseList ctor which takes a MemoryBuffer to make
it more unit testable, and fix memory leak in the other ctor.

Differential Revision: http://llvm-reviews.chandlerc.com/D1090

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

10 years agoRename BlackList class to SpecialCaseList and move it to Transforms/Utils.
Peter Collingbourne [Tue, 9 Jul 2013 22:02:49 +0000 (22:02 +0000)]
Rename BlackList class to SpecialCaseList and move it to Transforms/Utils.

Differential Revision: http://llvm-reviews.chandlerc.com/D1089

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

10 years agoInstSimplify: X >> X -> 0
David Majnemer [Tue, 9 Jul 2013 22:01:22 +0000 (22:01 +0000)]
InstSimplify: X >> X -> 0

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

10 years agomove test into the appropriate subdir.
Adrian Prantl [Tue, 9 Jul 2013 21:44:11 +0000 (21:44 +0000)]
move test into the appropriate subdir.

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

10 years agoTypo.
Adrian Prantl [Tue, 9 Jul 2013 21:44:06 +0000 (21:44 +0000)]
Typo.

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

10 years agoFix PR16571, which is a bug in the code that checks that all of the types in the...
Nadav Rotem [Tue, 9 Jul 2013 21:38:08 +0000 (21:38 +0000)]
Fix PR16571, which is a bug in the code that checks that all of the types in the bundle are uniform.

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

10 years agoReapply an improved version of r180816/180817.
Adrian Prantl [Tue, 9 Jul 2013 20:28:37 +0000 (20:28 +0000)]
Reapply an improved version of r180816/180817.

Change the informal convention of DBG_VALUE machine instructions so that
we can express a register-indirect address with an offset of 0.
The old convention was that a DBG_VALUE is a register-indirect value if
the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
is register-indirect if the first operand is a register and the second
operand is an immediate. For plain register values the combination reg,
reg is used. MachineInstrBuilder::BuildMI knows how to build the new
DBG_VALUES.

rdar://problem/13658587

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

10 years agoFixed up the comments in FastISel.h so that they conform to the LLVM style guide.
Michael Gottesman [Tue, 9 Jul 2013 20:08:46 +0000 (20:08 +0000)]
Fixed up the comments in FastISel.h so that they conform to the LLVM style guide.

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

10 years agoAdded "mode: c++" to FastISel.h header.
Michael Gottesman [Tue, 9 Jul 2013 20:00:25 +0000 (20:00 +0000)]
Added "mode: c++" to FastISel.h header.

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

10 years agoAppease buildbots after r185956: just set -mcpu explicitly, as it should have been...
Stephen Lin [Tue, 9 Jul 2013 19:27:10 +0000 (19:27 +0000)]
Appease buildbots after r185956: just set -mcpu explicitly, as it should have been from the beginning.

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

10 years agoAppease Atom buildbot after r185956 (explicitly turn on AVX)
Stephen Lin [Tue, 9 Jul 2013 18:55:52 +0000 (18:55 +0000)]
Appease Atom buildbot after r185956 (explicitly turn on AVX)

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

10 years agoWidenVecRes_BUILD_VECTOR must use the first operand's type
Hal Finkel [Tue, 9 Jul 2013 18:55:10 +0000 (18:55 +0000)]
WidenVecRes_BUILD_VECTOR must use the first operand's type

Because integer BUILD_VECTOR operands may have a larger type than the result's
vector element type, and all operands must have the same type, when widening a
BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but
rather must use the type of the existing operands.

Another bug found by llvm-stress.

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

10 years ago[PowerPC] Better fix for PR16556.
Bill Schmidt [Tue, 9 Jul 2013 18:50:20 +0000 (18:50 +0000)]
[PowerPC] Better fix for PR16556.

A more complete example of the bug in PR16556 was recently provided,
showing that the previous fix was not sufficient.  The previous fix is
reverted herein.

The real problem is that ReplaceNodeResults() uses LowerFP_TO_INT as
custom lowering for FP_TO_SINT during type legalization, without
checking whether the input type is handled by that routine.
LowerFP_TO_INT requires the input to be f32 or f64, so we fail when
the input is ppcf128.

I'm leaving the test case from the initial fix (r185821) in place, and
adding the new test as another crash-only check.

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

10 years agoAttempt to appease buildbot after r185956 by explicitly turning setting -fma,-fma4...
Stephen Lin [Tue, 9 Jul 2013 18:41:43 +0000 (18:41 +0000)]
Attempt to appease buildbot after r185956 by explicitly turning setting -fma,-fma4 attrs (I'm assuming they're set because the bot is running on machine that has one or the other.)

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

10 years agoAArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and all
Stephen Lin [Tue, 9 Jul 2013 18:16:56 +0000 (18:16 +0000)]
AArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and all
in-tree implementations of TargetLoweringBase::isFMAFasterThanMulAndAdd in
order to resolve the following issues with fmuladd (i.e. optional FMA)
intrinsics:

1. On X86(-64) targets, ISD::FMA nodes are formed when lowering fmuladd
intrinsics even if the subtarget does not support FMA instructions, leading
to laughably bad code generation in some situations.

2. On AArch64 targets, ISD::FMA nodes are formed for operations on fp128,
resulting in a call to a software fp128 FMA implementation.

3. On PowerPC targets, FMAs are not generated from fmuladd intrinsics on types
like v2f32, v8f32, v4f64, etc., even though they promote, split, scalarize,
etc. to types that support hardware FMAs.

The function has also been slightly renamed for consistency and to force a
merge/build conflict for any out-of-tree target implementing it. To resolve,
see comments and fixed in-tree examples.

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

10 years agoDon't crash in SE dealing with ashr x, -1
Hal Finkel [Tue, 9 Jul 2013 18:16:16 +0000 (18:16 +0000)]
Don't crash in SE dealing with ashr x, -1

ScalarEvolution::getSignedRange uses ComputeNumSignBits from ValueTracking on
ashr instructions. ComputeNumSignBits can return zero, but this case was not
handled correctly by the code in getSignedRange which was calling:
  APInt::getSignedMinValue(BitWidth).ashr(NS - 1)
with NS = 0, resulting in an assertion failure in APInt::ashr.

Now, we just return the conservative result (as with NS == 1).

Another bug found by llvm-stress.

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

10 years agoValueTracking: Fix bugs in isKnownToBeAPowerOfTwo
David Majnemer [Tue, 9 Jul 2013 18:11:10 +0000 (18:11 +0000)]
ValueTracking: Fix bugs in isKnownToBeAPowerOfTwo

(add nsw x, (and x, y)) isn't a power of two if x is zero, it's zero
(add nsw x, (xor x, y)) isn't a power of two if y has bits set that aren't set in x

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

10 years agoSet the default insert point to the first instruction, and not to end()
Nadav Rotem [Tue, 9 Jul 2013 17:55:36 +0000 (17:55 +0000)]
Set the default insert point to the first instruction, and not to end()

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

10 years agoIRBuilder: add an assertion that checks if we try to get a debug loc from ->end();
Nadav Rotem [Tue, 9 Jul 2013 17:54:22 +0000 (17:54 +0000)]
IRBuilder: add an assertion that checks if we try to get a debug loc from ->end();

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

10 years agoDAGCombine tryFoldToZero cannot create illegal types after type legalization
Hal Finkel [Tue, 9 Jul 2013 17:02:45 +0000 (17:02 +0000)]
DAGCombine tryFoldToZero cannot create illegal types after type legalization

When folding sub x, x (and other similar constructs), where x is a vector, the
result is a vector of zeros. After type legalization, make sure that the input
zero elements have a legal type. This type may be larger than the result's
vector element type.

This was another bug found by llvm-stress.

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

10 years ago[PowerPC] Revert r185476 and fix up TLS variant kinds
Ulrich Weigand [Tue, 9 Jul 2013 16:41:09 +0000 (16:41 +0000)]
[PowerPC] Revert r185476 and fix up TLS variant kinds

In the commit message to r185476 I wrote:

>The PowerPC-specific modifiers VK_PPC_TLSGD and VK_PPC_TLSLD
>correspond exactly to the generic modifiers VK_TLSGD and VK_TLSLD.
>This causes some confusion with the asm parser, since VK_PPC_TLSGD
>is output as @tlsgd, which is then read back in as VK_TLSGD.
>
>To avoid this confusion, this patch removes the PowerPC-specific
>modifiers and uses the generic modifiers throughout.  (The only
>drawback is that the generic modifiers are printed in upper case
>while the usual convention on PowerPC is to use lower-case modifiers.
>But this is just a cosmetic issue.)

This was unfortunately incorrect, there is is fact another,
serious drawback to using the default VK_TLSLD/VK_TLSGD
variant kinds: using these causes ELFObjectWriter::RelocNeedsGOT
to return true, which in turn causes the ELFObjectWriter to emit
an undefined reference to _GLOBAL_OFFSET_TABLE_.

This is a problem on powerpc64, because it uses the TOC instead
of the GOT, and the linker does not provide _GLOBAL_OFFSET_TABLE_,
so the symbol remains undefined.  This means shared libraries
using TLS built with the integrated assembler are currently
broken.

While the whole RelocNeedsGOT / _GLOBAL_OFFSET_TABLE_ situation
probably ought to be properly fixed at some point, for now I'm
simply reverting the r185476 commit.  Now this in turn exposes
the breakage of handling @tlsgd/@tlsld in the asm parser that
this check-in was originally intended to fix.

To avoid this regression, I'm also adding a different fix for
this problem: while common code now parses @tlsgd as VK_TLSGD,
a special hack in the asm parser translates this code to the
platform-specific VK_PPC_TLSGD that the back-end now expects.
While this is not really pretty, it's self-contained and
shouldn't hurt anything else for now.  One the underlying
problem is fixed, this hack can be reverted again.

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

10 years agoR600: Do not predicated basic block with multiple alu clause
Vincent Lejeune [Tue, 9 Jul 2013 15:03:33 +0000 (15:03 +0000)]
R600: Do not predicated basic block with multiple alu clause

Test is not included as it is several 1000 lines long.
To test this functionnality, a test case must generate at least 2 ALU clauses,
where an ALU clause is ~110 instructions long.

NOTE: This is a candidate for the stable branch.

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

10 years agoR600: Fix a rare bug where swizzle optimization returns wrong values
Vincent Lejeune [Tue, 9 Jul 2013 15:03:25 +0000 (15:03 +0000)]
R600: Fix a rare bug where swizzle optimization returns wrong values

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