oota-llvm.git
13 years agoAdd X86 LZCNT instruction. Including instruction selection support.
Craig Topper [Tue, 11 Oct 2011 06:44:02 +0000 (06:44 +0000)]
Add X86 LZCNT instruction. Including instruction selection support.

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

13 years agoUse the proper name for "externally visible" linkage -- 'external'. This is the
Bill Wendling [Tue, 11 Oct 2011 06:41:28 +0000 (06:41 +0000)]
Use the proper name for "externally visible" linkage -- 'external'. This is the
keyword in LLVM for externally visible linkage.
PR10636

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

13 years agoReword the SetVector description to reflect reality.
Bill Wendling [Tue, 11 Oct 2011 06:33:56 +0000 (06:33 +0000)]
Reword the SetVector description to reflect reality.
Patch by Michael Ilseman!

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

13 years agoAdd a test for PR10565.
Cameron Zwarich [Tue, 11 Oct 2011 06:10:37 +0000 (06:10 +0000)]
Add a test for PR10565.

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

13 years agoRemove a lot of the fancy scalar replacement code for dealing with llvm-gcc's
Cameron Zwarich [Tue, 11 Oct 2011 06:10:30 +0000 (06:10 +0000)]
Remove a lot of the fancy scalar replacement code for dealing with llvm-gcc's
lowering of NEON code. It provides little-to-no benefit now and only introduces
additional complexity.

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

13 years agoTest simplification that Ana Pazos noticed.
Bill Wendling [Tue, 11 Oct 2011 04:43:15 +0000 (04:43 +0000)]
Test simplification that Ana Pazos noticed.

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

13 years agoFix disassembling of popcntw. Also remove some code that says it accounts for 64BIT_R...
Craig Topper [Tue, 11 Oct 2011 04:34:23 +0000 (04:34 +0000)]
Fix disassembling of popcntw. Also remove some code that says it accounts for 64BIT_REXW_XD not existing, but it does exist.

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

13 years agoAlso create a shndx even if there are no symbols. This lets us test
Nick Lewycky [Tue, 11 Oct 2011 03:54:50 +0000 (03:54 +0000)]
Also create a shndx even if there are no symbols. This lets us test
.symtab_shndx reading and writing together, and finally we have a testcase for
r141440.

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

13 years agotest/CodeGen/X86/movbe.ll: Give explicit -mtriple=x86_64-linux, to unbreak win32...
NAKAMURA Takumi [Tue, 11 Oct 2011 03:41:03 +0000 (03:41 +0000)]
test/CodeGen/X86/movbe.ll: Give explicit -mtriple=x86_64-linux, to unbreak win32 hosts.

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

13 years agoReapply r141605 with fixes for appropriate handling of reserved section numbers
Nick Lewycky [Tue, 11 Oct 2011 03:18:58 +0000 (03:18 +0000)]
Reapply r141605 with fixes for appropriate handling of reserved section numbers
in st_shndx fields.

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

13 years agoAdd support for .symtab_shnidx. Unfortunately, doing this required breaking a
Nick Lewycky [Tue, 11 Oct 2011 02:57:48 +0000 (02:57 +0000)]
Add support for .symtab_shnidx. Unfortunately, doing this required breaking a
layer of abstraction around SymbolRef where you can read its private
SymbolPimpl member.

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

13 years agoAdd experimental -enable-lsr-phielim option.
Andrew Trick [Tue, 11 Oct 2011 02:30:45 +0000 (02:30 +0000)]
Add experimental -enable-lsr-phielim option.

I'm not sure we will need it in the long run, but the option is
currently useful for checking if the output of LSR is "clean".

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

13 years agoMove replaceCongruentIVs into SCEVExapander and bias toward "expanded"
Andrew Trick [Tue, 11 Oct 2011 02:28:51 +0000 (02:28 +0000)]
Move replaceCongruentIVs into SCEVExapander and bias toward "expanded"
IVs.

Indvars previously chose randomly between congruent IVs. Now it will
bias the decision toward IVs that SCEVExpander likes to create. This
was not done to fix any problem, it's just a welcome side effect of
factoring code.

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

13 years agoTest cases for 64-bit load and store instructions.
Akira Hatanaka [Tue, 11 Oct 2011 01:52:31 +0000 (01:52 +0000)]
Test cases for 64-bit load and store instructions.

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

13 years agoAdded a testcase for r141599, rdar://problem/10063881.
Lang Hames [Tue, 11 Oct 2011 01:32:10 +0000 (01:32 +0000)]
Added a testcase for r141599, rdar://problem/10063881.

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

13 years agoMake changes necessary for supporting floating point load and store instructions
Akira Hatanaka [Tue, 11 Oct 2011 01:12:52 +0000 (01:12 +0000)]
Make changes necessary for supporting floating point load and store instructions
that have 64-bit pointers or access the 32 x 64-bit floating pointer register
file. Update functions in MipsInstrInfo.cpp too.

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

13 years agoMove -widen-vmovs to ARMBaseInstrInfo::expandPostRAPseudo().
Jakob Stoklund Olesen [Tue, 11 Oct 2011 00:59:06 +0000 (00:59 +0000)]
Move -widen-vmovs to ARMBaseInstrInfo::expandPostRAPseudo().

The VMOVS widening needs to look at the implicit COPY operands.  Trying
to dig out the COPY instruction from an iterator in copyPhysReg() is the
wrong approach.

The expandPostRAPseudo() hook gets to look at COPY instructions before
they are converted to copyPhysReg() calls.

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

13 years agoModify lowering of GlobalAddress so that correct code is emitted when target is
Akira Hatanaka [Tue, 11 Oct 2011 00:55:05 +0000 (00:55 +0000)]
Modify lowering of GlobalAddress so that correct code is emitted when target is
Mips64.

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

13 years agoFixed natural stack alignment for Linux x86-32. Thanks Eli.
Lang Hames [Tue, 11 Oct 2011 00:51:36 +0000 (00:51 +0000)]
Fixed natural stack alignment for Linux x86-32. Thanks Eli.

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

13 years agoModify MipsDAGToDAGISel::SelectAddr so that it can handle 64-bit pointers too.
Akira Hatanaka [Tue, 11 Oct 2011 00:44:20 +0000 (00:44 +0000)]
Modify MipsDAGToDAGISel::SelectAddr so that it can handle 64-bit pointers too.

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

13 years agoRevert r141605 as it broke tests for llvm-nm.
Nick Lewycky [Tue, 11 Oct 2011 00:38:56 +0000 (00:38 +0000)]
Revert r141605 as it broke tests for llvm-nm.

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

13 years agoSimplify and update functions storeRegToStackSlot and loadRegFromStackSlot.
Akira Hatanaka [Tue, 11 Oct 2011 00:37:28 +0000 (00:37 +0000)]
Simplify and update functions storeRegToStackSlot and loadRegFromStackSlot.

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

13 years agoAdd definitions of 64-bit loads and stores. Add a patterns for unaligned
Akira Hatanaka [Tue, 11 Oct 2011 00:27:28 +0000 (00:27 +0000)]
Add definitions of 64-bit loads and stores. Add a patterns for unaligned
zextloadi32 for which there is no corresponding pseudo or real instruction.

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

13 years agoAdd testcase for PR11107.
Bill Wendling [Tue, 11 Oct 2011 00:26:57 +0000 (00:26 +0000)]
Add testcase for PR11107.

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

13 years agoMake it possible to use the linker without destroying the source module. This is...
Tanya Lattner [Tue, 11 Oct 2011 00:24:54 +0000 (00:24 +0000)]
Make it possible to use the linker without destroying the source module. This is so the source module can be linked to multiple other destination modules. For all that used LinkModules() before, they will continue to destroy the source module as before.

This line, and those below, will be ignored--

M    include/llvm/Linker.h
M    tools/bugpoint/Miscompilation.cpp
M    tools/bugpoint/BugDriver.cpp
M    tools/llvm-link/llvm-link.cpp
M    lib/Linker/LinkModules.cpp

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

13 years agoAdd support for reading many-section ELF files.
Nick Lewycky [Tue, 11 Oct 2011 00:15:42 +0000 (00:15 +0000)]
Add support for reading many-section ELF files.
If you want to tackle adding the testcase, let me know. It's a 4.2MB ELF file
and I'll be happy to mail it to you.

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

13 years agoChange definitions of classes LoadM and StoreM in preparation for adding support
Akira Hatanaka [Tue, 11 Oct 2011 00:11:12 +0000 (00:11 +0000)]
Change definitions of classes LoadM and StoreM in preparation for adding support
for 64-bit load and store instructions. Add definitions of 64-bit memory operand
and 16-bit immediate operand.

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

13 years agoSimplify check that optional def is there and is CPSR.
Bill Wendling [Tue, 11 Oct 2011 00:10:41 +0000 (00:10 +0000)]
Simplify check that optional def is there and is CPSR.

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

13 years agoAdd a natural stack alignment field to TargetData, and prevent InstCombine from
Lang Hames [Mon, 10 Oct 2011 23:42:08 +0000 (23:42 +0000)]
Add a natural stack alignment field to TargetData, and prevent InstCombine from
promoting allocas to preferred alignments that exceed the natural
alignment. This avoids some potentially expensive dynamic stack realignments.

The natural stack alignment is set in target data strings via the "S<size>"
option. Size is in bits and must be a multiple of 8. The natural stack alignment
defaults to "unspecified" (represented by a zero value), and the "unspecified"
value does not prevent any alignment promotions. Target maintainers that care
about avoiding promotions should explicitly add the "S<size>" option to their
target data strings.

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

13 years agoFix warning.
Michael J. Spencer [Mon, 10 Oct 2011 23:36:56 +0000 (23:36 +0000)]
Fix warning.

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

13 years agoRevert r141569 and r141576.
Devang Patel [Mon, 10 Oct 2011 23:18:02 +0000 (23:18 +0000)]
Revert r141569 and r141576.

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

13 years agoSimplify operand Kind checks a bit.
Jim Grosbach [Mon, 10 Oct 2011 23:06:42 +0000 (23:06 +0000)]
Simplify operand Kind checks a bit.

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

13 years agoReapply r141365 now that PR11107 is fixed.
Bill Wendling [Mon, 10 Oct 2011 22:59:55 +0000 (22:59 +0000)]
Reapply r141365 now that PR11107 is fixed.

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

13 years agoAdd a name to sub-operand for clarity.
Jim Grosbach [Mon, 10 Oct 2011 22:55:05 +0000 (22:55 +0000)]
Add a name to sub-operand for clarity.

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

13 years agoIf the CPSR is defined by a copy, then we don't want to merge it into an IT
Bill Wendling [Mon, 10 Oct 2011 22:52:53 +0000 (22:52 +0000)]
If the CPSR is defined by a copy, then we don't want to merge it into an IT
block. E.g., if we have:

  movs  r1, r1
  rsb   r1, 0
  movs  r2, r2
  rsb   r2, 0

we don't want this to be converted to:

  movs  r1, r1
  movs  r2, r2
  itt   mi
  rsb   r1, 0
  rsb   r2, 0

PR11107 & <rdar://problem/10259534>

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

13 years agoMake sure the X86 backend doesn't explode on 128-bit shuffles in AVX mode. Fixes...
Eli Friedman [Mon, 10 Oct 2011 22:28:47 +0000 (22:28 +0000)]
Make sure the X86 backend doesn't explode on 128-bit shuffles in AVX mode.  Fixes PR11102.

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

13 years agoObject: add getSectionAlignment.
Michael J. Spencer [Mon, 10 Oct 2011 21:55:43 +0000 (21:55 +0000)]
Object: add getSectionAlignment.

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

13 years agoAdd support for dumping section headers to llvm-objdump. This uses the same
Nick Lewycky [Mon, 10 Oct 2011 21:21:34 +0000 (21:21 +0000)]
Add support for dumping section headers to llvm-objdump. This uses the same
flags as binutils objdump but the output is different, not just in format but
also showing different sections. Compare its results against readelf, not
objdump.

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

13 years agoGive targets a chance to expand even standard pseudos.
Jakob Stoklund Olesen [Mon, 10 Oct 2011 20:34:28 +0000 (20:34 +0000)]
Give targets a chance to expand even standard pseudos.

Allow targets to expand COPY and other standard pseudo-instructions
before they are expanded with copyPhysReg().

This allows the target to examine the COPY instruction for extra
operands indicating it can be widened to a preferable super-register
copy.  See the ARM -widen-vmovs option.

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

13 years agoIf loop header is also loop exiting block then it may not be safe to hoist instructions.
Devang Patel [Mon, 10 Oct 2011 20:32:03 +0000 (20:32 +0000)]
If loop header is also loop exiting block then it may not be safe to hoist instructions.

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

13 years agoEmit full ED initializers even for pseudo-instructions.
Jakob Stoklund Olesen [Mon, 10 Oct 2011 20:15:49 +0000 (20:15 +0000)]
Emit full ED initializers even for pseudo-instructions.

This should unbreak the picky buildbots.

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

13 years agoAllow stat += 0 without activating the stat.
Andrew Trick [Mon, 10 Oct 2011 19:48:56 +0000 (19:48 +0000)]
Allow stat += 0 without activating the stat.

For me, this is a nice convenience. We generally want grep to match
stats output only when the event has occurred.

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

13 years agowhitespace
Andrew Trick [Mon, 10 Oct 2011 19:35:46 +0000 (19:35 +0000)]
whitespace

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

13 years agoX86: Add a subtarget definition for core-avx-i, which is GCC's name for ivy bridge.
Benjamin Kramer [Mon, 10 Oct 2011 19:35:07 +0000 (19:35 +0000)]
X86: Add a subtarget definition for core-avx-i, which is GCC's name for ivy bridge.

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

13 years agoFix 10892 - When lowering SIGN_EXTEND_INREG do not lower v2i64 because the
Nadav Rotem [Mon, 10 Oct 2011 19:31:45 +0000 (19:31 +0000)]
Fix 10892 - When lowering SIGN_EXTEND_INREG do not lower v2i64 because the
instruction set has no 64-bit SRA support.

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

13 years agoAdd dominance check for the instruction being hoisted.
Devang Patel [Mon, 10 Oct 2011 19:09:20 +0000 (19:09 +0000)]
Add dominance check for the instruction being hoisted.

For example, MachineLICM should not hoist a load that is not guaranteed to be executed.
Radar 10254254.

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

13 years agoMark the standard pseudos as isPseudo = 1.
Jakob Stoklund Olesen [Mon, 10 Oct 2011 18:51:33 +0000 (18:51 +0000)]
Mark the standard pseudos as isPseudo = 1.

The difference between isPseudo and isCodeGenOnly is a bit murky, but
isCodeGenOnly should eventually go away.  It is used for instructions
that are clones of real instructions with slightly different properties.

The standard pseudo-instructions never mirror real instructions, so they
are definitely in the isPseudo category.

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

13 years agoThe Mips specific function for instruction cache invalidation cannot be
Bruno Cardoso Lopes [Mon, 10 Oct 2011 18:41:02 +0000 (18:41 +0000)]
The Mips specific function for instruction cache invalidation cannot be
compiled on mips32r1 processors because it uses synci and rdhwr instructions
which are supported only on mips32r2, so I replaced this function with the
call to function cacheflush which works for both mips32r1 and mips32r2.
Patch by Sasa Stankovic

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

13 years agoX86: Add patterns for the movbe instruction (mov + bswap, only available on atom)
Benjamin Kramer [Mon, 10 Oct 2011 18:34:56 +0000 (18:34 +0000)]
X86: Add patterns for the movbe instruction (mov + bswap, only available on atom)

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

13 years agoInsert dummy ED table entries for pseudo-instructions.
Jakob Stoklund Olesen [Mon, 10 Oct 2011 18:30:16 +0000 (18:30 +0000)]
Insert dummy ED table entries for pseudo-instructions.

The table is indexed by opcode, so simply removing pseudo-instructions
creates a wrong mapping from opcode to table entry.

Add a test case for xorps which has a very high opcode that exposes this
problem.

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

13 years agoRevert r141365. It was causing MultiSource/Benchmarks/MiBench/consumer-lame to
Bill Wendling [Mon, 10 Oct 2011 18:27:30 +0000 (18:27 +0000)]
Revert r141365. It was causing MultiSource/Benchmarks/MiBench/consumer-lame to
hang, and possibly SPEC/CINT2006/464_h264ref.

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

13 years agoMCAtom extending methods need to extend the range of the atom as well.
Owen Anderson [Mon, 10 Oct 2011 18:09:38 +0000 (18:09 +0000)]
MCAtom extending methods need to extend the range of the atom as well.

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

13 years agoMark the llvm.eh.sjlj.functioncontext intrinsic as reading memory so that fast
Bill Wendling [Mon, 10 Oct 2011 17:08:47 +0000 (17:08 +0000)]
Mark the llvm.eh.sjlj.functioncontext intrinsic as reading memory so that fast
isel doesn't ignore it.

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

13 years agollvm-objdump: Take ownership of MCInstrInfos.
Benjamin Kramer [Mon, 10 Oct 2011 13:10:09 +0000 (13:10 +0000)]
llvm-objdump: Take ownership of MCInstrInfos.

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

13 years agollvm-nm: Don't leak bitcode buffers.
Benjamin Kramer [Mon, 10 Oct 2011 13:10:04 +0000 (13:10 +0000)]
llvm-nm: Don't leak bitcode buffers.

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

13 years agoXFAIL tblgen tests on leak checkers.
Benjamin Kramer [Mon, 10 Oct 2011 13:09:59 +0000 (13:09 +0000)]
XFAIL tblgen tests on leak checkers.

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

13 years agoWhen getting the number of bits necessary for addressing mode
Bill Wendling [Mon, 10 Oct 2011 07:24:23 +0000 (07:24 +0000)]
When getting the number of bits necessary for addressing mode
ARMII::AddrModeT1_s, we need to take into account that if the frame register is
ARM::SP, then the number of bits is 8. If it's not ARM::SP, then the number of
bits is 5.

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

13 years agoPut a bunch of calls to ToggleFeature behind proper if statements.
Craig Topper [Mon, 10 Oct 2011 05:34:02 +0000 (05:34 +0000)]
Put a bunch of calls to ToggleFeature behind proper if statements.

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

13 years agoFix a regression from r138445. If we're loading from the frame/base pointer
Chad Rosier [Mon, 10 Oct 2011 01:03:35 +0000 (01:03 +0000)]
Fix a regression from r138445.  If we're loading from the frame/base pointer
the tADDrSPi instruction can't be used.  Make sure we're updating the opcode
to tADDi3 in all cases.
rdar://10254707

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

13 years agoPTX: Print .ptr kernel attributes if PTX version >= 2.2
Justin Holewinski [Sun, 9 Oct 2011 15:42:02 +0000 (15:42 +0000)]
PTX: Print .ptr kernel attributes if PTX version >= 2.2

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

13 years agoAdd Ivy Bridge 16-bit floating point conversion instructions for the X86 disassembler.
Craig Topper [Sun, 9 Oct 2011 07:31:39 +0000 (07:31 +0000)]
Add Ivy Bridge 16-bit floating point conversion instructions for the X86 disassembler.

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

13 years agoPrevent potential NOREX bug.
Jakob Stoklund Olesen [Sat, 8 Oct 2011 20:20:03 +0000 (20:20 +0000)]
Prevent potential NOREX bug.

A GR8_NOREX virtual register is created when extrating a sub_8bit_hi
sub-register:

  %vreg2<def> = COPY %vreg1:sub_8bit_hi; GR8_NOREX:%vreg2 %GR64_ABCD:%vreg1
  TEST8ri_NOREX %vreg2, 1, %EFLAGS<imp-def>; GR8_NOREX:%vreg2

If such a live range is ever split, its register class must not be
inflated to GR8.  The sub-register copy can only target GR8_NOREX.

I dont have a test case for this theoretical bug.

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

13 years agoAdd TEST8ri_NOREX pseudo to constrain sub_8bit_hi copies.
Jakob Stoklund Olesen [Sat, 8 Oct 2011 18:28:28 +0000 (18:28 +0000)]
Add TEST8ri_NOREX pseudo to constrain sub_8bit_hi copies.

In 64-bit mode, sub_8bit_hi sub-registers can only be used by NOREX
instructions. The COPY created from the EXTRACT_SUBREG DAG node cannot
target all GR8 registers, only those in GR8_NOREX.

TO enforce this, we ensure that all instructions using the
EXTRACT_SUBREG are GR8_NOREX constrained.

This fixes PR11088.

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

13 years agoAdd missing test case for r141410.
Jakob Stoklund Olesen [Sat, 8 Oct 2011 18:06:54 +0000 (18:06 +0000)]
Add missing test case for r141410.

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

13 years agoInclude direct.h for _mkdir on mingw32 too.
Benjamin Kramer [Sat, 8 Oct 2011 15:49:19 +0000 (15:49 +0000)]
Include direct.h for _mkdir on mingw32 too.

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

13 years agoRevert r141079: tblgen: add preprocessor as a separate mode
Che-Liang Chiou [Sat, 8 Oct 2011 12:39:26 +0000 (12:39 +0000)]
Revert r141079: tblgen: add preprocessor as a separate mode

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

13 years agoAlways check if a method or a type exist before trying to create it.
Nicolas Geoffray [Sat, 8 Oct 2011 11:56:36 +0000 (11:56 +0000)]
Always check if a method or a type exist before trying to create it.

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

13 years agolib/Object: Suppress warnings on gcc-4.3.4 cygwin
NAKAMURA Takumi [Sat, 8 Oct 2011 11:22:53 +0000 (11:22 +0000)]
lib/Object: Suppress warnings on gcc-4.3.4 cygwin

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

13 years agolib/DebugInfo/DWARFDebugLine.cpp: De-Unicode-ify.
NAKAMURA Takumi [Sat, 8 Oct 2011 11:22:47 +0000 (11:22 +0000)]
lib/DebugInfo/DWARFDebugLine.cpp: De-Unicode-ify.

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

13 years agoWhitespace
NAKAMURA Takumi [Sat, 8 Oct 2011 11:22:41 +0000 (11:22 +0000)]
Whitespace

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

13 years agoDisable ABS optimization for Thumb1 target, we don't have necessary instructions...
Anton Korobeynikov [Sat, 8 Oct 2011 08:38:45 +0000 (08:38 +0000)]
Disable ABS optimization for Thumb1 target, we don't have necessary instructions there.

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

13 years agoSimplify definition of FP move instructions.
Akira Hatanaka [Sat, 8 Oct 2011 03:50:18 +0000 (03:50 +0000)]
Simplify definition of FP move instructions.

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

13 years agoDefine classes and multiclasses for FP binary instructions.
Akira Hatanaka [Sat, 8 Oct 2011 03:38:41 +0000 (03:38 +0000)]
Define classes and multiclasses for FP binary instructions.

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

13 years agoDefine multiclasses for FP-to-FP instructions.
Akira Hatanaka [Sat, 8 Oct 2011 03:29:22 +0000 (03:29 +0000)]
Define multiclasses for FP-to-FP instructions.

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

13 years agoDefine classes for FP unary instructions and multiclasses for FP-to-fixed point
Akira Hatanaka [Sat, 8 Oct 2011 03:19:38 +0000 (03:19 +0000)]
Define classes for FP unary instructions and multiclasses for FP-to-fixed point
conversion instructions.

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

13 years agoUnit test for LSR phi reuse in r141442.
Andrew Trick [Sat, 8 Oct 2011 02:34:51 +0000 (02:34 +0000)]
Unit test for LSR phi reuse in r141442.

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

13 years agoAdd patterns for unaligned load and store instructions and enable the
Akira Hatanaka [Sat, 8 Oct 2011 02:24:10 +0000 (02:24 +0000)]
Add patterns for unaligned load and store instructions and enable the
instruction selector to generate them.

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

13 years agoAdd an extra safety check in front of the optimization in r141442.
Andrew Trick [Sat, 8 Oct 2011 02:16:39 +0000 (02:16 +0000)]
Add an extra safety check in front of the optimization in r141442.

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

13 years agoUse the code that lowers the arguments and spills any values which are alive
Bill Wendling [Sat, 8 Oct 2011 00:56:47 +0000 (00:56 +0000)]
Use the code that lowers the arguments and spills any values which are alive
across unwind edges. This is for the back-end which expects such things.

The code is from the original SjLj EH pass.

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

13 years agoAdd clang-tblgen to OPTIONAL_DIRS when building native tools for the
Peter Collingbourne [Sat, 8 Oct 2011 00:27:38 +0000 (00:27 +0000)]
Add clang-tblgen to OPTIONAL_DIRS when building native tools for the
cross build, so that a native version of clang-tblgen is available.
Should unbreak Clang cross build.

Also disable Polly for the native tool build, since it depends on
external libraries which may not be available, and it isn't required
anyway.

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

13 years agollvm-objdump: Add relocation and archive support.
Michael J. Spencer [Sat, 8 Oct 2011 00:18:30 +0000 (00:18 +0000)]
llvm-objdump: Add relocation and archive support.

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

13 years agoPathV2: Add simplified version of exists that returns false on error.
Michael J. Spencer [Sat, 8 Oct 2011 00:18:12 +0000 (00:18 +0000)]
PathV2: Add simplified version of exists that returns false on error.

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

13 years agoObject: Add support for opening stdin.
Michael J. Spencer [Sat, 8 Oct 2011 00:17:58 +0000 (00:17 +0000)]
Object: Add support for opening stdin.

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

13 years agoObject: constize Archive.
Michael J. Spencer [Sat, 8 Oct 2011 00:17:45 +0000 (00:17 +0000)]
Object: constize Archive.

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

13 years agoEnable ARM mode VDUP(scalar) tests.
Jim Grosbach [Fri, 7 Oct 2011 23:57:03 +0000 (23:57 +0000)]
Enable ARM mode VDUP(scalar) tests.

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

13 years agoARM NEON assembly parsing and encoding for VDUP(scalar).
Jim Grosbach [Fri, 7 Oct 2011 23:56:00 +0000 (23:56 +0000)]
ARM NEON assembly parsing and encoding for VDUP(scalar).

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

13 years agoLSR should only reuse phis that match its formula.
Andrew Trick [Fri, 7 Oct 2011 23:46:21 +0000 (23:46 +0000)]
LSR should only reuse phis that match its formula.

Fixes rdar://problem/5064068

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

13 years agoFix APInt::operator*= so that it computes the correct result for large integers where...
Eli Friedman [Fri, 7 Oct 2011 23:40:49 +0000 (23:40 +0000)]
Fix APInt::operator*= so that it computes the correct result for large integers where there is unsigned overflow.  Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases).  Fixes PR11086.

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

13 years agoDon't emit the symbol table entry for the .symtab_shndx section either.
Nick Lewycky [Fri, 7 Oct 2011 23:29:53 +0000 (23:29 +0000)]
Don't emit the symbol table entry for the .symtab_shndx section either.

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

13 years agoRemove extraneous curlies. No functionality change.
Nick Lewycky [Fri, 7 Oct 2011 23:28:32 +0000 (23:28 +0000)]
Remove extraneous curlies. No functionality change.

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

13 years agoARM prefix asmparser operand kind enums for readability.
Jim Grosbach [Fri, 7 Oct 2011 23:24:09 +0000 (23:24 +0000)]
ARM prefix asmparser operand kind enums for readability.

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

13 years agoTake all of the invoke basic blocks and make the dispatch basic block their new
Bill Wendling [Fri, 7 Oct 2011 23:18:02 +0000 (23:18 +0000)]
Take all of the invoke basic blocks and make the dispatch basic block their new
successor. Remove the old landing pad from their successor list, because it's
now the successor of the dispatch block. Now that the landing pad blocks are no
longer the destination of invokes, we can mark them as normal basic blocks
instead of landing pads.

This more closely resembles what the CFG is actually doing.

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

13 years agoAdd a bool value to set the IsLandingPad flag to.
Bill Wendling [Fri, 7 Oct 2011 23:06:01 +0000 (23:06 +0000)]
Add a bool value to set the IsLandingPad flag to.

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

13 years agoTake the code that was emitted for the llvm.eh.dispatch.setup intrinsic and emit
Bill Wendling [Fri, 7 Oct 2011 22:08:37 +0000 (22:08 +0000)]
Take the code that was emitted for the llvm.eh.dispatch.setup intrinsic and emit
it with the new SjLj emitter stuff. This way there's no need to emit that
kind-of-hacky intrinsic.

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

13 years agoThread the chain through the eh.sjlj.setjmp intrinsic, like it's documented to
Bill Wendling [Fri, 7 Oct 2011 21:25:38 +0000 (21:25 +0000)]
Thread the chain through the eh.sjlj.setjmp intrinsic, like it's documented to
do. This will be useful later on with the new SJLJ stuff.

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

13 years agoDon't emit a shstrtabindex in the reserved range. Spotted by inspection and
Nick Lewycky [Fri, 7 Oct 2011 20:58:24 +0000 (20:58 +0000)]
Don't emit a shstrtabindex in the reserved range. Spotted by inspection and
patch by Cary Coutant!

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

13 years agoClarify/fix typo. No functionality change.
Nick Lewycky [Fri, 7 Oct 2011 20:56:23 +0000 (20:56 +0000)]
Clarify/fix typo. No functionality change.

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

13 years agoConstrain both operands on MOVZX32_NOREXrr8.
Jakob Stoklund Olesen [Fri, 7 Oct 2011 20:15:54 +0000 (20:15 +0000)]
Constrain both operands on MOVZX32_NOREXrr8.

This instruction is explicitly encoded without an REX prefix, so both
operands but be *_NOREX.

Also add an assertion to copyPhysReg() that fires when the MOV8rr_NOREX
constraints are not satisfied.

This fixes a miscompilation in 20040709-2 in the gcc test suite.

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

13 years agoFix a few changes I missed.
Michael J. Spencer [Fri, 7 Oct 2011 19:52:41 +0000 (19:52 +0000)]
Fix a few changes I missed.

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

13 years agoFix GCC again.
Michael J. Spencer [Fri, 7 Oct 2011 19:46:12 +0000 (19:46 +0000)]
Fix GCC again.

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