Reid Kleckner [Thu, 15 May 2014 20:39:42 +0000 (20:39 +0000)]
Remove unused variable in inliner
We have to iterate over all the calls that were inlined to find out if
any were musttail.
Sink another variable down to where its used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208913
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 15 May 2014 20:39:13 +0000 (20:39 +0000)]
Don't insert lifetime.end markers between a musttail call and ret
The allocas going out of scope are immediately killed by the return
instruction.
Reviewers: chandlerc
Differential Revision: http://reviews.llvm.org/D3630
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208912
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 May 2014 20:18:50 +0000 (20:18 +0000)]
DebugInfo: Simplify retrieving filename/directory name for line table entry building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208911
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 15 May 2014 20:11:28 +0000 (20:11 +0000)]
Teach the inliner how to preserve musttail invariants
The interesting case is what happens when you inline a musttail call
through a musttail call site. In this case, we can't break perfect
forwarding or allow any stack growth.
Instead of merging control flow from the inlined return instruction
after a musttail call into the body of the caller, leave the inlined
return instruction in the caller so that the musttail call stays in the
tail position.
More work is required in http://reviews.llvm.org/D3630 to handle the
case where the inlined function has dynamic allocas or byval arguments.
Reviewers: chandlerc
Differential Revision: http://reviews.llvm.org/D3491
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208910
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 May 2014 20:09:55 +0000 (20:09 +0000)]
DebugInfo: Add FIXME regarding DILexicalBlock uniquing fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208909
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 15 May 2014 19:50:25 +0000 (19:50 +0000)]
autoconf: Fix libLLVM-Major-Minor-Patch.so symlink
The symlink needs to point to a relative path, so we don't break
building in a chroot.
Tested-by: Laurent Carlier <lordheavym@gmail.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208908
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 15 May 2014 18:04:09 +0000 (18:04 +0000)]
[obj2yaml][ELF] Print relocation's offset as a hex number. Use a proper
types to hold relocation's offset and addend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208906
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 15 May 2014 18:04:02 +0000 (18:04 +0000)]
[obj2yaml][ELF] Do not print empty Link and Info fields for ELF sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208905
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 15 May 2014 17:49:20 +0000 (17:49 +0000)]
Revert "[PM] Add pass run listeners to the pass manager."
Revert the current implementation and C API. New implementation and C APIs are
in the works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208904
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Thu, 15 May 2014 16:28:32 +0000 (16:28 +0000)]
[ARM64] Improve diagnostics for Cn operands in SYS instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208902
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 15 May 2014 16:14:02 +0000 (16:14 +0000)]
[yaml2obj] Add "-o" command line option to specify an output file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208900
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 15 May 2014 15:45:31 +0000 (15:45 +0000)]
llvm/test/CodeGen/X86/combine-sse41-intrinsics.ll: Add explicit triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208897
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 15 May 2014 15:18:15 +0000 (15:18 +0000)]
[X86] Teach the backend how to fold SSE4.1/AVX/AVX2 blend intrinsics.
Added target specific combine rules to fold blend intrinsics according
to the following rules:
1) fold(blend A, A, Mask) -> A;
2) fold(blend A, B, <allZeros>) -> A;
3) fold(blend A, B, <allOnes>) -> B.
Added two new tests to verify that the new folding rules work for all
the optimized blend intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208895
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 15 May 2014 15:16:36 +0000 (15:16 +0000)]
[mips][mips64r6] Add CLASS.fmt instructions
Differential Revision: http://reviews.llvm.org/D3712
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208894
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 15 May 2014 15:04:37 +0000 (15:04 +0000)]
[mips][mips64r6] Add RINT.fmt instructions
Differential Revision: http://reviews.llvm.org/D3711
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208892
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 15 May 2014 14:58:42 +0000 (14:58 +0000)]
[mips][mips64r6] Add SELEQZ/SELNEZ.fmt instructions
Differential Revision: http://reviews.llvm.org/D3710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208891
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 15 May 2014 14:54:06 +0000 (14:54 +0000)]
[mips][mips64r6] Add MAX/MIN/MAXA/MINA.fmt instructions
Differential Revision: http://reviews.llvm.org/D3709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208890
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 15 May 2014 14:41:57 +0000 (14:41 +0000)]
R600/SI: Stop using VSrc_* as the default register class for types.
We now use SReg_* for integer types and VReg_* for floating-point types.
This should help simplify the SIFixSGPRCopies pass and no longer causes
ISel to insert a COPY after termiator instuctions that output a value.
This change is covered by exisitng tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208888
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 15 May 2014 14:41:55 +0000 (14:41 +0000)]
R600/SI: Fix a bug with handling of INSERT_SUBREG in SIFixSGPRCopies
This prevents a future commit from regressing the load-i1.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208887
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 15 May 2014 14:41:54 +0000 (14:41 +0000)]
R600/SI: Only use SALU instructions for 64-bit add in a block of CF depth 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208886
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 15 May 2014 14:41:50 +0000 (14:41 +0000)]
R600/SI: Use VALU instructions for i1 ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208885
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 15 May 2014 13:36:01 +0000 (13:36 +0000)]
TableGen: use correct MIOperand when printing aliases
Previously, TableGen assumed that every aliased operand consumed precisely 1
MachineInstr slot (this was reasonable because until a couple of days ago,
nothing more complicated was eligible for printing).
This allows a couple more ARM64 aliases to print so we can remove the special
code.
On the X86 side, I've gone for explicit AT&T size specifiers as the default, so
turned off a few of the aliases that would have just started printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208880
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 15 May 2014 12:18:23 +0000 (12:18 +0000)]
[mips][mips64r6] Add bitswap, and dbitswap
Summary: Depends on D3728
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3729
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208877
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Thu, 15 May 2014 12:12:55 +0000 (12:12 +0000)]
Instead of littering asserts throughout the code after every call to
computeKnownBits, consolidate them into one assert at the end of
computeKnownBits itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208876
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 15 May 2014 12:11:02 +0000 (12:11 +0000)]
ARM64: print correct aliases for NEON mov & mvn instructions
In all cases, if a "mov" alias exists, it is the canonical form of the
instruction. Now that TableGen can support aliases containing syntax variants,
we can enable them and improve the quality of the asm output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208874
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 15 May 2014 12:06:36 +0000 (12:06 +0000)]
[mips][mips64r6] Add align and dalign
Summary: Depends on D3689
Reviewers: vmedic, zoran.jovanovic, jkolek
Reviewed By: jkolek
Differential Revision: http://reviews.llvm.org/D3728
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208872
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 15 May 2014 11:16:32 +0000 (11:16 +0000)]
TableGen/ARM64: print aliases even if they have syntax variants.
To get at least one use of the change (and some actual tests) in with its
commit, I've enabled the AArch64 & ARM64 NEON mov aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208867
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 15 May 2014 11:16:19 +0000 (11:16 +0000)]
ARM64: add correct vector registers during asm parsing
Previously, we ignored the difference between V64 and V128 when parsing
assembly: they both got mapped to registers in the FPR128 class. This is
basically harmless at the moment because they both print and encode the same
way. However, it will affect the printing of aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208866
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Thu, 15 May 2014 11:08:30 +0000 (11:08 +0000)]
[ARM64] Improve load/store diagnostics and forbid 32-bit register addresses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208864
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Thu, 15 May 2014 11:07:57 +0000 (11:07 +0000)]
[ARM64] Parse fixed vector lanes properly so that diagnostics can be emitted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208863
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Thu, 15 May 2014 11:07:28 +0000 (11:07 +0000)]
[ARM64] Add/Fixup diagnostics for floating point immediates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208862
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Thu, 15 May 2014 11:06:51 +0000 (11:06 +0000)]
[ARM64] Add condition code operand type such that proper diagnostics can be emitted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208861
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Thu, 15 May 2014 11:06:16 +0000 (11:06 +0000)]
[ARM64] Add more simple diagnostics for immediate/shift ranges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208860
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 15 May 2014 10:45:58 +0000 (10:45 +0000)]
[mips][mips64r6] Add addiupc, aluipc, and auipc
Summary:
No support for symbols in place of the immediate yet since it requires new
relocations.
Depends on D3671
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3689
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208858
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 15 May 2014 10:27:19 +0000 (10:27 +0000)]
[mips][mips64r6] Add aui, daui, dahi, and dati
Summary: Depends on D3671
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3759
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208857
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 May 2014 09:56:28 +0000 (09:56 +0000)]
Teach the constant folder to look through bitcast constant expressions
much more effectively when trying to constant fold a load of a constant.
Previously, we only handled bitcasts by trying to find a totally generic
byte representation of the constant and use that. Now, we look through
the bitcast to see what constant we might fold the load into, and then
try to form a constant expression cast of the found value that would be
equivalent to loading the value.
You might wonder why on earth this actually matters. Well, turns out
that the Itanium ABI causes us to create a single array for a vtable
where the first elements are virtual base offsets, followed by the
virtual function pointers. Because the array is homogenous the element
type is consistently i8* and we inttoptr the virtual base offsets into
the initial elements.
Then constructors bitcast these pointers to i64 pointers prior to
loading them. Boom, no more constant folding of virtual base offsets.
This is the first fix to LLVM to address the *insane* performance Eric
Niebler discovered with Clang on his range comprehensions[1]. There is
more to come though, this doesn't *really* fix the problem fully.
[1]: http://ericniebler.com/2014/04/27/range-comprehensions/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208856
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 15 May 2014 09:47:43 +0000 (09:47 +0000)]
[mips][mips64r6] Test that branch likelies are not accepted on MIPS64r6.
Summary:
They aren't implemented for any ISA at the moment.
Depends on D3670
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3671
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208855
91177308-0d34-0410-b5e6-
96231b3b80d8
Dinesh Dwivedi [Thu, 15 May 2014 08:22:55 +0000 (08:22 +0000)]
Reverting r208848, reason: build failure: sanitizer-x86_64-linux-bootstrap/builds/3399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208852
91177308-0d34-0410-b5e6-
96231b3b80d8
Dinesh Dwivedi [Thu, 15 May 2014 06:13:40 +0000 (06:13 +0000)]
Added instcombine for 'MIN(MIN(A, 27), 93)' and 'MAX(MAX(A, 93), 27)'
MIN(MIN(A, 23), 97) -> MIN(A, 23)
MAX(MAX(A, 97), 23) -> MAX(A, 97)
Differential Revision: http://reviews.llvm.org/D3629
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208849
91177308-0d34-0410-b5e6-
96231b3b80d8
Dinesh Dwivedi [Thu, 15 May 2014 06:01:33 +0000 (06:01 +0000)]
Added inst combine transforms for single bit tests from Chris's note
if ((x & C) == 0) x |= C becomes x |= C
if ((x & C) != 0) x ^= C becomes x &= ~C
if ((x & C) == 0) x ^= C becomes x |= C
if ((x & C) != 0) x &= ~C becomes x &= ~C
if ((x & C) == 0) x &= ~C becomes nothing
Z3 Verifications code for above transform
http://rise4fun.com/Z3/Pmsh
Differential Revision: http://reviews.llvm.org/D3717
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208848
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonathan Roelofs [Thu, 15 May 2014 02:24:50 +0000 (02:24 +0000)]
Fix some dyslexia in an assert message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208842
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 15 May 2014 01:52:21 +0000 (01:52 +0000)]
Fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208839
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Thu, 15 May 2014 01:33:17 +0000 (01:33 +0000)]
[ARM64] Support aggressive fastcc/tailcallopt breaking ABI by popping out argument stack from callee.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208837
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 May 2014 01:25:04 +0000 (01:25 +0000)]
Remove unused functions setting MCOptions from TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208835
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 May 2014 01:10:50 +0000 (01:10 +0000)]
Unify command line handling of MCTargetOptions and remove extra
options and code. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208833
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 May 2014 01:08:00 +0000 (01:08 +0000)]
Move the TargetMachine MC options to MCTargetOptions. No functional
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208832
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 15 May 2014 00:02:20 +0000 (00:02 +0000)]
InstCombine: Optimize -x s< cst
Summary:
This gets rid of a sub instruction by moving the negation to the
constant when valid.
Reviewers: nicholas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D3773
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208827
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 May 2014 22:51:59 +0000 (22:51 +0000)]
DwarfDebug: Don't set frame index locations on abstract variables.
Abstract variables should never have/use locations. In this case the
data wasn't used, so no functional change intended here, just
simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208820
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 May 2014 21:52:46 +0000 (21:52 +0000)]
DebugInfo: Sure up subprogram variable list handling with more assertions and fewer conditionals.
Many old tests using prior schemas still had some brokenness here (both
indirect arrays and arrays with single bogus elements). Fixed those up
so they don't hit the new assertions.
Also reduced nesting in some places, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208817
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 May 2014 21:52:37 +0000 (21:52 +0000)]
DebugInfo: Assert that a CU's subprogram list contains only subprograms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208816
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 14 May 2014 21:18:50 +0000 (21:18 +0000)]
Teach llvm-nm to know about fat archives (aka MachOUniversal files
containing archives). First step as other tools will be updated next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208812
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 14 May 2014 21:14:37 +0000 (21:14 +0000)]
Rename ComputeMaskedBits to computeKnownBits. "Masked" has been
inappropriate since it lost its Mask parameter in r154011.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208811
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 14 May 2014 20:16:28 +0000 (20:16 +0000)]
InstSimplify: Optimize signed icmp of -(zext V)
Summary:
We know that -(zext V) will always be <= zero, simplify signed icmps
that have these.
Uncovered using http://www.cs.utah.edu/~regehr/souper/
Reviewers: nicholas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D3754
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208809
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 May 2014 17:58:53 +0000 (17:58 +0000)]
DebugInfo: Do not delay attaching DW_AT_inline attribute to abstract definitions.
This is just unneccessary - we only create abstract definitions when
we're inlining anyway, so there's no reason to delay this to see if
we're going to inline anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208798
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Wed, 14 May 2014 16:59:44 +0000 (16:59 +0000)]
ARM-BE: test files for vector argument passing
Reviewed at http://reviews.llvm.org/D3766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208793
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Wed, 14 May 2014 16:51:58 +0000 (16:51 +0000)]
[ARM64-BE] Fix byte order of CIE and FDE frames for exception handling
Reviewed at http://reviews.llvm.org/D3741
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208792
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Wed, 14 May 2014 16:38:30 +0000 (16:38 +0000)]
Fix ARM EHABI when function has landingpad and nounwind.
If the function has the landingpad instruction, then the
handlerdata should be emitted even if the function has
nouwnind attribute. Otherwise, following code will not
work:
void test1() noexcept {
try {
throw_exception();
} catch (...) {
log_unexpected_exception();
}
}
Since the cantunwind was incorrectly emitted and the
LSDA is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208791
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Wed, 14 May 2014 16:37:32 +0000 (16:37 +0000)]
More test case for r208715.
The commit r208166 will cause some regression on ARM EHABI.
This fix has been committed in r208715, and an assertion failure
test case has been committed in r208770.
This commit further extends the unittest so that the actual
value in the handlerdata will be checked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208790
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 14 May 2014 16:14:45 +0000 (16:14 +0000)]
X86: If we have an instruction that sets a flag and a zero test on the input of that instruction try to eliminate the test.
For example
tzcntl %edi, %ebx
testl %edi, %edi
je .label
can be rewritten into
tzcntl %edi, %ebx
jb .label
A minor complication is that tzcnt sets CF instead of ZF when the input
is zero, we have to rewrite users of the flags from ZF to CF. Currently
we recognize patterns using lzcnt, tzcnt and popcnt.
Differential Revision: http://reviews.llvm.org/D3454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208788
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 14 May 2014 15:35:03 +0000 (15:35 +0000)]
[mips] Test that IAS for -mcpu=mips5 does not accept MIPS64 insns and -mcpu=mips(5|64) does not accept MIPS64r2
Summary:
To limit the number of tests required, only one 64-bit ISA prior to MIPS64 are tested.
rdhwr has been deliberately left without an ISA annotation for now. This is
because the assembler and CodeGen disagree on when the instruction is
available. Strictly speaking, it is only available in MIPS32r2 and
MIPS64r2. However, it is emulated by a kernel trap on earlier ISA's and is
necessary for TLS so CodeGen should emit it on older ISA's too.
Depends on D3697
Reviewers: vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208785
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 14 May 2014 15:29:44 +0000 (15:29 +0000)]
[mips][mips64r6] Add sel.s and sel.d
Summary:
Also use named constants for common opcode fields.
Depends on D3669
Reviewers: vmedic, zoran.jovanovic, jkolek
Reviewed By: jkolek
Differential Revision: http://reviews.llvm.org/D3670
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208784
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 14 May 2014 14:44:18 +0000 (14:44 +0000)]
ARM64: remove unneeded InstPrinter hacks
Now that TableGen handles aliases, these are unneeded. Hopefully more will be
able to go soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208781
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 14 May 2014 11:13:31 +0000 (11:13 +0000)]
Regression test for ARM EHABI breakage in r208166.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208770
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 14 May 2014 10:56:19 +0000 (10:56 +0000)]
[asan] Fix compiler warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208769
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 14 May 2014 10:30:15 +0000 (10:30 +0000)]
[asan] Set debug location in ASan function prologue.
Most importantly, it gives debug location info to the coverage callback.
This change also removes 2 cases of unnecessary setDebugLoc when IRBuilder
is created with the same debug location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208767
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Wed, 14 May 2014 09:22:15 +0000 (09:22 +0000)]
Update of the documentation: I think we are now happy with Phabricator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208764
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Wed, 14 May 2014 09:05:09 +0000 (09:05 +0000)]
Fix the case when reordering shuffle and binop produces a constant.
This resolves PR19737.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208762
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 14 May 2014 08:10:16 +0000 (08:10 +0000)]
Fix strange typo in markup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208759
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 14 May 2014 08:00:07 +0000 (08:00 +0000)]
Update the comments for ComputeMaskedBits, which lost its Mask parameter
in r154011.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208757
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 14 May 2014 05:07:47 +0000 (05:07 +0000)]
[obj2yaml] Support ELF input format in the obj2yaml tool.
The ELF header e_flags field in the MIPS related test cases handled
incorrectly. The obj2yaml prints too many flags. I will fix that in the
next patches.
The patch reviewed by Michael Spencer and Sean Silva.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208752
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 14 May 2014 03:47:39 +0000 (03:47 +0000)]
ARM: implement support for the UDF mnemonic
The UDF instruction is a reserved undefined instruction space. The assembler
mnemonic was introduced with ARM ARM rev C.a. The instruction is not predicated
and the immediate constant is ignored by the CPU. Add support for the three
encodings for this instruction.
The changes to the invalid instruction test is due to the fact that the invalid
instructions actually overlap with the undefined instruction. Introduction of
the new instruction results in a partial decode as an undefined sequence. Drop
the tests as they are invalid instruction patterns anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208751
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 May 2014 03:03:05 +0000 (03:03 +0000)]
Optimize integral reciprocal (udiv 1, x and sdiv 1, x) to not use division. This fires exactly once in a clang bootstrap, but covers a few different results from cs.utah.edu/~regehr/souper/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208750
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 May 2014 01:08:28 +0000 (01:08 +0000)]
Recommit r208506: DebugInfo: Include lexical scopes in inlined subroutines.
This was reverted in r208642 due to regressions surrounding file changes
within lexical scopes causing inlining information to be lost.
The issue was in LexicalScopes::getOrCreateInlinedScope, where I was
previously testing "isLexicalBlock" which is false for
"DILexicalBlockFile" (a scope used to represent changes in the current
file name) and assuming it was then a function (breaking out of the
inlined scope path and reaching for the parent non-inlined scopes). By
inverting the condition and testing for "isSubprogram" the correct
behavior is attained.
(also found some weirdness in Clang, see r208742 when reducing this test
case - the resulting test case doesn't apply with the Clang fix, but
I've added a more realistic test case to inline-scopes.ll which does
reproduce the issue and demonstrate the fix)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208748
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 14 May 2014 00:31:15 +0000 (00:31 +0000)]
Fix typo in function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208743
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 13 May 2014 23:45:50 +0000 (23:45 +0000)]
R600/SI: Try to fix BFE operands when moving to VALU
This was broken by r208479
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208740
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 13 May 2014 22:37:41 +0000 (22:37 +0000)]
[tools][llvm-rtdyld] Add a '-dylib <file>' option to llvm-rtdyld to load shared
libraries before linking and executing the target objects.
This allows programs that use external calls (e.g. to libc) to be run under
llvm-rtdyld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208739
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 13 May 2014 22:09:07 +0000 (22:09 +0000)]
[RuntimeDyld] Fix handling of i386 PC-rel external relocations. This fixes
several more i386 MCJIT regression test failures.
<rdar://problem/
16889891>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208735
91177308-0d34-0410-b5e6-
96231b3b80d8
Louis Gerbarg [Tue, 13 May 2014 21:54:22 +0000 (21:54 +0000)]
Add missing line breaks to debug output in CodeGenPrepare
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208731
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 13 May 2014 21:06:40 +0000 (21:06 +0000)]
GVN: Fix non-determinism in map iteration.
Iterating over a DenseMaop is non-deterministic and results to unpredictable IR
output.
Based on a patch by Daniel Reynaud!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208728
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 13 May 2014 21:06:36 +0000 (21:06 +0000)]
GVN: rangify a couple of loops.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208727
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 13 May 2014 20:49:08 +0000 (20:49 +0000)]
Save the optimization level the subtarget was created with in a
member variable and sink the initialization of crbits into the
subtarget feature reset code.
No functional change, but this refactor will be used in a future
commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208726
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 13 May 2014 19:55:17 +0000 (19:55 +0000)]
Make the split function use StringRef::split.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208723
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 13 May 2014 19:37:03 +0000 (19:37 +0000)]
autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try)
We were using libLLVM-Major.Minor.Patch.so for the soname, but we
need the soname to stay consistent for all Major.Minor.* releases
otherwise operating system distributors will need to rebuild all
packages that link with LLVM every time there is a new point release.
This patch also reverses the compatibility symlink, so
libLLVM-Major.Minor.Patch.so is now a symlink that points
to libLLVM-Major-Minor.so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208721
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 13 May 2014 18:45:48 +0000 (18:45 +0000)]
Split GlobalValue into GlobalValue and GlobalObject.
This allows code to statically accept a Function or a GlobalVariable, but
not an alias. This is already a cleanup by itself IMHO, but the main
reason for it is that it gives a lot more confidence that the refactoring to fix
the design of GlobalAlias is correct. That will be a followup patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208716
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 13 May 2014 17:58:13 +0000 (17:58 +0000)]
Check explicitly for EHABI and just use the default settings.
Code depends on the assembler and linker to fix things up...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208715
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Tue, 13 May 2014 17:06:51 +0000 (17:06 +0000)]
ARM: Additional test files for thumb fixups (checked with llvm-mv -show-encoding)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208712
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Tue, 13 May 2014 16:44:30 +0000 (16:44 +0000)]
ARMEB: Fix byte order of EH frame unwinding instructions, with modified test file
This commit was already commited as revision rL208689 and discussd in
phabricator revision D3704.
But the test file was crashing on OS X and windows.
I fixed the test file in the same way as in rL208340.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208711
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 13 May 2014 16:41:02 +0000 (16:41 +0000)]
Style fix: The name of variables starts with an upper case letter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208710
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 13 May 2014 16:35:56 +0000 (16:35 +0000)]
Revert "autoconf: Fix soname for libLLVM-Major.Minor.so"
This reverts commit r208708.
I forgot to run make clean before testing this and it broke tools
linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208709
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 13 May 2014 16:18:55 +0000 (16:18 +0000)]
autoconf: Fix soname for libLLVM-Major.Minor.so
We were using libLLVM-Major.Minor.Patch.so for the soname, but we
need the soname to stay consistent for all Major.Minor.* releases
otherwise operating system distributors will need to rebuild all
packages that link with LLVM every time there is a new point release.
This patch also reverses the compatibility symlink, so
libLLVM-Major.Minor.Patch.so is now a symlink that points
to libLLVM-Major-Minor.so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208708
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Tue, 13 May 2014 15:42:45 +0000 (15:42 +0000)]
[CGP] r205941 changed the logic, so that a cast happens *before* 'Result' is
compared to 'AddrMode.BaseReg'. In the case that 'AddrMode.BaseReg' is
nullptr, 'Result' will also be nullptr, so the cast causes an assertion. We
should use dyn_cast_or_null here to check 'Result' is not null and it is an
instruction.
Bug found by Mats Petersson, and I reduced his IR to get a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208705
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 13 May 2014 15:19:56 +0000 (15:19 +0000)]
Revert "ARMEB: Fix byte order of EH frame unwinding instructions"
This reverts commit r208689.
The test was crashing on OS X and windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208704
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 13 May 2014 12:52:35 +0000 (12:52 +0000)]
Teach the table generator to not generate switch statements containing only a default label with no cases. This solves some warnings with MSVC.
No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208694
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Tue, 13 May 2014 11:50:39 +0000 (11:50 +0000)]
ARM: Additional test files for thumb fixups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208691
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 13 May 2014 11:45:36 +0000 (11:45 +0000)]
[mips] Marked up instructions added in MIPS32r2 and tested that IAS for -mcpu=mips(2|32) does not accept them
Summary:
This required a new instruction group representing the 32-bit subset of
MIPS-3 that was available in MIPS32R2.
To limit the number of tests required, only one 32-bit and one 64-bit ISA
prior to MIPS32/MIPS64 are tested.
rdhwr has been deliberately left without an ISA annotation for now. This is
because the assembler and CodeGen disagree on when the instruction is
available. Strictly speaking, it is only available in MIPS32r2 and
MIPS64r2. However, it is emulated by a kernel trap on earlier ISA's and is
necessary for TLS so CodeGen should emit it on older ISA's too.
Depends on D3696
Reviewers: vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3697
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208690
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Tue, 13 May 2014 11:41:49 +0000 (11:41 +0000)]
ARMEB: Fix byte order of EH frame unwinding instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208689
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 13 May 2014 11:17:46 +0000 (11:17 +0000)]
[mips] Free up two values in SubtargetFeatureFlag by folding the redundant IsGP32/IsGP64 into IsGP32bit/IsGP64bit
Summary:
We are currently very close to the 32-bit limit of the current assembler
implementation. This is because there is no way to represent an instruction
that is available in, for example, Mips3 or Mips32. We have to define a
feature bit that represents this.
This patch cleans up a pair of redundant feature bits and slightly postpones the
point we will reach the limit.
Reviewers: zoran.jovanovic, jkolek, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3703
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208685
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Tue, 13 May 2014 11:16:22 +0000 (11:16 +0000)]
Fix build failure with MSVC, following r208680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208684
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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