oota-llvm.git
11 years agoDebugInfo: Simplify gnu_pubnames index computation.
David Blaikie [Thu, 19 Sep 2013 18:39:59 +0000 (18:39 +0000)]
DebugInfo: Simplify gnu_pubnames index computation.

Names open to bikeshedding. Could switch back to the constants being
unshifted, but this way seems a bit easier to work with.

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

11 years agoX86 horizontal vector reduction cost model
Yi Jiang [Thu, 19 Sep 2013 17:48:48 +0000 (17:48 +0000)]
X86 horizontal vector reduction cost model

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

11 years agoRemove unnecessary conditional operators performing bool->bool conversion.
David Blaikie [Thu, 19 Sep 2013 17:33:35 +0000 (17:33 +0000)]
Remove unnecessary conditional operators performing bool->bool conversion.

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

11 years agoFix a typo and simplify a boolean expression.
David Blaikie [Thu, 19 Sep 2013 17:27:48 +0000 (17:27 +0000)]
Fix a typo and simplify a boolean expression.

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

11 years agoGVN proceeds in the presence of dead code.
Shuxin Yang [Thu, 19 Sep 2013 17:22:51 +0000 (17:22 +0000)]
GVN proceeds in the presence of dead code.

This is how it ignores the dead code:
1) When a dead branch target, say block B, is identified, all the
    blocks dominated by B is dead as well.

2) The PHIs of those blocks in dominance-frontier(B) is updated such
   that the operands corresponding to dead predecessors are replaced
   by "UndefVal".

   Using lattice's jargon, the "UndefVal" is the "Top" in essence.
   Phi node like this "phi(v1 bb1, undef xx)" will be optimized into
   "v1" if v1 is constant, or v1 is an instruction which dominate this
   PHI node.

3) When analyzing the availability of a load L, all dead mem-ops which
   L depends on disguise as a load which evaluate exactly same value as L.

4) The dead mem-ops will be materialized as "UndefVal" during code motion.

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

11 years agomsbuild: Set _MSC_VER to match the CRT we're using
Reid Kleckner [Thu, 19 Sep 2013 17:18:35 +0000 (17:18 +0000)]
msbuild: Set _MSC_VER to match the CRT we're using

Various Windows SDK headers use _MSC_VER values to figure out what
version of the VC++ headers they're using, in particular for SAL macros.

Patch by Paul Hampson!

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

11 years ago Add function DominatorTree::getDescendants().
Shuxin Yang [Thu, 19 Sep 2013 17:18:35 +0000 (17:18 +0000)]
  Add function DominatorTree::getDescendants().

  As its name suggests, this function will return all basic blocks
dominated by a given block.

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

11 years agoInclude an LLVM-vs2012_xp toolset in the MSBuild integration
Reid Kleckner [Thu, 19 Sep 2013 16:50:40 +0000 (16:50 +0000)]
Include an LLVM-vs2012_xp toolset in the MSBuild integration

Patch by Paul Hampson!

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

11 years ago[msan] Wrap indirect functions.
Evgeniy Stepanov [Thu, 19 Sep 2013 15:22:35 +0000 (15:22 +0000)]
[msan] Wrap indirect functions.

Adds a flag to the MemorySanitizer pass that enables runtime rewriting of
indirect calls. This is part of MSanDR implementation and is needed to return
control to the DynamiRio-based helper tool on transition between instrumented
and non-instrumented modules. Disabled by default.

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

11 years agoDAGCombiner: Don't fold vector muls with constants that look like a splat of a power...
Benjamin Kramer [Thu, 19 Sep 2013 13:28:20 +0000 (13:28 +0000)]
DAGCombiner: Don't fold vector muls with constants that look like a splat of a power of 2 but differ in bit width.

PR17283.

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

11 years ago[NVPTX] Make constant vector test case endian-independent
Justin Holewinski [Thu, 19 Sep 2013 13:14:44 +0000 (13:14 +0000)]
[NVPTX] Make constant vector test case endian-independent

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

11 years ago[NVPTX] Support constant vector globals
Justin Holewinski [Thu, 19 Sep 2013 12:51:46 +0000 (12:51 +0000)]
[NVPTX] Support constant vector globals

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

11 years ago[ARMv8] Add support for the v8 cryptography extensions.
Amara Emerson [Thu, 19 Sep 2013 11:59:01 +0000 (11:59 +0000)]
[ARMv8] Add support for the v8 cryptography extensions.

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

11 years agoX86: FrameIndex addressing modes do have a base register.
Tim Northover [Thu, 19 Sep 2013 11:33:53 +0000 (11:33 +0000)]
X86: FrameIndex addressing modes do have a base register.

When selecting the DAG (add (WrapperRIP ...), (FrameIndex ...)), X86 code had
spotted the FrameIndex possibility and was working out whether it could fold
the WrapperRIP into this.

The test for forming a %rip version is notionally whether we already have a
base or index register (%rip precludes both), but we were forgetting to account
for the register that would be inserted later to access the frame.

rdar://problem/15024520

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

11 years agoRevert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."
Andrew Trick [Thu, 19 Sep 2013 06:02:43 +0000 (06:02 +0000)]
Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."

Working on a better solution to this.

This reverts commit 7d4e9934e7ca83094c5cf41346966c8350179ff2.

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

11 years agoEncapsulate PassManager debug flags to avoid static init and cxa_exit.
Andrew Trick [Wed, 18 Sep 2013 23:31:16 +0000 (23:31 +0000)]
Encapsulate PassManager debug flags to avoid static init and cxa_exit.

This puts all the global PassManager debugging flags, like
-print-after-all and -time-passes, behind a managed static. This
eliminates their static initializers and, more importantly, exit-time
destructors.

The only behavioral change I anticipate is that tools need to
initialize the PassManager before parsing the command line in order to
export these options, which makes sense. Tools that already initialize
the standard passes (opt/llc) don't need to do anything new.

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

11 years agowhitespace
Andrew Trick [Wed, 18 Sep 2013 23:31:10 +0000 (23:31 +0000)]
whitespace

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

11 years agoFix two issues regarding Got pointer (GP) setup.
Reed Kotler [Wed, 18 Sep 2013 22:46:09 +0000 (22:46 +0000)]
Fix two issues regarding Got pointer (GP) setup.
1) make sure that the first two instructions of the sequence cannot
separate from each other. The linker requires that they be sequential.
If they get separated, it can still work but it will not work in all
cases because the first of the instructions mostly involves the hi part
of the pc relative offset and that part changes slowly. You would have
to be at the right boundary for this to matter.
2) make sure that this sequence begins  on a longword boundary.
There appears to be a bug in binutils which makes some of these calculations
get messed up if the instruction sequence does not begin on a longword
boundary. This is being investigated with the appropriate binutils folks.

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

11 years agoDebug info: Get rid of the VLA indirection hack in FastISel.
Adrian Prantl [Wed, 18 Sep 2013 22:08:59 +0000 (22:08 +0000)]
Debug info: Get rid of the VLA indirection hack in FastISel.
Use the DIVariable::isIndirect() flag set by the frontend instead of
guessing whether to set the machine location's indirection bit.
Paired commit with CFE.

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

11 years agoAttempt to fix llvm-ppc64-linux2 buildbot failure by adding
Preston Gurd [Wed, 18 Sep 2013 21:39:33 +0000 (21:39 +0000)]
Attempt to fix llvm-ppc64-linux2 buildbot failure by adding
-march=x86 to SLM test.

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

11 years agoVerify that llvm can generate the prefetchw instruction when the CPU is
Preston Gurd [Wed, 18 Sep 2013 21:08:09 +0000 (21:08 +0000)]
Verify that llvm can generate the prefetchw instruction when the CPU is
Atom Silvermont.

Patch by Sriram Murali.

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

11 years agoRemove empty dir.
Galina Kistanova [Wed, 18 Sep 2013 18:39:38 +0000 (18:39 +0000)]
Remove empty dir.

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

11 years agoRemove empty dir.
Galina Kistanova [Wed, 18 Sep 2013 17:58:41 +0000 (17:58 +0000)]
Remove empty dir.

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

11 years agoMake DynamicLibrary use ManagedStatic. This is pretty simple and should just work as
Filip Pizlo [Wed, 18 Sep 2013 16:40:14 +0000 (16:40 +0000)]
Make DynamicLibrary use ManagedStatic. This is pretty simple and should just work as
advertised - but it does have the caveat that calls to DynamicLibrary::AddSymbol will
"reset" if you shutdown llvm and try to come back for seconds.  This is a subtle
behavior change, but I'm assuming that nobody is affected by it.

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

11 years agoMore XCore TTI cleanup -- remove an unused private field flagged by
Chandler Carruth [Wed, 18 Sep 2013 14:11:11 +0000 (14:11 +0000)]
More XCore TTI cleanup -- remove an unused private field flagged by
-Wunused-private-field with Clang.

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

11 years agoName the XCore target-specific subdirectories canonically.
Chandler Carruth [Wed, 18 Sep 2013 14:08:30 +0000 (14:08 +0000)]
Name the XCore target-specific subdirectories canonically.

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

11 years ago[asan] call __asan_stack_malloc_N only if use-after-return detection is enabled with...
Kostya Serebryany [Wed, 18 Sep 2013 14:07:14 +0000 (14:07 +0000)]
[asan] call __asan_stack_malloc_N only if use-after-return detection is enabled with the run-time option

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

11 years agoA couple of tests, in llvm/test/Transforms/*/xcore, are XCore-specific. They should...
NAKAMURA Takumi [Wed, 18 Sep 2013 13:56:16 +0000 (13:56 +0000)]
A couple of tests, in llvm/test/Transforms/*/xcore, are XCore-specific. They should be excluded when XCore is not built.

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

11 years agoTarget/XCore/CMakeLists.txt: Add XCoreTargetTransformInfo.cpp.
NAKAMURA Takumi [Wed, 18 Sep 2013 12:59:41 +0000 (12:59 +0000)]
Target/XCore/CMakeLists.txt: Add XCoreTargetTransformInfo.cpp.

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

11 years agoPrevent LoopVectorizer and SLPVectorizer running if the target has no vector registers.
Robert Lytton [Wed, 18 Sep 2013 12:43:35 +0000 (12:43 +0000)]
Prevent LoopVectorizer and SLPVectorizer running if the target has no vector registers.

XCore target: Add XCoreTargetTransformInfo
This is where getNumberOfRegisters() resides, which in turn returns the
number of vector registers (=0).

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

11 years agoRe-add tests from r179291 which were accidentally removed by r181177.
Andrea Di Biagio [Wed, 18 Sep 2013 12:06:59 +0000 (12:06 +0000)]
Re-add tests from r179291 which were accidentally removed by r181177.

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

11 years ago[SystemZ] Add unsigned compare-and-branch instructions
Richard Sandiford [Wed, 18 Sep 2013 09:56:40 +0000 (09:56 +0000)]
[SystemZ] Add unsigned compare-and-branch instructions

For some reason I never got around to adding these at the same time as
the signed versions.  No idea why.

I'm not sure whether this SystemZII::BranchC* stuff is useful, or whether
it should just be replaced with an "is normal" flag.  I'll leave that
for later though.

There are some boundary conditions that can be tweaked, such as preferring
unsigned comparisons for equality with [128, 256), and "<= 255" over "< 256",
but again I'll leave those for a separate patch.

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

11 years ago'svn add' the test cases.
Joey Gouly [Wed, 18 Sep 2013 09:46:49 +0000 (09:46 +0000)]
'svn add' the test cases.

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

11 years ago[ARMv8] Add CRC instructions.
Joey Gouly [Wed, 18 Sep 2013 09:45:55 +0000 (09:45 +0000)]
[ARMv8] Add CRC instructions.

Patch by Bradley Smith!

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

11 years agoRevert r190921. It broke Windows.
Filip Pizlo [Wed, 18 Sep 2013 06:37:55 +0000 (06:37 +0000)]
Revert r190921.  It broke Windows.

I'll roll it back in when I have a chance to look at it in detail.

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

11 years agoMake DynamicLibrary use ManagedStatic. This is pretty simple and should just work as
Filip Pizlo [Wed, 18 Sep 2013 06:03:27 +0000 (06:03 +0000)]
Make DynamicLibrary use ManagedStatic. This is pretty simple and should just work as
advertised - but it does have the caveat that calls to DynamicLibrary::AddSymbol will
"reset" if you shutdown llvm and try to come back for seconds.  This is a subtle
behavior change, but I'm assuming that nobody is affected by it.

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

11 years agoPrevent extra calls to ToggleFeature for Feature64Bit and FeatureCMOV if they've...
Craig Topper [Wed, 18 Sep 2013 06:01:53 +0000 (06:01 +0000)]
Prevent extra calls to ToggleFeature for Feature64Bit and FeatureCMOV if they've already been enabled. The extra call ends up clearing the bit in FeatureBits since its a 'toggle'. Can't prove that anything was broken because of this since I don't think the FeatureBits for these are used.

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

11 years agoFix X86 subtarget to not overwrite the autodetected features by calling InitMCProcess...
Craig Topper [Wed, 18 Sep 2013 05:54:09 +0000 (05:54 +0000)]
Fix X86 subtarget to not overwrite the autodetected features by calling InitMCProcessorInfo right after detecting them. Instead add a new function that only updates the scheduling model and call that.

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

11 years agoRevert accidental commit I had to make to get the test case in PR17268 to still work...
Craig Topper [Wed, 18 Sep 2013 04:10:17 +0000 (04:10 +0000)]
Revert accidental commit I had to make to get the test case in PR17268 to still work correctly.

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

11 years agoLift alignment restrictions for load/store folding on VINSERTF128/VEXTRACTF128. Fixes...
Craig Topper [Wed, 18 Sep 2013 03:55:53 +0000 (03:55 +0000)]
Lift alignment restrictions for load/store folding on VINSERTF128/VEXTRACTF128. Fixes PR17268.

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

11 years agoifndef NDEBUG-out an asserts-only constant committed in r190863
David Blaikie [Wed, 18 Sep 2013 00:11:27 +0000 (00:11 +0000)]
ifndef NDEBUG-out an asserts-only constant committed in r190863

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

11 years agoFix a constant folding address space place I missed.
Matt Arsenault [Tue, 17 Sep 2013 23:23:16 +0000 (23:23 +0000)]
Fix a constant folding address space place I missed.

If address space 0 was smaller than the address space
in a constant inttoptr/ptrtoint pair, the wrong mask size
would be used.

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

11 years agoCOFF: Ensure that objects produced by LLVM link with /safeseh
Reid Kleckner [Tue, 17 Sep 2013 23:18:05 +0000 (23:18 +0000)]
COFF: Ensure that objects produced by LLVM link with /safeseh

Summary:
We indicate that the object files are safe by emitting a @feat.00
absolute address symbol.  The address is presumably interpreted as a
bitfield of features that the compiler would like to enable.  Bit 0 is
documented in the PE COFF spec to opt in to "registered SEH", which is
what /safeseh enables.

LLVM's object files are safe by default because LLVM doesn't know how to
produce SEH handlers.

Reviewers: Bigcheese

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1691

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

11 years agoMissed using check type enum in one place
Matt Arsenault [Tue, 17 Sep 2013 23:15:35 +0000 (23:15 +0000)]
Missed using check type enum in one place

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

11 years agoUse function's argument instead of the global flag.
Matt Arsenault [Tue, 17 Sep 2013 22:45:57 +0000 (22:45 +0000)]
Use function's argument instead of the global flag.

For now it happens the argument is always the same.

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

11 years agoFileCheck refactor: use enum instead of bunch of bools
Matt Arsenault [Tue, 17 Sep 2013 22:30:02 +0000 (22:30 +0000)]
FileCheck refactor: use enum instead of bunch of bools

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

11 years agoRevert the load slicing done in r190870.
Quentin Colombet [Tue, 17 Sep 2013 22:01:26 +0000 (22:01 +0000)]
Revert the load slicing done in r190870.

To avoid regressions with bitfield optimizations, this slicing should take place
later, like ISel time.

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

11 years agoCOFF: Emit all MCSymbols rather than filtering out some of them
Reid Kleckner [Tue, 17 Sep 2013 21:24:44 +0000 (21:24 +0000)]
COFF: Emit all MCSymbols rather than filtering out some of them

In particular, this means we emit non-external symbols defined to
variables, such as aliases or absolute addresses.

This is needed to implement /safeseh, and it appears there was some
confusion about what symbols to emit previously.

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

11 years agoCOFF: Remove ExportSection, which has been dead since r114823
Reid Kleckner [Tue, 17 Sep 2013 21:24:02 +0000 (21:24 +0000)]
COFF: Remove ExportSection, which has been dead since r114823

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

11 years agoMove variable into assert to avoid unused variable warning.
Eric Christopher [Tue, 17 Sep 2013 21:13:57 +0000 (21:13 +0000)]
Move variable into assert to avoid unused variable warning.

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

11 years agoCleanup handling of constant function casts.
Matt Arsenault [Tue, 17 Sep 2013 21:10:14 +0000 (21:10 +0000)]
Cleanup handling of constant function casts.

Some of this code is no longer necessary since int<->ptr casts are no
longer occur as of r187444.

This also fixes handling vectors of pointers, and adds a bunch of new
testcases for vectors and address spaces.

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

11 years ago[PowerPC] Add a FIXME.
Bill Schmidt [Tue, 17 Sep 2013 20:22:05 +0000 (20:22 +0000)]
[PowerPC] Add a FIXME.

Documenting a design choice to generate only medium model sequences for TLS
addresses at this time.  Small and large code models could be supported if
necessary.

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

11 years ago[PowerPC] Fix problems with large code model (PR17169).
Bill Schmidt [Tue, 17 Sep 2013 20:03:25 +0000 (20:03 +0000)]
[PowerPC] Fix problems with large code model (PR17169).

Large code model on PPC64 requires creating and referencing TOC entries when
using the addis/ld form of addressing.  This was not being done in all cases.
The changes in this patch to PPCAsmPrinter::EmitInstruction() fix this.  Two
test cases are also modified to reflect this requirement.

Fast-isel was not creating correct code for loading floating-point constants
using large code model.  This also requires the addis/ld form of addressing.
Previously we were using the addis/lfd shortcut which is only applicable to
medium code model.  One test case is modified to reflect this requirement.

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

11 years agoCostmodel: Add support for horizontal vector reductions
Arnold Schwaighofer [Tue, 17 Sep 2013 18:06:50 +0000 (18:06 +0000)]
Costmodel: Add support for horizontal vector reductions

Upcoming SLP vectorization improvements will want to be able to estimate costs
of horizontal reductions. Add infrastructure to support this.

We model reductions as a series of (shufflevector,add) tuples ultimately
followed by an extractelement. For example, for an add-reduction of <4 x float>
we could generate the following sequence:

 (v0, v1, v2, v3)
   \   \  /  /
     \  \  /
       +  +

 (v0+v2, v1+v3, undef, undef)
    \      /
 ((v0+v2) + (v1+v3), undef, undef)

 %rdx.shuf = shufflevector <4 x float> %rdx, <4 x float> undef,
                           <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
 %bin.rdx = fadd <4 x float> %rdx, %rdx.shuf
 %rdx.shuf7 = shufflevector <4 x float> %bin.rdx, <4 x float> undef,
                          <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
 %bin.rdx8 = fadd <4 x float> %bin.rdx, %rdx.shuf7
 %r = extractelement <4 x float> %bin.rdx8, i32 0

This commit adds a cost model interface "getReductionCost(Opcode, Ty, Pairwise)"
that will allow clients to ask for the cost of such a reduction (as backends
might generate more efficient code than the cost of the individual instructions
summed up). This interface is excercised by the CostModel analysis pass which
looks for reduction patterns like the one above - starting at extractelements -
and if it sees a matching sequence will call the cost model interface.

We will also support a second form of pairwise reduction that is well supported
on common architectures (haddps, vpadd, faddp).

 (v0, v1, v2, v3)
  \   /    \  /
 (v0+v1, v2+v3, undef, undef)
    \     /
 ((v0+v1)+(v2+v3), undef, undef, undef)

  %rdx.shuf.0.0 = shufflevector <4 x float> %rdx, <4 x float> undef,
        <4 x i32> <i32 0, i32 2 , i32 undef, i32 undef>
  %rdx.shuf.0.1 = shufflevector <4 x float> %rdx, <4 x float> undef,
        <4 x i32> <i32 1, i32 3, i32 undef, i32 undef>
  %bin.rdx.0 = fadd <4 x float> %rdx.shuf.0.0, %rdx.shuf.0.1
  %rdx.shuf.1.0 = shufflevector <4 x float> %bin.rdx.0, <4 x float> undef,
        <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>
  %rdx.shuf.1.1 = shufflevector <4 x float> %bin.rdx.0, <4 x float> undef,
        <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
  %bin.rdx.1 = fadd <4 x float> %rdx.shuf.1.0, %rdx.shuf.1.1
  %r = extractelement <4 x float> %bin.rdx.1, i32 0

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

11 years agoSLPVectorizer: Don't vectorize phi nodes that use invoke values
Arnold Schwaighofer [Tue, 17 Sep 2013 17:03:29 +0000 (17:03 +0000)]
SLPVectorizer: Don't vectorize phi nodes that use invoke values

We can't insert an insertelement after an invoke. We would have to split a
critical edge. So when we see a phi node that uses an invoke we just give up.

radar://14990770

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

11 years ago[InstCombiner] Slice a big load in two loads when the elements are next to each
Quentin Colombet [Tue, 17 Sep 2013 16:57:34 +0000 (16:57 +0000)]
[InstCombiner] Slice a big load in two loads when the elements are next to each
other in memory.

The motivation was to get rid of truncate and shift right instructions that get
in the way of paired load or floating point load.
E.g.,
Consider the following example:
struct Complex {
  float real;
  float imm;
};

When accessing a complex, llvm was generating a 64-bits load and the imm field
was obtained by a trunc(lshr) sequence, resulting in poor code generation, at
least for x86.

The idea is to declare that two load instructions is the canonical form for
loading two arithmetic type, which are next to each other in memory.

Two scalar loads at a constant offset from each other are pretty
easy to detect for the sorts of passes that like to mess with loads.

<rdar://problem/14477220>

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

11 years agoRemove unused code, which had been commented out.
Preston Gurd [Tue, 17 Sep 2013 16:53:36 +0000 (16:53 +0000)]
Remove unused code, which had been commented out.

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

11 years agoAdded documentation to getMemsetStores.
Serge Pavlov [Tue, 17 Sep 2013 16:24:42 +0000 (16:24 +0000)]
Added documentation to getMemsetStores.

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

11 years agoAdd llvm.x86.* intrinsics for Intel SHA Extensions
Ben Langmuir [Tue, 17 Sep 2013 13:44:39 +0000 (13:44 +0000)]
Add llvm.x86.* intrinsics for Intel SHA Extensions

Add llvm.x86.* intrinsics for all of the Intel SHA Extensions instructions, as
well as tests. Also remove mayLoad and hasSideEffects, which can be inferred
from the instruction patterns.

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

11 years ago[asan] inline the calls to __asan_stack_free_* with small sizes. Yet another 10%...
Kostya Serebryany [Tue, 17 Sep 2013 12:14:50 +0000 (12:14 +0000)]
[asan] inline the calls to __asan_stack_free_* with small sizes. Yet another 10%-20% speedup for use-after-return

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

11 years ago[ARM] Fix the deprecation of MCR encodings that map to CP15{ISB,DSB,DMB}.
Joey Gouly [Tue, 17 Sep 2013 09:54:57 +0000 (09:54 +0000)]
[ARM] Fix the deprecation of MCR encodings that map to CP15{ISB,DSB,DMB}.

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

11 years agoBugfix for PR17099:
Stepan Dyatkovskiy [Tue, 17 Sep 2013 09:36:11 +0000 (09:36 +0000)]
Bugfix for PR17099:
Wrong cast operation.
MergeFunctions emits Bitcast instead of pointer-to-integer operation.
Patch fixes MergeFunctions::writeThunk function. It replaces
unconditional Bitcast creation with "Value* createCast(...)" method, that
checks operand types and selects proper instruction.
See unit-test as example.

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

11 years agoAVX-512: Converted to Unix style
Elena Demikhovsky [Tue, 17 Sep 2013 07:34:34 +0000 (07:34 +0000)]
AVX-512: Converted to Unix style

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

11 years agoAdd AES and SHA instructions to the load folding tables.
Craig Topper [Tue, 17 Sep 2013 06:50:11 +0000 (06:50 +0000)]
Add AES and SHA instructions to the load folding tables.

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

11 years agoFix column alignment. No functional change.
Craig Topper [Tue, 17 Sep 2013 06:05:17 +0000 (06:05 +0000)]
Fix column alignment. No functional change.

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

11 years agoMake a more clear AVX-512 section header that matches similar in the file.
Craig Topper [Tue, 17 Sep 2013 03:34:09 +0000 (03:34 +0000)]
Make a more clear AVX-512 section header that matches similar in the file.

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

11 years agoImplement 3 AArch64 neon instructions : umov smov ins.
Kevin Qin [Tue, 17 Sep 2013 02:21:02 +0000 (02:21 +0000)]
Implement 3 AArch64 neon instructions : umov smov ins.

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

11 years ago[SelectionDAG] Teach the vector scalarizer about TRUNCATE.
Quentin Colombet [Tue, 17 Sep 2013 00:26:56 +0000 (00:26 +0000)]
[SelectionDAG] Teach the vector scalarizer about TRUNCATE.

When a truncate node defines a legal vector type but uses an illegal
vector type, the legalization process was splitting the vector until
<1 x vector> type, but then it was failing to scalarize the node because
it did not know how to handle TRUNCATE.

<rdar://problem/14989896>

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

11 years agomention command line parameters
Adrian Prantl [Tue, 17 Sep 2013 00:15:36 +0000 (00:15 +0000)]
mention command line parameters

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

11 years agosimplify expression
Adrian Prantl [Tue, 17 Sep 2013 00:15:33 +0000 (00:15 +0000)]
simplify expression

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

11 years agoBe sure we run ARM tests only when an ARM backend is present.
Adrian Prantl [Mon, 16 Sep 2013 23:48:45 +0000 (23:48 +0000)]
Be sure we run ARM tests only when an ARM backend is present.

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

11 years agoDebug info: Fix PR16736 and rdar://problem/14990587.
Adrian Prantl [Mon, 16 Sep 2013 23:29:03 +0000 (23:29 +0000)]
Debug info: Fix PR16736 and rdar://problem/14990587.
A DBG_VALUE is register-indirect iff the first operand is a register
_and_ the second operand is an immediate.

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

11 years agoMemCpyOptimizer: Use max legal int size instead of pointer size
Matt Arsenault [Mon, 16 Sep 2013 22:43:16 +0000 (22:43 +0000)]
MemCpyOptimizer: Use max legal int size instead of pointer size

If there are no legal integers, assume 1 byte.

This makes more sense than using the pointer size as
a guess for the maximum GPR width.

It is conceivable to want to use some 64-bit pointers
on a target where 64-bit integers aren't legal.

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

11 years agoAdd Atom Silvermont (slm) tests
Preston Gurd [Mon, 16 Sep 2013 22:22:07 +0000 (22:22 +0000)]
Add Atom Silvermont (slm) tests

- check that -mcpu=slm uses the call register indirect optimization
- check that -mcpu=slm runs the scheduler
- check that -mcpu=slm supports the movbe instruction

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

11 years agoUse reference instead of copy.
Jakub Staszak [Mon, 16 Sep 2013 22:03:38 +0000 (22:03 +0000)]
Use reference instead of copy.

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

11 years ago[CMake] Hack GetSVN.cmake to handle unusual terminals.
Jordan Rose [Mon, 16 Sep 2013 21:38:01 +0000 (21:38 +0000)]
[CMake] Hack GetSVN.cmake to handle unusual terminals.

I got a report of a hang in git's helper functions trying to figure out
how to display results of "git svn info" when run inside ninja, even though
the result is immediately piped to grep. This seems to avoid that.

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

11 years agoAdd testcase for r190631
Krzysztof Parzyszek [Mon, 16 Sep 2013 21:24:30 +0000 (21:24 +0000)]
Add testcase for r190631

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

11 years agoTableGen: fix constness of new comparison function.
Tim Northover [Mon, 16 Sep 2013 17:33:40 +0000 (17:33 +0000)]
TableGen: fix constness of new comparison function.

libc++ didn't seem to like a non-const call operator.

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

11 years ago[PowerPC] Fix PR17155 - Ignore COPY_TO_REGCLASS during emit.
Bill Schmidt [Mon, 16 Sep 2013 17:25:12 +0000 (17:25 +0000)]
[PowerPC] Fix PR17155 - Ignore COPY_TO_REGCLASS during emit.

Fast-isel generates a COPY_TO_REGCLASS for widening f32 to f64, which
is a nop on PPC64.  This is needed to keep the register class system
happy, but on the fast-isel path it is not removed before emit as it
is for DAG select.  Ignore this op when emitting instructions.

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

11 years agoTableGen: give asm match classes deterministic order.
Tim Northover [Mon, 16 Sep 2013 16:43:19 +0000 (16:43 +0000)]
TableGen: give asm match classes deterministic order.

TableGen was sorting the entries in some of its internal data
structures by pointer. This order filtered through to the final
matching table and affected the diagnostics produced on bad assembly
occasionally.

It also turns out STL algorithms are ridiculously easy to misuse on
containers with custom order methods. (No bugs before, or now that I
know of, but plenty in the middle).

This should fix the sanitizer bot, which ends up with weird pointers.

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

11 years agoAsmMatcher: emit subtarget feature enum in deterministic order.
Tim Northover [Mon, 16 Sep 2013 16:43:16 +0000 (16:43 +0000)]
AsmMatcher: emit subtarget feature enum in deterministic order.

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

11 years agoDon't vectorize if there are outside loop users of the induction variable.
Arnold Schwaighofer [Mon, 16 Sep 2013 16:17:24 +0000 (16:17 +0000)]
Don't vectorize if there are outside loop users of the induction variable.

We would have to compute the pre increment value, either by computing it on
every loop iteration or by splitting the edge out of the loop and inserting a
computation for it there.

For now, just give up vectorizing such loops.

Fixes PR17179.

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

11 years ago[msan] Check return value of main().
Evgeniy Stepanov [Mon, 16 Sep 2013 13:24:32 +0000 (13:24 +0000)]
[msan] Check return value of main().

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

11 years agoThis patch implements Mips load/store instructions from/to coprocessor 2. Test cases...
Vladimir Medic [Mon, 16 Sep 2013 10:29:42 +0000 (10:29 +0000)]
This patch implements Mips load/store instructions from/to coprocessor 2. Test cases are added.

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

11 years agoARM: Deduplicate ConstantPoolValues.
Benjamin Kramer [Mon, 16 Sep 2013 10:17:31 +0000 (10:17 +0000)]
ARM: Deduplicate ConstantPoolValues.

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

11 years agoFix the build for git repositories with multiple remotes.
Daniel Sanders [Mon, 16 Sep 2013 09:25:49 +0000 (09:25 +0000)]
Fix the build for git repositories with multiple remotes.

Summary:
When a git repository had multiple remotes, ${repository} will be set to a multiline string. This causes compilation errors in SVNVersion.inc.

Fix this by limiting the output of utils/GetRepositoryPath to the first remote (which is reasonably likely to be 'origin').

Reviewers: jordan_rose

CC: llvm-commits, t.p.northover
Differential Revision: http://llvm-reviews.chandlerc.com/D1659

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

11 years ago[SystemZ] Improve extload handling
Richard Sandiford [Mon, 16 Sep 2013 09:03:10 +0000 (09:03 +0000)]
[SystemZ] Improve extload handling

The port originally had special patterns for extload, mapping them to the
same instructions as sextload.  It seemed neater to have patterns that
match "an extension that is allowed to be signed" and "an extension that
is allowed to be unsigned".

This was originally meant to be a clean-up, but it does improve the handling
of promoted integers a little, as shown by args-06.ll.

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

11 years agoMake F16C feature flag imply AVX rather than just checking both at the patterns.
Craig Topper [Mon, 16 Sep 2013 04:29:58 +0000 (04:29 +0000)]
Make F16C feature flag imply AVX rather than just checking both at the patterns.

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

11 years agoImplement function prefix data as an IR feature.
Peter Collingbourne [Mon, 16 Sep 2013 01:08:15 +0000 (01:08 +0000)]
Implement function prefix data as an IR feature.

Previous discussion:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html

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

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

11 years agoPPC: Don't restrict lvsl generation to after type legalization
Hal Finkel [Sun, 15 Sep 2013 22:09:58 +0000 (22:09 +0000)]
PPC: Don't restrict lvsl generation to after type legalization

This is a re-commit of r190764, with an extra check to make sure that we're not
performing the transformation on illegal types (a small test case has been
added for this as well).

Original commit message:

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

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

11 years agoReplace some unnecessary vector copies with references.
Benjamin Kramer [Sun, 15 Sep 2013 22:04:42 +0000 (22:04 +0000)]
Replace some unnecessary vector copies with references.

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

11 years agoELF: Add support for the exclude section bit for gas compat.
Benjamin Kramer [Sun, 15 Sep 2013 19:53:20 +0000 (19:53 +0000)]
ELF: Add support for the exclude section bit for gas compat.

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

11 years agoMC: Add support for '?' flags in .section directives
David Majnemer [Sun, 15 Sep 2013 19:24:16 +0000 (19:24 +0000)]
MC: Add support for '?' flags in .section directives

Summary:
The '?' flag uses the last section group if the last had a section
group.  We treat combining an explicit section group and the '?' as a
hard error.

This fixes PR17198.

Reviewers: rafael, bkramer

Reviewed By: bkramer

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1686

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

11 years agoFix alignment of unwind data.
Kai Nacke [Sun, 15 Sep 2013 18:01:09 +0000 (18:01 +0000)]
Fix alignment of unwind data.

For alignment purposes, the instruction array will always have an even
number of entries, with the final entry potentially unused (in which
case the array will be one longer than indicated by the count of unwind
codes field).

Reviewed by Anton Korobeynikov, Charles Davis and Nico Rieck.

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

11 years agoGenerate IMAGE_REL_AMD64_ADDR32NB relocations for SEH
Kai Nacke [Sun, 15 Sep 2013 17:46:46 +0000 (17:46 +0000)]
Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH
 data structures.

The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB
instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding
the VK_COFF_IMGREL32 modifier to the symbol reference.
Change also references to start and end of the SEH range of a function
as offsets to start of the function.

Reviewed by Jim Grosbach, Charles Davis and Nico Rieck.

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

11 years agoRevert r190764: PPC: Don't restrict lvsl generation to after type legalization
Hal Finkel [Sun, 15 Sep 2013 15:41:11 +0000 (15:41 +0000)]
Revert r190764: PPC: Don't restrict lvsl generation to after type legalization

This is causing test-suite failures.

Original commit message:

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

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

11 years agoPPC: Don't restrict lvsl generation to after type legalization
Hal Finkel [Sun, 15 Sep 2013 15:20:54 +0000 (15:20 +0000)]
PPC: Don't restrict lvsl generation to after type legalization

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

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

11 years agoPrevent assert in CombinerGlobalAA with null values
Hal Finkel [Sun, 15 Sep 2013 02:19:49 +0000 (02:19 +0000)]
Prevent assert in CombinerGlobalAA with null values

DAGCombiner::isAlias can be called with SrcValue1 or SrcValue2 null, and we
can't use AA in this case (if we try, then the casting code in AA will assert).

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

11 years agoExpand the mask capability for deciding which functions are mips16 and mips32
Reed Kotler [Sun, 15 Sep 2013 02:09:08 +0000 (02:09 +0000)]
Expand the mask capability for deciding which functions are mips16 and mips32
so it can be better used for general interoperability testing between mips32
and mips16.

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

11 years agoRemove unused StringRef that no compiler warned about, I wonder why.
Benjamin Kramer [Sat, 14 Sep 2013 22:55:54 +0000 (22:55 +0000)]
Remove unused StringRef that no compiler warned about, I wonder why.

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