oota-llvm.git
9 years agoinclude/llvm/Support/Unicode.h didn't have re-include guards
Artyom Skrobov [Tue, 13 May 2014 10:11:29 +0000 (10:11 +0000)]
include/llvm/Support/Unicode.h didn't have re-include guards

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

9 years ago[un]wrap extracted from lib/Target/Target[MachineC].cpp, lib/ExecutionEngine/Executio...
Artyom Skrobov [Tue, 13 May 2014 09:45:26 +0000 (09:45 +0000)]
[un]wrap extracted from lib/Target/Target[MachineC].cpp, lib/ExecutionEngine/ExecutionEngineBindings.cpp into include/llvm/IR/DataLayout.h

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

9 years agoTableGen: strengthen assert
Tim Northover [Tue, 13 May 2014 09:37:41 +0000 (09:37 +0000)]
TableGen: strengthen assert

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

9 years agoFix gcc -Wparentheses warning.
Jay Foad [Tue, 13 May 2014 08:26:53 +0000 (08:26 +0000)]
Fix gcc -Wparentheses warning.

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

9 years ago[ARM64] Fix the misleading diagnostic on bad extend amount of reg+reg addressing...
Kevin Qin [Tue, 13 May 2014 07:35:12 +0000 (07:35 +0000)]
[ARM64] Fix the misleading diagnostic on bad extend amount of reg+reg addressing mode.

A vague diagnostic replaced the misleading one.
This can fix bug 19502.

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

9 years agoFix type of shuffle resulted from shuffle merge.
Serge Pavlov [Tue, 13 May 2014 06:07:21 +0000 (06:07 +0000)]
Fix type of shuffle resulted from shuffle merge.

This fix resolves PR19730.

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

9 years agoAssert that we don't RAUW a Constant with a ConstantExpr that contains it.
Rafael Espindola [Tue, 13 May 2014 01:23:21 +0000 (01:23 +0000)]
Assert that we don't RAUW a Constant with a ConstantExpr that contains it.

We already had an assert for foo->RAUW(foo), but not for something like
foo->RAUW(GEP(foo)) and would go in an infinite loop trying to apply
the replacement.

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

9 years agoFolding into CSEL when there is ZEXT between SETCC and ADD
Weiming Zhao [Tue, 13 May 2014 00:40:58 +0000 (00:40 +0000)]
Folding into CSEL when there is ZEXT between SETCC and ADD

Normally, patterns like (add x, (setcc cc ...)) will be folded into
(csel x, x+1, not cc). However, if there is a ZEXT after SETCC, they
won't be folded. This patch recognizes the ZEXT and allows the
generation of CSINC.

This patch fixes bug 19680.

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

9 years agoConvert test to FileCheck.
Rafael Espindola [Tue, 13 May 2014 00:31:31 +0000 (00:31 +0000)]
Convert test to FileCheck.

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

9 years agoConvert test to FileCheck.
Rafael Espindola [Tue, 13 May 2014 00:07:46 +0000 (00:07 +0000)]
Convert test to FileCheck.

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

9 years agoRevert "DebugInfo: Include lexical scopes in inlined subroutines."
David Blaikie [Mon, 12 May 2014 23:53:03 +0000 (23:53 +0000)]
Revert "DebugInfo: Include lexical scopes in inlined subroutines."

This reverts commit r208506.

Some inlined subroutine scopes appear to be missing with this change.
Reverting while I investigate.

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

9 years agoUse a logical not when inverting SetCC. This unfortunately doesn't fire on any targe...
Pete Cooper [Mon, 12 May 2014 23:26:58 +0000 (23:26 +0000)]
Use a logical not when inverting SetCC.  This unfortunately doesn't fire on any targets so I couldn't find a test case to trigger it.

The problem occurs when a non-i1 setcc is inverted.  For example 'i8 = setcc' will get 'xor 0xff' to invert this.   This is clearly wrong when the boolean contents are ZeroOrOne.

This patch introduces getLogicalNOT and updates SetCC legalisation to use it.

Reviewed by Hal Finkel.

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

9 years ago[DAGCombiner] Split up an indexed load if only the base pointer value is live
Adam Nemet [Mon, 12 May 2014 23:00:03 +0000 (23:00 +0000)]
[DAGCombiner] Split up an indexed load if only the base pointer value is live

Right now the load may not get DCE'd because of the side-effect of updating
the base pointer.

This can happen if we lower a read-modify-write of an illegal larger type
(e.g. i48) such that the modification only affects one of the subparts (the
lower i32 part but not the higher i16 part).  See the testcase.

In order to spot the dead load we need to revisit it when SimplifyDemandedBits
decided that the value of the load is masked off.  This is the
CommitTargetLoweringOpt piece.

I checked compile time with ARM64 by sending SPEC bitcode files through llc.
No measurable change.

Fixes <rdar://problem/16031651>

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

9 years agoFix ARM bswap16.ll test on Windows
Louis Gerbarg [Mon, 12 May 2014 22:13:07 +0000 (22:13 +0000)]
Fix ARM bswap16.ll test on Windows

Windows on ARM only supports thumb mode execution, so we have to
explicitly pick some non-Windows OS to test ARM mode codegen.

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

9 years agoTry to fix an SDAG dependence issue with sret
Reid Kleckner [Mon, 12 May 2014 22:01:27 +0000 (22:01 +0000)]
Try to fix an SDAG dependence issue with sret

r208453 added support for having sret on the second parameter.  In that
change, the code for copying sret into a virtual register was hoisted
into the loop that lowers formal parameters.  This caused a "Wrong
topological sorting" assertion failure during scheduling when a
parameter is passed in memory.  This change undoes that by creating a
second loop that deals with sret.

I'm worried that this fix is incomplete.  I don't fully understand the
dependence issues.  However, with this change we produce the same DAGs
we used to produce, so if they are broken, they are just as broken as
they have always been.

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

9 years agoDebugInfo: Attach DW_AT_inline to inlined subprograms at DIE-construction time rather...
David Blaikie [Mon, 12 May 2014 21:50:44 +0000 (21:50 +0000)]
DebugInfo: Attach DW_AT_inline to inlined subprograms at DIE-construction time rather than as a post-processing step.

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

9 years ago[RuntimeDyld] Add support for MachO __jump_table and __pointers sections, and
Lang Hames [Mon, 12 May 2014 21:39:59 +0000 (21:39 +0000)]
[RuntimeDyld] Add support for MachO __jump_table and __pointers sections, and
SECTDIFF relocations on 32-bit x86.

This fixes several of the MCJIT regression test failures that show up on 32-bit
builds.

<rdar://problem/16886294>

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

9 years agoDebugInfo: Make gmlt debug info more gmlt-like by removing variables.
David Blaikie [Mon, 12 May 2014 21:33:03 +0000 (21:33 +0000)]
DebugInfo: Make gmlt debug info more gmlt-like by removing variables.

For some impending improvements to debug info, LLVM will start assuming
that when the CU specifies llvm::DIBuilder::LineTablesOnly, the IR for
functions described by that CU will not include variables, types, etc.

(might be worth having some test coverage for GMLT + non-GMLT CUs,
especially with non-GMLT functions inlined into GMLT CU functions)

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

9 years agoSuggested improvement by Rafael Espindola to use isa<> in a few places
Kevin Enderby [Mon, 12 May 2014 20:45:00 +0000 (20:45 +0000)]
Suggested improvement by Rafael Espindola to use isa<> in a few places
instead of dyn_cast<>.

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

9 years agoUse cast<> for unchecked use
Matt Arsenault [Mon, 12 May 2014 20:42:57 +0000 (20:42 +0000)]
Use cast<> for unchecked use

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

9 years agouse nullptr instead of NULL
Sebastian Pop [Mon, 12 May 2014 20:11:01 +0000 (20:11 +0000)]
use nullptr instead of NULL

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

9 years ago[Test] Trim unnecessary .c and .cpp from config.suffix in lit.local.cfg
Adam Nemet [Mon, 12 May 2014 19:57:31 +0000 (19:57 +0000)]
[Test] Trim unnecessary .c and .cpp from config.suffix in lit.local.cfg

Tested by comparing make check VERBOSE=1 before and after to make sure
no tests are missed.  (VERBOSE=1 prints the list of tests.)

Only one test :( remains where .cpp is required:

tools/llvm-cov/range_based_for.cpp:// RUN: llvm-cov range_based_for.cpp | FileCheck %s --check-prefix=STDOUT

The topic was discussed in this thread:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140428/214905.html

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

9 years agoAdd support bswap16 to/from memory compiling to rev16 on ARM/Thumb
Louis Gerbarg [Mon, 12 May 2014 19:53:52 +0000 (19:53 +0000)]
Add support bswap16 to/from memory compiling to rev16 on ARM/Thumb

The current patterns for REV16 misses mostn __builtin_bswap16() due to
legalization promoting the operands to from load/stores toi32s and then
truncing/extending them. This patch adds new patterns that catch the resultant
DAGs and codegens them to rev16 instructions. Tests included.

rdar://15353652

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

9 years agoUse cast<> for unchecked use
Matt Arsenault [Mon, 12 May 2014 19:26:38 +0000 (19:26 +0000)]
Use cast<> for unchecked use

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

9 years agoUse range for
Matt Arsenault [Mon, 12 May 2014 19:23:21 +0000 (19:23 +0000)]
Use range for

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

9 years agodo not assert when delinearization fails
Sebastian Pop [Mon, 12 May 2014 19:01:53 +0000 (19:01 +0000)]
do not assert when delinearization fails

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

9 years agouse isZero()
Sebastian Pop [Mon, 12 May 2014 19:01:49 +0000 (19:01 +0000)]
use isZero()

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

9 years agoDwarfDebug: Avoid an extra map lookup while constructing abstract scope DIEs and...
David Blaikie [Mon, 12 May 2014 18:23:35 +0000 (18:23 +0000)]
DwarfDebug: Avoid an extra map lookup while constructing abstract scope DIEs and reduce nesting/conditionals.

One test case had to be updated as it still had the extra indirection
for the variable list - removing the extra indirection got it back to
passing.

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

9 years agoTableGen: use PrintMethods to print more aliases
Tim Northover [Mon, 12 May 2014 18:04:06 +0000 (18:04 +0000)]
TableGen: use PrintMethods to print more aliases

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

9 years agoAArch64/ARM64: use InstAliases for NEON logical (imm) instructions.
Tim Northover [Mon, 12 May 2014 18:03:42 +0000 (18:03 +0000)]
AArch64/ARM64: use InstAliases for NEON logical (imm) instructions.

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

9 years agoAArch64/ARM64: implement "mov $Rd, $Imm" aliases in TableGen.
Tim Northover [Mon, 12 May 2014 18:03:36 +0000 (18:03 +0000)]
AArch64/ARM64: implement "mov $Rd, $Imm" aliases in TableGen.

This is a slightly different approach to AArch64 (the base instruction
definitions aren't quite right for that to work), but achieves the
same thing and reduces C++ hackery in AsmParser.

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

9 years agoR600: Add mul24 intrinsics
Matt Arsenault [Mon, 12 May 2014 17:49:57 +0000 (17:49 +0000)]
R600: Add mul24 intrinsics

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

9 years agoMake SimplifyDemandedBits understand BUILD_PAIR
Matt Arsenault [Mon, 12 May 2014 17:14:48 +0000 (17:14 +0000)]
Make SimplifyDemandedBits understand BUILD_PAIR

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

9 years ago[mips] Move disassembler test (test_2r_msa64) into correct folder.
Matheus Almeida [Mon, 12 May 2014 16:59:34 +0000 (16:59 +0000)]
[mips] Move disassembler test (test_2r_msa64) into correct folder.

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

9 years ago[mips] Move disassembler test (Mips MSA test_vec) into correct folder.
Matheus Almeida [Mon, 12 May 2014 16:31:45 +0000 (16:31 +0000)]
[mips] Move disassembler test (Mips MSA test_vec) into correct folder.

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

9 years ago[mips] Move disassembler tests (Mips MSA test_i*, test_mi10) into correct folder.
Matheus Almeida [Mon, 12 May 2014 16:26:53 +0000 (16:26 +0000)]
[mips] Move disassembler tests (Mips MSA test_i*, test_mi10) into correct folder.

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

9 years ago[mips] Move disassembler tests (Mips MSA test_elm*) into correct folder.
Matheus Almeida [Mon, 12 May 2014 16:23:45 +0000 (16:23 +0000)]
[mips] Move disassembler tests (Mips MSA test_elm*) into correct folder.

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

9 years ago[mips] Move disassembler tests (Mips MSA test_lsa, test_dlsa) into correct folder.
Matheus Almeida [Mon, 12 May 2014 16:20:46 +0000 (16:20 +0000)]
[mips] Move disassembler tests (Mips MSA test_lsa, test_dlsa) into correct folder.

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

9 years ago[mips] Move disassembler test (Mips MSA test_ctrlregs) into correct folder.
Matheus Almeida [Mon, 12 May 2014 16:16:59 +0000 (16:16 +0000)]
[mips] Move disassembler test (Mips MSA test_ctrlregs) into correct folder.

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

9 years ago[mips] Move disassembler test (Mips MSA test_bit) into correct folder.
Matheus Almeida [Mon, 12 May 2014 16:10:00 +0000 (16:10 +0000)]
[mips] Move disassembler test (Mips MSA test_bit) into correct folder.

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

9 years ago[mips] Move disassembler tests (Mips MSA test_2r, test_2rf, test_3r, test_3rf) into
Matheus Almeida [Mon, 12 May 2014 16:03:20 +0000 (16:03 +0000)]
[mips] Move disassembler tests (Mips MSA test_2r, test_2rf, test_3r, test_3rf) into
correct folder.

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

9 years agoRevert: r208582 - [mips][mips64r6] Add sel.s and sel.d
Daniel Sanders [Mon, 12 May 2014 15:43:41 +0000 (15:43 +0000)]
Revert: r208582 - [mips][mips64r6] Add sel.s and sel.d

Accidentally committed an unreviewed patch. Reverted it.

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

9 years ago[mips][mips64r6] Add sel.s and sel.d
Daniel Sanders [Mon, 12 May 2014 15:39:10 +0000 (15:39 +0000)]
[mips][mips64r6] Add sel.s and sel.d

Summary:
Also use named constants for common opcode fields.

Depends on D3669

Reviewers: jkolek, vmedic, zoran.jovanovic

Differential Revision: http://reviews.llvm.org/D3670

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

9 years ago[ARM64-BE] Correct grammar mistake pointed out by Tobias.
James Molloy [Mon, 12 May 2014 15:30:31 +0000 (15:30 +0000)]
[ARM64-BE] Correct grammar mistake pointed out by Tobias.

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

9 years ago[mips][mips64r6] Add d?div, d?mod, d?divu, d?modu
Daniel Sanders [Mon, 12 May 2014 15:24:16 +0000 (15:24 +0000)]
[mips][mips64r6] Add d?div, d?mod, d?divu, d?modu

Summary: Depends on D3668

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3669

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

9 years ago[ARM64-BE] Add sphinx documentation for the ARM64 NEON implementation.
James Molloy [Mon, 12 May 2014 15:13:39 +0000 (15:13 +0000)]
[ARM64-BE] Add sphinx documentation for the ARM64 NEON implementation.

There are some interesting decisions based on non-obvious rationale in
the ARM64-BE NEON implementation - decent documentation is definitely required.

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

9 years ago[mips][mips64r6] Added mul/mulu/muh/muhu
Daniel Sanders [Mon, 12 May 2014 15:12:45 +0000 (15:12 +0000)]
[mips][mips64r6] Added mul/mulu/muh/muhu

Summary: The 'mul' line of the test is temporarily commented out because it currently matches the MIPS32 mul instead of the MIPS32r6 mul. This line will be uncommented when we disable the MIPS32 mul on MIPS32r6.

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3668

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

9 years agoMove EmitDwarfAdvanceLineAddr and EmitDwarfAdvanceFrameAddr to the obj streamer.
Rafael Espindola [Mon, 12 May 2014 14:43:25 +0000 (14:43 +0000)]
Move EmitDwarfAdvanceLineAddr and EmitDwarfAdvanceFrameAddr to the obj streamer.

This lets us delete the MCAsmStreamer implementation. No functionality change.

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

9 years agoPass a MCObjectStreamer instead of a MCStreamer when possible.
Rafael Espindola [Mon, 12 May 2014 14:40:12 +0000 (14:40 +0000)]
Pass a MCObjectStreamer instead of a MCStreamer when possible.

No functionality change.

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

9 years agoPass a MCObjectStreamer instead of a MCStreamer when possible.
Rafael Espindola [Mon, 12 May 2014 14:28:48 +0000 (14:28 +0000)]
Pass a MCObjectStreamer instead of a MCStreamer when possible.

No functionality change.

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

9 years agoSilencing an MSVC warning about not all control paths returning a value (even though...
Aaron Ballman [Mon, 12 May 2014 14:22:58 +0000 (14:22 +0000)]
Silencing an MSVC warning about not all control paths returning a value (even though the switch is fully covered). No functional change.

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

9 years agoARM64: remove dead validation code from the AsmParser.
Tim Northover [Mon, 12 May 2014 14:13:21 +0000 (14:13 +0000)]
ARM64: remove dead validation code from the AsmParser.

If this code triggers, any immediate has already been validated so it can't
possibly trigger a diagnostic.

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

9 years agoARM64: merge "extend" and "shift" addressing-mode enums.
Tim Northover [Mon, 12 May 2014 14:13:17 +0000 (14:13 +0000)]
ARM64: merge "extend" and "shift" addressing-mode enums.

In terms of assembly, these have too much overlap to be neatly modelled as
disjoint classes: in many cases "lsl" is an acceptable alternative to either
"uxtw" or "uxtx".

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

9 years agoMove EH/Debug frame handling to the object streamer.
Rafael Espindola [Mon, 12 May 2014 14:02:44 +0000 (14:02 +0000)]
Move EH/Debug frame handling to the object streamer.

Now that the asm streamer doesn't use it, the MCStreamer doesn't need to know
about it.

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

9 years agoRemove always true argument and unused field.
Rafael Espindola [Mon, 12 May 2014 13:47:05 +0000 (13:47 +0000)]
Remove always true argument and unused field.

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

9 years agoRemove always true argument and field.
Rafael Espindola [Mon, 12 May 2014 13:40:49 +0000 (13:40 +0000)]
Remove always true argument and field.

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

9 years agoRemove always true argument.
Rafael Espindola [Mon, 12 May 2014 13:34:25 +0000 (13:34 +0000)]
Remove always true argument.

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

9 years agoRemove an always true argument.
Rafael Espindola [Mon, 12 May 2014 13:30:10 +0000 (13:30 +0000)]
Remove an always true argument.

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

9 years agoRemove write only field.
Rafael Espindola [Mon, 12 May 2014 13:20:37 +0000 (13:20 +0000)]
Remove write only field.

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

9 years agoRemove now empty method.
Rafael Espindola [Mon, 12 May 2014 13:18:13 +0000 (13:18 +0000)]
Remove now empty method.

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

9 years agoRemove the always true UseCFI member.
Rafael Espindola [Mon, 12 May 2014 13:12:22 +0000 (13:12 +0000)]
Remove the always true UseCFI member.

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

9 years agoX86: Make sure that we have SSE4.1 before we generate insertps nodes.
Benjamin Kramer [Mon, 12 May 2014 13:12:08 +0000 (13:12 +0000)]
X86: Make sure that we have SSE4.1 before we generate insertps nodes.

PR19721.

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

9 years agoRemove the useCFI constructor argument to MCAsmStreamer.
Rafael Espindola [Mon, 12 May 2014 13:07:11 +0000 (13:07 +0000)]
Remove the useCFI constructor argument to MCAsmStreamer.

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

9 years ago[mips] Marked up instructions added in MIPS32 and tested that IAS for -mcpu=mips2...
Daniel Sanders [Mon, 12 May 2014 13:04:32 +0000 (13:04 +0000)]
[mips] Marked up instructions added in MIPS32 and tested that IAS for -mcpu=mips2 does not accept them

Summary:
To limit the number of tests required, only one 32-bit and one 64-bit ISA
prior to MIPS32/MIPS64 are explicitly tested.

Depends on D3695

Reviewers: vmedic

Differential Revision: http://reviews.llvm.org/D3696

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

9 years agoRemove MCUseCFI from TargetMachine.
Rafael Espindola [Mon, 12 May 2014 13:01:42 +0000 (13:01 +0000)]
Remove MCUseCFI from TargetMachine.

It was always true.

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

9 years ago[mips] Marked up instructions added in MIPS-V and tested that IAS for -mcpu=mips...
Daniel Sanders [Mon, 12 May 2014 12:52:44 +0000 (12:52 +0000)]
[mips] Marked up instructions added in MIPS-V and tested that IAS for -mcpu=mips[1234] does not accept them

Summary:
This required a new instruction group representing the 32-bit subset of
MIPS-V that was available in MIPS32R2

Most of these instructions are correctly rejected but with the wrong error
message. These have been placed in a separate test for now. It happens
because many of the MIPS V instructions have not been implemented.

Depends on D3694

Reviewers: vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3695

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

9 years ago[mips] Fold FeatureBitCount into FeatureMips32 and FeatureMips64
Daniel Sanders [Mon, 12 May 2014 12:41:59 +0000 (12:41 +0000)]
[mips] Fold FeatureBitCount into FeatureMips32 and FeatureMips64

Summary:
DCL[ZO] are now correctly marked as being MIPS64 instructions. This has no
effect on the CodeGen tests since expansion of i64 prevented their use
anyway.

The check for MIPS16 to prevent the use of CLZ no longer prevents DCLZ as
well. This is not a functional change since DCLZ is still prohibited by
being a MIPS64 instruction (MIPS16 is only compatible with MIPS32).

No functional change

Reviewers: vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3694

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

9 years ago[mips] Fold FeatureSEInReg into FeatureMips32r2
Daniel Sanders [Mon, 12 May 2014 12:28:15 +0000 (12:28 +0000)]
[mips] Fold FeatureSEInReg into FeatureMips32r2

Summary: No functional change

Reviewers: vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3693

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

9 years ago[mips] Fold FeatureSwap into FeatureMips32r2 and FeatureMips64r2
Daniel Sanders [Mon, 12 May 2014 12:15:41 +0000 (12:15 +0000)]
[mips] Fold FeatureSwap into FeatureMips32r2 and FeatureMips64r2

Summary:
dsbh and dshd are not available on Mips32r2. No codegen test changes
required since expansion of i64 prevented the use of these instructions
anyway.

Depends on D3690

Reviewers: vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3692

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

9 years ago[mips] Replace FeatureFPIdx with FeatureMips4_32r2
Daniel Sanders [Mon, 12 May 2014 11:56:16 +0000 (11:56 +0000)]
[mips] Replace FeatureFPIdx with FeatureMips4_32r2

Summary:
No functional change.

The minor change to the MIPS16 code is in preparation for a patch that will handle 32-bit FPIdx instructions separately to 64-bit (because they were added in different revisions)

Depends on D3677

Reviewers: rkotler, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3690

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

9 years ago[ARM64] Add proper bounds checking/diagnostics to logical shifts
Bradley Smith [Mon, 12 May 2014 11:49:16 +0000 (11:49 +0000)]
[ARM64] Add proper bounds checking/diagnostics to logical shifts

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

9 years agoARM: Implement big endian bit-conversion for NEON type
Christian Pirker [Mon, 12 May 2014 11:19:20 +0000 (11:19 +0000)]
ARM: Implement big endian bit-conversion for NEON type

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

9 years agoX86ISelLowering.cpp:LowerINTRINSIC_W_CHAIN(): Prune impossible "default:" [-Wcovered...
NAKAMURA Takumi [Mon, 12 May 2014 10:16:46 +0000 (10:16 +0000)]
X86ISelLowering.cpp:LowerINTRINSIC_W_CHAIN(): Prune impossible "default:" [-Wcovered-switch-default]

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

9 years agoFix type of shuffle obtained from reordering with binary operation
Serge Pavlov [Mon, 12 May 2014 10:11:27 +0000 (10:11 +0000)]
Fix type of shuffle obtained from reordering with binary operation

In transformation:
    BinOp(shuffle(v1,undef), shuffle(v2,undef)) -> shuffle(BinOp(v1, v2),undef)
type of the undef argument must be same as type of BinOp.

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

9 years ago[ARM64] Add diagnostics for bitfield extract/insert instructions
Bradley Smith [Mon, 12 May 2014 09:44:57 +0000 (09:44 +0000)]
[ARM64] Add diagnostics for bitfield extract/insert instructions

Unfortunately, since ARM64 models all these instructions as aliases,
the checks need to be done at the time the alias is seen rather than
during instruction validation as AArch64 does it.

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

9 years ago[ARM64] Correct more bounds checks/diagnostics for arithmetic shift operands
Bradley Smith [Mon, 12 May 2014 09:41:43 +0000 (09:41 +0000)]
[ARM64] Correct more bounds checks/diagnostics for arithmetic shift operands

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

9 years ago[ARM64] Move register/register MOV handling into tablegen and improve diagnostics
Bradley Smith [Mon, 12 May 2014 09:38:16 +0000 (09:38 +0000)]
[ARM64] Move register/register MOV handling into tablegen and improve diagnostics

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

9 years agoFixed compilation issue
Elena Demikhovsky [Mon, 12 May 2014 07:45:41 +0000 (07:45 +0000)]
Fixed compilation issue

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

9 years agoAVX-512: changes in intrinsics
Elena Demikhovsky [Mon, 12 May 2014 07:18:51 +0000 (07:18 +0000)]
AVX-512: changes in intrinsics
1) Changed gather and scatter intrinsics. Now they are aligned with GCC built-ins. There is no more non-masked form. Masked intrinsic receives -1 if all lanes are executed.
2) I changed the function that works with intrinsics inside X86ISelLowering.cpp. I put all intrinsics in one table. I did it for INTRINSICS_W_CHAIN and plan to put all intrinsics from WO_CHAIN set to the same table in order to avoid the long-long "switch". (I wanted to use static map initialization that allowed by C++11 but I wasn't able to compile it on VS2012).
3) I added gather/scatter prefetch intrinsics.
4) I fixed MRMm encoding for masked instructions.

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

9 years agoCodeGen: add parenthesis around complex expression
Saleem Abdulrasool [Mon, 12 May 2014 06:08:18 +0000 (06:08 +0000)]
CodeGen: add parenthesis around complex expression

Add missing parenthesis suggested by GCC.  NFC.

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

9 years agoFix reordering of shuffles and binary operations
Serge Pavlov [Mon, 12 May 2014 05:44:53 +0000 (05:44 +0000)]
Fix reordering of shuffles and binary operations

Do not apply transformation:

    BinOp(shuffle(v1), shuffle(v2)) -> shuffle(BinOp(v1, v2))

if operands v1 and v2 are of different size.
This change fixes PR19717, which was caused by r208488.

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

9 years agoReformat blank lines.
NAKAMURA Takumi [Mon, 12 May 2014 03:32:56 +0000 (03:32 +0000)]
Reformat blank lines.

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

9 years agoFix return before else
Matt Arsenault [Sun, 11 May 2014 21:24:41 +0000 (21:24 +0000)]
Fix return before else

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

9 years ago[PowerPC] Add global named register support
Hal Finkel [Sun, 11 May 2014 19:29:11 +0000 (19:29 +0000)]
[PowerPC] Add global named register support

Support for the intrinsics that read from and write to global named registers
is added for r1, r2 and r13 (depending on the subtarget).

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

9 years agoPass the value type to TLI::getRegisterByName
Hal Finkel [Sun, 11 May 2014 19:29:07 +0000 (19:29 +0000)]
Pass the value type to TLI::getRegisterByName

We must validate the value type in TLI::getRegisterByName, because if we
don't and the wrong type was used with the IR intrinsic, then we'll assert
(because we won't be able to find a valid register class with which to
construct the requested copy operation). For PPC64, additionally, the type
information is necessary to decide between the 64-bit register and the 32-bit
subregister.

No functionality change.

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

9 years agoAdd 'override' to getRegisterByName in *ISelLowering.h
Hal Finkel [Sun, 11 May 2014 19:28:55 +0000 (19:28 +0000)]
Add 'override' to getRegisterByName in *ISelLowering.h

No functionality change intended.

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

9 years agoDebugInfo: Include lexical scopes in inlined subroutines.
David Blaikie [Sun, 11 May 2014 18:12:17 +0000 (18:12 +0000)]
DebugInfo: Include lexical scopes in inlined subroutines.

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

9 years agoDebugInfo: Simplify/correct test for correct constant emission when dealing with...
David Blaikie [Sun, 11 May 2014 17:25:50 +0000 (17:25 +0000)]
DebugInfo: Simplify/correct test for correct constant emission when dealing with derived types.

This test was using the inliner and other optimizations to test a case
that's actually a bug anyway. Bug and possible fix/discussion described
here ( http://reviews.llvm.org/D3714 ).

But the functionality that was implemented along with this test is still
desired, so simplify the test to verify a more obvious/less wrong case
that the functionality addressed: looking through const sugar to the
underlying type when emitting a constant (so the constant is emitted as
signed/unsigned as appropriate depending on the signedness of the
underlying type).

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

9 years agoDwarfUnit: Make explicit a limitation/bug in enumeration constant emission.
David Blaikie [Sun, 11 May 2014 17:04:05 +0000 (17:04 +0000)]
DwarfUnit: Make explicit a limitation/bug in enumeration constant emission.

Filed as PR19712, LLVM fails to detect the right type of an enum
constant when a frontend does not provide an underlying type for the
enumeration type.

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

9 years ago[PowerPC] On PPC32, 128-bit shifts might be runtime calls
Hal Finkel [Sun, 11 May 2014 16:23:29 +0000 (16:23 +0000)]
[PowerPC] On PPC32, 128-bit shifts might be runtime calls

The counter-loops formation pass needs to know what operations might be
function calls (because they can't appear in counter-based loops). On PPC32,
128-bit shifts might be runtime calls (even though you can't use __int128 on
PPC32, it seems that SROA might form them).

Fixes PR19709.

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

9 years agoDwarfUnit: Pick a winner between isTypeSigned and isUnsignedDIType.
David Blaikie [Sun, 11 May 2014 16:08:41 +0000 (16:08 +0000)]
DwarfUnit: Pick a winner between isTypeSigned and isUnsignedDIType.

And the winner by a nose is isUnsignedDIType, for no particular reason.

These two functions were just complements of each other and used in very
related code, so refactor callers to just use one of them.

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

9 years agoDwarfUnit: Factor out calling isUnsignedDIType into a utility function so each caller...
David Blaikie [Sun, 11 May 2014 15:56:59 +0000 (15:56 +0000)]
DwarfUnit: Factor out calling isUnsignedDIType into a utility function so each caller of emitConstantValue doesn't have to call it separately.

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

9 years agoDwarfUnit: Share common constant value emission between APInts of small (<= 64 bit...
David Blaikie [Sun, 11 May 2014 15:47:39 +0000 (15:47 +0000)]
DwarfUnit: Share common constant value emission between APInts of small (<= 64 bit) and MCOperand immediates.

Doesn't seem a good reason to duplicate this code (it was more literally
duplicated prior to r208494, and while the dataN code /does/ actually
fire in this case, it doesn't seem necessary (and the DWARF standard
recommends using udata/sdata pervasively instead of dataN, so as to
indicate signedness of the values))

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

9 years agoDebugInfo: Simplify constant value emission.
David Blaikie [Sun, 11 May 2014 15:06:20 +0000 (15:06 +0000)]
DebugInfo: Simplify constant value emission.

This code looks to have become dead at some time in the past. I tried to
reproduce cases where LLVM would emit constants with dataN, but could
not. Upon inspection it seems the code doesn't do that anymore - the
only time a size is provided by isTypeSigned is when the type is signed,
and in those cases we use sdata. dataN is only used for unsigned types
and isTypeSigned doesn't provide a value for sizeInBits in that case.

Remove the dead cases/size plumbing.

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

9 years agoSLPVectorizer: Instead of just performing CSE on dead blocks ignore them completely.
Benjamin Kramer [Sun, 11 May 2014 10:28:58 +0000 (10:28 +0000)]
SLPVectorizer: Instead of just performing CSE on dead blocks ignore them completely.

Turns out that there is a very cheap way of testing whether a block is dead,
just look it up in the DomTree. We have to do this anyways so just ignore
unreachable blocks before sorting by domination. This restores a proper
ordering for std::stable_sort when dead code is present.

Covered by existing tests & buildbots running in STL debug mode (MSVC).

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

9 years ago[llvm-readobj] Print values of FLAGS and MIPS_FLAGS dynamic table tags
Simon Atanasyan [Sun, 11 May 2014 08:48:09 +0000 (08:48 +0000)]
[llvm-readobj] Print values of FLAGS and MIPS_FLAGS dynamic table tags
in a human readable form.

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

9 years agoReorder shuffle and binary operation.
Serge Pavlov [Sun, 11 May 2014 08:46:12 +0000 (08:46 +0000)]
Reorder shuffle and binary operation.

This patch enables transformations:

    BinOp(shuffle(v1), shuffle(v2)) -> shuffle(BinOp(v1, v2))
    BinOp(shuffle(v1), const1) -> shuffle(BinOp, const2)

They allow to eliminate extra shuffles in some cases.

Differential Revision: http://reviews.llvm.org/D3525

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

9 years agoFixed a bug when lowering build_vector (PR19694)
Filipe Cabecinhas [Sun, 11 May 2014 08:12:56 +0000 (08:12 +0000)]
Fixed a bug when lowering build_vector (PR19694)

When lowering build_vector to an insertps, we would still lower it, even
if the source vectors weren't v4x32. This would break on avx if the source
was a v8x32. We now check the type of the source vectors.

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

9 years agoR600/SI: Fold fabs/fneg into src input modifier
Vincent Lejeune [Sat, 10 May 2014 19:18:39 +0000 (19:18 +0000)]
R600/SI: Fold fabs/fneg into src input modifier

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

9 years agoR600/SI: Prettier display of input modifiers
Vincent Lejeune [Sat, 10 May 2014 19:18:33 +0000 (19:18 +0000)]
R600/SI: Prettier display of input modifiers

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