Commit Graph

14839 Commits

Author SHA1 Message Date
Chad Rosier
463fe24f1d Add support for sign-extending non-legal types in SelectSIToFP().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143603 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-03 02:04:59 +00:00
Pete Cooper
d1ffc739c1 Treat objc selector reference globals as invariant so that MachineLICM can hoist them out of loops. Fixes <rdar://problem/6027699>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143600 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-03 00:56:36 +00:00
Lang Hames
1a1d1fcc0b Try to lower memset/memcpy/memmove to vector instructions on ARM where the alignment permits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143582 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 22:52:45 +00:00
Nick Lewycky
985cc355ed I added the first test to run llvm-dwarfdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143571 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 21:02:27 +00:00
Nick Lewycky
6c1a703e54 Don't emit a directory entry for the value in DW_AT_comp_dir, that is always
implied by directory index zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143570 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 20:55:33 +00:00
Chad Rosier
e07cd5e40a Add support for comparing integer non-legal types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143559 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 18:08:25 +00:00
Owen Anderson
81550dc0a8 Fix the issue that r143552 was trying to address the _right_ way. One-register lists are legal on LDM/STM instructions, but we should not print the PUSH/POP aliases when they appear. This fixes round tripping on this instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143557 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 18:03:14 +00:00
Daniel Dunbar
0738e76381 tests: Clean up tests/CMakeLists.txt to drop some variable configuration we no
longer need substitutions for.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143555 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 17:54:51 +00:00
Andrew Trick
d3714b60b5 Rewrite LinearFunctionTestReplace to handle pointer-type IVs.
We've been hitting asserts in this code due to the many supported
combintions of modes (iv-rewrite/no-iv-rewrite) and IV types. This
second rewrite of the code attempts to deal with these cases systematically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143546 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 17:19:57 +00:00
Craig Topper
205e3378fd More AVX2 instructions and intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143536 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 06:54:17 +00:00
Craig Topper
3f2b2c218f Add a bunch more X86 AVX2 instructions and their corresponding intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143529 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 04:42:13 +00:00
Andrew Trick
3129da8d1a Broaden an assert to handle enable-iv-rewrite=true following r143183.
Narrowest possible fix for PR11279.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143522 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02 00:02:45 +00:00
Kevin Enderby
064e48a3dc Fixed a bug in the code to create a dwarf file and directory table entires when
it is separating the directory part from the basename of the FileName.  Noticed 
that this:

  .file 1 "dir/foo"

when assembled got the two parts switched.  Using the Mac OS X dwarfdump tool
it can be seen easily:

% dwarfdump -a a.out
include_directories[  1] = 'foo'
                Dir  Mod Time   File Len   File Name
                ---- ---------- ---------- ---------------------------
file_names[  1]    1 0x00000000 0x00000000 dir
...

Which should be:
...
include_directories[  1] = 'dir'
                Dir  Mod Time   File Len   File Name
                ---- ---------- ---------- ---------------------------
file_names[  1]    1 0x00000000 0x00000000 foo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 23:39:05 +00:00
Owen Anderson
60cb643f75 Fix disassembly of some VST1 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143507 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 22:18:13 +00:00
Eli Friedman
f6aa6b12f1 Teach the x86 backend a couple tricks for dealing with v16i8 sra by a constant splat value. Fixes PR11289.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143498 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 21:18:39 +00:00
Richard Osborne
0e6c1c536b Don't fold negative offsets into cp / dp accesses to avoid relocation errors.
This can happen if the address + addend is less than the start of the cp / dp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143459 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 11:31:53 +00:00
Richard Osborne
441ed4ac23 Combine various XCore tests for floating point intrinsic support into a single test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143458 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 10:51:48 +00:00
Richard Osborne
70ad3951e4 Move various XCore tests to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143457 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 10:41:28 +00:00
Craig Topper
ce7de9f36d Fix operand type for x86 pmadd_ub_sw intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143455 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 07:25:22 +00:00
Eli Friedman
049260d9e2 Make sure we use the right insertion point when instcombine replaces a PHI with another instruction. (Specifically, don't insert an arbitrary instruction before a PHI.) Fixes PR11275.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143437 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 04:49:29 +00:00
Eli Friedman
dc9414d62f Move x86-specific tests into X86 folder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 03:21:48 +00:00
Eli Friedman
9c06bc7c10 Move another test requiring x86 into X86 directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143421 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 03:12:47 +00:00
Eli Friedman
f001fe72f4 Move test requiring x86 backend into X86 directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143420 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 03:11:41 +00:00
Matt Beaumont-Gay
11f9987876 Change the actual tests to match the input directory rename (duh)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143404 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 23:56:52 +00:00
Matt Beaumont-Gay
be7a772a56 Rename "TestObjectFiles" to "Inputs" (like the pattern for Clang tests)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143400 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 23:46:38 +00:00
Rafael Espindola
5e6d548065 Move test to the X86 directory, note the PR number and only run MC once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143352 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 17:23:09 +00:00
Owen Anderson
fb6ab2b30e More not-crashing NEON disassembly updates for the vld refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143351 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 17:17:32 +00:00
Craig Topper
782c8fbd6e Fix operand type for int_x86_ssse3_phadd_sw_128 intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143336 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 07:16:37 +00:00
Craig Topper
593c1d9761 Test case for X86 FS/GS Base intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143332 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 02:15:47 +00:00
Craig Topper
6b1c5fc02a Begin adding AVX2 instructions. No selection support yet other than intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143331 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 02:15:10 +00:00
Nick Lewycky
4e478fed1b Switch new .file directive emission off by default, change llc's flag for it to
-enable-dwarf-directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143326 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 01:06:02 +00:00
Duncan Sands
6dc9e2bf74 Reapply commit 143214 with a fix: m_ICmp doesn't match conditions
with the given predicate, it matches any condition and returns the
predicate - d'oh!  Original commit message:
The expression icmp eq (select (icmp eq x, 0), 1, x), 0 folds to false.
Spotted by my super-optimizer in 186.crafty and 450.soplex.  We really
need a proper infrastructure for handling generalizations of this kind
of thing (which occur a lot), however this case is so simple that I decided
to go ahead and implement it directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143318 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 19:56:36 +00:00
Benjamin Kramer
dade3c1448 X86: Emit logical shift by constant splat of <16 x i8> as a <8 x i16> shift and zero out the bits where zeros should've been shifted in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143315 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 17:31:21 +00:00
Craig Topper
6762427e8e Fix return type for X86 mpsadbw instrinsic. The instruction takes in a vector of 8-bit integers, but produces a vector of 16-bit integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143313 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 17:22:45 +00:00
Nadav Rotem
fb0dfbbff7 Fix pr11266.
On x86: (shl V, 1) -> add V,V

Hardware support for vector-shift is sparse and in many cases we scalarize the
result. Additionally, on sandybridge padd is faster than shl.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143311 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 13:24:22 +00:00
Nadav Rotem
5157588840 Stabilize the test by specifying an exact cpu target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143307 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 08:07:50 +00:00
Nadav Rotem
b00418af67 Add a new DAGCombine optimization for BUILD_VECTOR.
If all of the inputs are zero/any_extended, create a new simple BV
which can be further optimized by other BV optimizations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143297 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-29 21:23:04 +00:00
Benjamin Kramer
f86545ecfd Force SSE for this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-29 19:43:44 +00:00
Benjamin Kramer
59e43bde28 SimplifyLibCalls: Use IRBuilder.CreateGlobalString when creating a string for printf->puts, which correctly sets the unnamed_addr bit on the resulting GlobalVariable.
Fixes PR11264.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143289 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-29 19:43:31 +00:00
Eli Friedman
09c3253d30 Revert r143214; it's breaking a bunch of stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143265 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-29 00:56:07 +00:00
Dan Gohman
6f3ddef7c5 Revert r143206, as there are still some failing tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143262 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-29 00:41:52 +00:00
NAKAMURA Takumi
29ceb7c104 test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll: [PR11218] Mark "REQUIRES: asserts" for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143247 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 23:11:03 +00:00
Jim Grosbach
89a6337085 Add Thumb2 alias for "mov Rd, #imm" to "mvn Rd, #~imm".
When '~imm' is encodable as a t2_so_imm but plain 'imm' is not. For example,
  mov r2, #-3
becomes
  mvn r2, #2

rdar://10349224


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143235 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 22:36:30 +00:00
Owen Anderson
017f87cf68 Fix illegal disassembly testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143231 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 21:45:09 +00:00
Duncan Sands
012f8547f7 The expression icmp eq (select (icmp eq x, 0), 1, x), 0 folds to false.
Spotted by my super-optimizer in 186.crafty and 450.soplex.  We really
need a proper infrastructure for handling generalizations of this kind
of thing (which occur a lot), however this case is so simple that I decided
to go ahead and implement it directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143214 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 19:01:20 +00:00
Duncan Sands
4604fc7791 A shift of a power of two is a power of two or zero.
For completeness - not spotted in the wild.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143211 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 18:30:05 +00:00
Duncan Sands
c65c747bc4 Fold icmp ugt (udiv X, Y), X to false. Spotted by my super-optimizer
in 186.crafty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143209 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 18:17:44 +00:00
Owen Anderson
cb9fed6655 Reapply r143202, with a manual decoding hook for SWP. This change inadvertantly exposed a decoding ambiguity between SWP and CPS that the auto-generated decoder can't handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143208 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 18:02:13 +00:00
Dan Gohman
bf923b815d Reapply r143177 and r143179 (reverting r143188), with scheduler
fixes: Use a separate register, instead of SP, as the
calling-convention resource, to avoid spurious conflicts with
actual uses of SP. Also, fix unscheduling of calling sequences,
which can be triggered by pseudo-two-address dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143206 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 17:55:38 +00:00
Jim Grosbach
5d0492cfc4 Thumb2 ADD/SUB instructions encoding selection outside IT block.
Outside an IT block, "add r3, #2" should select a 32-bit wide encoding
rather than generating an error indicating the 16-bit encoding is only
legal in an IT block (outside, the 'S' suffic is required for the 16-bit
encoding).

rdar://10348481


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143201 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 16:57:07 +00:00