1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

69590 Commits

Author SHA1 Message Date
Duncan Sands
7eecb72021 Reenable the transform "(X*Y)/Y->X" when the multiplication is known not to
overflow (nsw flag), which was disabled because it breaks 254.gap.  I have
informed the GAP authors of the mistake in their code, and arranged for the
testsuite to use -fwrapv when compiling this benchmark.

llvm-svn: 124746
2011-02-02 20:52:00 +00:00
Kevin Enderby
6c73ff04e4 Changed the TableGen created MatchInstructionImpl() setting of ErrorInfo.
The algorithm for identifying which operand is invalid will now always point to
some operand and not the mnemonic sometimes.  The change is now that ErrorInfo
is the index of the highest operand that does not match for any of the matching
mnemonics records.  And no longer the ~0U value when the mnemonic matches and
not every record with a matching mnemonic has the same mismatching operand
index.

llvm-svn: 124734
2011-02-02 18:20:55 +00:00
Bob Wilson
6fabaaad65 Update comment to match my recent change.
llvm-svn: 124725
2011-02-02 17:29:40 +00:00
Benjamin Kramer
b739613711 SimplifyCFG: Turn switches into sub+icmp+branch if possible.
This makes the job of the later optzn passes easier, allowing the vast amount of
icmp transforms to chew on it.

We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting
binary on i386-linux.

The testcase from README.txt now compiles into
  decl  %edi
  cmpl  $3, %edi
  sbbl  %eax, %eax
  andl  $1, %eax
  ret

llvm-svn: 124724
2011-02-02 15:56:22 +00:00
Richard Osborne
5ee859cb22 Add support for trampolines on the XCore.
llvm-svn: 124722
2011-02-02 14:57:41 +00:00
Duncan Sands
cfc61f7efb Remove NoVendor and NoOS, added in commit 123990, from Triple. While it
may be useful to understand "none", this is not the place for it.  Tweak
the fix to Normalize while there: the fix added in 123990 works correctly,
but I like this way better.  Finally, now that Triple understands some
non-trivial environment values, teach the unittests about them.

llvm-svn: 124720
2011-02-02 10:08:38 +00:00
Nick Lewycky
4f38aaec24 Remove wasteful caching. This isn't needed for correctness because any function
that might have changed been affected by a merge elsewhere will have been
removed from the function set, and it isn't needed for performance because we
call grow() ahead of time to prevent reallocations.

llvm-svn: 124717
2011-02-02 05:31:01 +00:00
Dan Gohman
11acb5002d Conservatively, clear optional flags, such as nsw, when performing
reassociation. No testcase, because I wasn't able to create a testcase
which actually demonstrates a problem.

llvm-svn: 124713
2011-02-02 02:05:46 +00:00
Dan Gohman
4dc130ea78 Fix reassociate to clear optional flags, such as nsw.
llvm-svn: 124712
2011-02-02 02:02:34 +00:00
Sean Callanan
27a8820ffa Fixed a bug in the disassembler where the mandatory 0x66
prefix would be misinterpreted in some cases on 32-bit
x86 platforms.  Thanks to Olivier Meurant for identifying
the bug.

llvm-svn: 124709
2011-02-02 01:09:02 +00:00
Evan Cheng
c7ce7e2ac3 Given a pair of floating point load and store, if there are no other uses of
the load, then it may be legal to transform the load and store to integer
load and store of the same width.

This is done if the target specified the transformation as profitable. e.g.
On arm, this can transform:
vldr.32 s0, []
vstr.32 s0, []

to

ldr r12, []
str r12, []

rdar://8944252

llvm-svn: 124708
2011-02-02 01:06:55 +00:00
Bob Wilson
b6fe71fef9 Fix comment typo.
llvm-svn: 124705
2011-02-02 00:46:09 +00:00
Bob Wilson
a233675b43 PR9081: Split up LDM instruction with deprecated use of both LR and PC.
This is completely untested but pretty straightforward, so hopefully I
got it right.

llvm-svn: 124694
2011-02-01 22:30:51 +00:00
Matt Beaumont-Gay
de874158f4 Take Bill Wendling's suggestion for structuring a couple of asserts.
llvm-svn: 124688
2011-02-01 22:12:50 +00:00
Devang Patel
ee65f3c2c3 Update to match changes in lldb interface.
llvm-svn: 124687
2011-02-01 21:47:35 +00:00
Anton Korobeynikov
323825cee4 Fix imm printing for logical instructions.
Patch by Brian G. Lucas!

llvm-svn: 124679
2011-02-01 20:22:53 +00:00
Anton Korobeynikov
4b076fdbdb Document the LLVM GIT mirror
llvm-svn: 124677
2011-02-01 20:08:28 +00:00
David Greene
e563b14e41 [AVX] Implement EnforceSmallerThan for mixed int/fp type lists. This
makes type checking for extract_subvector and insert_subvector more
robust and will allow stricter typechecking of more patterns in the
future.

This change handles int and fp as disjoint sets so that it will
enforce integer types to be smaller than the largest integer type and
fp types to be smaller than the largest fp type.  There is no attempt
to check type sizes across the int/fp sets.

llvm-svn: 124672
2011-02-01 19:12:32 +00:00
Devang Patel
b61c9bfa72 Remove stale references of obsolete @llvm.dbg.variable.
llvm-svn: 124664
2011-02-01 17:22:12 +00:00
Jay Foad
89383f48ca Make SwitchInst::removeCase() more efficient.
llvm-svn: 124659
2011-02-01 09:22:34 +00:00
Duncan Sands
c03dbe4b1c Add a m_Undef pattern for convenience. This is so that code that uses
pattern matching can also pattern match undef, creating a more uniform
style.

llvm-svn: 124657
2011-02-01 09:06:20 +00:00
Duncan Sands
659237307a Add a m_SignBit pattern for convenience.
llvm-svn: 124656
2011-02-01 08:50:33 +00:00
Duncan Sands
06e82c76ee Have m_One also match constant vectors for which every element is 1.
llvm-svn: 124655
2011-02-01 08:39:12 +00:00
Carl Norum
667d5dbdcb Test commit - fix a double 'should' in a comment.
llvm-svn: 124652
2011-02-01 07:38:42 +00:00
Rafael Espindola
e60f9519d8 Correctly merge available_externally and regular definitions when they have
different visibilities.

llvm-svn: 124650
2011-02-01 05:33:52 +00:00
Evan Cheng
3689d1302d Fix bogus assert condition noticed by Csaba Raduly.
llvm-svn: 124645
2011-02-01 01:50:49 +00:00
Eric Christopher
f8b2388751 Reapply 124275 since the Dragonegg failure was unreproducible.
llvm-svn: 124641
2011-02-01 01:16:32 +00:00
Evan Cheng
dc27913f2d Fix test for non-darwin targets.
llvm-svn: 124640
2011-02-01 01:16:18 +00:00
Evan Cheng
0e8c521bbd Patches to build EFI with Clang/LLVM. By Carl Norum.
llvm-svn: 124639
2011-02-01 01:14:13 +00:00
Devang Patel
2b1331b4d1 Remove stale test that has never worked, afaik.
llvm-svn: 124635
2011-02-01 00:47:16 +00:00
Rafael Espindola
54673ba6ca Don't tell the linker about available_externally definitions. If we do, it will
complain about duplicated definitions.

llvm-svn: 124634
2011-02-01 00:41:51 +00:00
Devang Patel
97c467ee47 Keep track of incoming argument's location while emitting LiveIns.
llvm-svn: 124611
2011-01-31 21:38:14 +00:00
Devang Patel
23d0acc520 While printing "interesting" breakpoint locations for debug info quality test harness, focus only on entry block's terminator for now.
llvm-svn: 124610
2011-01-31 21:36:24 +00:00
Roman Divacky
254f2ab16a Enumerate .code16/32/64 instead of checking .code prefix. This
unbreaks some ARM tests.

llvm-svn: 124608
2011-01-31 21:19:43 +00:00
Devang Patel
3ff5f6ad2d Tidy up.
llvm-svn: 124605
2011-01-31 21:16:37 +00:00
Devang Patel
bf57c32e2e Focus on arguments for now.
llvm-svn: 124604
2011-01-31 21:15:39 +00:00
Roman Divacky
9a8a680ed2 Error on all .code* directives instead of just .code16 as they
all lead to a silent miscompilation of code.

llvm-svn: 124603
2011-01-31 20:56:49 +00:00
David Greene
0db8e64017 Fix vector sign extend to put the source and destination types in the
correct places.

llvm-svn: 124601
2011-01-31 20:39:01 +00:00
Chris Lattner
1d534245fc add a note, progress unblocked by PR8575 being fixed.
llvm-svn: 124599
2011-01-31 20:23:28 +00:00
Oscar Fuentes
d79df5b7c8 Adds some platform checks to cmake/config-ix.cmake and fixes checking
for dlopen/dlerror.

Patch by arrowdodger!

llvm-svn: 124590
2011-01-31 18:25:25 +00:00
Richard Osborne
11cdda2346 Fix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.
llvm-svn: 124587
2011-01-31 17:41:44 +00:00
NAKAMURA Takumi
826d7183d5 CMake: Fix a few definition to suppress warnings.
llvm-svn: 124583
2011-01-31 09:41:20 +00:00
Anton Korobeynikov
b31576ae4d Save a mapping between original and cloned constpool entries.
llvm-svn: 124570
2011-01-30 22:07:39 +00:00
Anton Korobeynikov
c608d67509 Clarify the LSDASection NULL check
llvm-svn: 124569
2011-01-30 22:07:31 +00:00
Anders Carlsson
f184e5de9a Recognize and simplify
(A+B) == A  ->  B == 0
A == (A+B)  ->  B == 0

llvm-svn: 124567
2011-01-30 22:01:13 +00:00
Jakob Stoklund Olesen
430d0693dc Respect the -tail-dup-size command line option even when optimizing for size.
This is similar to the -unroll-threshold option. There should be no change in
behavior when -tail-dup-size is not explicit on the llc command line.

llvm-svn: 124564
2011-01-30 20:38:12 +00:00
Duncan Sands
987c8bc759 Commit 124487 broke 254.gap. See if disabling the part that might be triggered
by PR9088 fixes things.

llvm-svn: 124561
2011-01-30 18:24:20 +00:00
Duncan Sands
ac01c21937 Transform (X/Y)*Y into X if the division is exact. Instcombine already knows how
to do this and more, but would only do it if X/Y had only one use.  Spotted as the
most common missed simplification in SPEC by my auto-simplifier, now that it knows
about nuw/nsw/exact flags.  This removes a bunch of multiplications from 447.dealII
and 483.xalancbmk.  It also removes a lot from tramp3d-v4, which results in much
more inlining.

llvm-svn: 124560
2011-01-30 18:03:50 +00:00
Benjamin Kramer
6b3c3de09a Teach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2) when c1 equals the amount of bits that are truncated off.
This happens all the time when a smul is promoted to a larger type.

On x86-64 we now compile "int test(int x) { return x/10; }" into
  movslq  %edi, %rax
  imulq $1717986919, %rax, %rax
  movq  %rax, %rcx
  shrq  $63, %rcx
  sarq  $34, %rax <- used to be "shrq $32, %rax; sarl $2, %eax"
  addl  %ecx, %eax

This fires 96 times in gcc.c on x86-64.

llvm-svn: 124559
2011-01-30 16:38:43 +00:00
Nick Lewycky
abfab6156c Fix 'fcmp one' constant folding. Noticed by inspection.
llvm-svn: 124557
2011-01-30 01:49:58 +00:00