1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

57668 Commits

Author SHA1 Message Date
Dan Gohman
97481fb5e0 Canonicalize ConstantInts to the right operand of commutative
operators.

The test difference is just due to the multiplication operands
being commuted (and thus requiring a more elaborate match). In
optimized code, that expression would be folded.

llvm-svn: 96816
2010-02-22 22:43:23 +00:00
Chris Lattner
e4d3e9772a expand my hack to work with nodes that have flags but no chains and the
isel doesn't know the correct # results.  This fixes 8 codegen tests,
down to 22 failures.

llvm-svn: 96815
2010-02-22 22:37:11 +00:00
Chris Lattner
1613c59dbe add a new CheckMultiOpcode opcode for checking that a node
has one of the list of acceptable opcodes for a complex 
pattern.  This fixes 4 regtest failures.

llvm-svn: 96814
2010-02-22 22:30:37 +00:00
Chris Lattner
b77c4c6a30 When matching patterns that have a complex pattern as their root, make
sure to only run the complex pattern on nodes where the target opts in.
This patch only handles targets with one opcode specified so far, but
fixes 16 failures, only 34 left.

llvm-svn: 96813
2010-02-22 22:18:05 +00:00
Chris Lattner
b9f6931c4a add some debug hooks for tracking the behavior of the isel.
llvm-svn: 96812
2010-02-22 22:15:39 +00:00
Chris Lattner
4b14d5146f remove dupes now.
llvm-svn: 96811
2010-02-22 22:15:05 +00:00
Chris Lattner
d9ac0d21f4 move #includes earlier.
llvm-svn: 96810
2010-02-22 22:14:47 +00:00
Daniel Dunbar
2097684f80 MC/Mach-O: Remove non-sensical comment, and add a missing AddValueSymbols call.
llvm-svn: 96809
2010-02-22 22:08:57 +00:00
Dan Gohman
90cc88c00f Minor formatting cleanup.
llvm-svn: 96808
2010-02-22 22:07:27 +00:00
Dan Gohman
0a0f1d2ee2 Use Instruction::isCommutative instead of duplicating it.
llvm-svn: 96807
2010-02-22 22:05:18 +00:00
Johnny Chen
0e6c232f0e Added SEL, SXTB16, SXTAB16, UXTAB16, SMMULR, SMMLAR, SMMLSR, SMUAD, and SMUSD,
for disassembly only.

llvm-svn: 96806
2010-02-22 21:50:40 +00:00
Bob Wilson
e075edf725 Erase deleted instructions from GVN's ValueTable. This fixes assertion
failures from ValueTable::verifyRemoved() when using -debug.

llvm-svn: 96805
2010-02-22 21:39:41 +00:00
Dan Gohman
8f672b95f2 Actually enable the -enable-unsafe-fp-math tests.
llvm-svn: 96796
2010-02-22 18:53:26 +00:00
Johnny Chen
bdb1fdccfb Added a bunch of instructions for disassembly only:
o signed/unsigned add/subtract
o signed/unsigned halving add/subtract
o unsigned sum of absolute difference [and accumulate]
o signed/unsigned saturate
o signed multiply accumulate/subtract [long] dual

llvm-svn: 96795
2010-02-22 18:50:54 +00:00
Arnold Schwaighofer
8427969f9c Mark the return address stack slot as mutable when moving the return address
during a tail call. A parameter might overwrite this stack slot during the tail
call. 

The sequence during a tail call is:
1.) load return address to temp reg
2.) move parameters (might involve storing to return address stack slot)
3.) store return address to new location from temp reg

If the stack location is marked immutable CodeGen can colocate load (1) with the
store (3).

This fixes bug 6225.

llvm-svn: 96783
2010-02-22 16:18:09 +00:00
Daniel Dunbar
7bf531b515 LLVMC/MultiplePluginPriorities.td: Generally XFAIL this test for now, it is
still failing during (one) llvm-gcc powerpc build, and is also failing on my
x86_64-apple-darwin10.

llvm-svn: 96781
2010-02-22 05:55:32 +00:00
Dan Gohman
2575392bf1 Remove unused variables and parameters.
llvm-svn: 96780
2010-02-22 04:11:59 +00:00
Dan Gohman
835086ef52 Fix various doxygen warnings.
llvm-svn: 96779
2010-02-22 04:10:52 +00:00
Dan Gohman
733388cdcf Fix a typo in a comment.
llvm-svn: 96778
2010-02-22 04:09:26 +00:00
Dan Gohman
dcc3634e46 Constant-fold certain comparisons with infinity and negative infinity.
llvm-svn: 96777
2010-02-22 04:06:03 +00:00
Dan Gohman
7804dbce6e Rename a variable to avoid a -Wshadow warning.
llvm-svn: 96776
2010-02-22 04:04:24 +00:00
Dan Gohman
c281a5da15 Remove the logic for reasoning about NaNs from the code that forms
SSE min and max instructions. The real thing this code needs to be
concerned about is negative zero.

Update the sse-minmax.ll test accordingly, and add tests for
-enable-unsafe-fp-math mode as well.

llvm-svn: 96775
2010-02-22 04:03:39 +00:00
Dan Gohman
c44dee5fbd When emitting an instruction which depends on both a post-incremented
induction variable value and a loop-variant value, don't force the
insert position to be at the post-increment position, because it may
not be dominated by the loop-variant value. This fixes a
use-before-def problem noticed on PPC.

llvm-svn: 96774
2010-02-22 03:59:54 +00:00
Dan Gohman
8c51905154 This cast<Instruction> is unnecessary.
llvm-svn: 96771
2010-02-22 02:07:36 +00:00
Chris Lattner
8b7f191696 enhance my hack for flags handling, this allows us to pass
CodeGen/X86/pr2182.ll.  Down to 13 x86 failures out of ~1100

llvm-svn: 96770
2010-02-22 00:47:38 +00:00
Chris Lattner
a739bef2eb fix an incorrect VT: eflags is always i32. The bug was causing us to
create an X86ISD::Cmp node with result type i64 on the 
CodeGen/X86/shift-i256.ll testcase and the new isel was assert on it
downstream.

llvm-svn: 96768
2010-02-22 00:28:59 +00:00
Chris Lattner
85fa3173ff fix most of the failures in the x86 suite by handling multiple
result nodes correctly.  Note that this includes a horrible hack
in DAGISelHeader which cannot be fixed reasonably without 
eliminating (parallel) from input patterns.  That, in turn,
can't be done until we support writing multiple result patterns
for the X86and_flag and related multiple-result nodes.

llvm-svn: 96767
2010-02-21 23:54:05 +00:00
Daniel Dunbar
a6d1ef6ee9 MC/X86: Add stub AsmBackend.
llvm-svn: 96763
2010-02-21 21:54:14 +00:00
Daniel Dunbar
b6b58bff88 MC: Sketch registry support for target specific assembler backends.
llvm-svn: 96762
2010-02-21 21:53:53 +00:00
Daniel Dunbar
518e9cbe46 Formatting tweaks (trailing whitespace, ordering, comments).
llvm-svn: 96761
2010-02-21 21:53:37 +00:00
Chris Lattner
1918d5b0aa fix an odd thinko in an assertion, all arm tests pass now.
llvm-svn: 96758
2010-02-21 20:57:28 +00:00
Chris Lattner
691dcb90a4 Always emit register class id references as i32 like
DAGISelEmitter does.  This fixes 11 arm failures (8 
left).

llvm-svn: 96757
2010-02-21 20:53:45 +00:00
Chris Lattner
37f20c29c8 add some no-unwinds, other minor cleanups.
llvm-svn: 96756
2010-02-21 20:33:20 +00:00
Anton Korobeynikov
0b402e1a61 It turned out that we failed to emit proper symbol stubs on non-x86/darwin for ages (we emitted a reference to a stub, but no stub was emitted). The code inside x86-32/macho target objfile lowering should actually be the generic one - move it there.
This (I really, really hope) should fix EH issues on ppc/darwin
and arm/darwin.

llvm-svn: 96755
2010-02-21 20:28:15 +00:00
Chris Lattner
4473066b55 speculatively teach OPC_CheckValueType and OPC_EmitNode to handle
MVT::iPTR.

llvm-svn: 96753
2010-02-21 20:15:25 +00:00
Chris Lattner
11ea2e1578 teach OPC_CheckType to handle MVT::iPTR, down to 2 ppc failures.
llvm-svn: 96752
2010-02-21 20:10:43 +00:00
Chris Lattner
26215565bf make this check a bit more generous, it may be outliving its
utility.  Down to 6 ppc failures.

llvm-svn: 96751
2010-02-21 20:02:15 +00:00
Chris Lattner
3d7cc59f2c Relax an assertion a bit. We allow replacing things like
<4 x i32> with <4 x float> values if they end up the same
register class.  This gets us up to 231 passes on the ppc
tests (only 7 fails).

llvm-svn: 96750
2010-02-21 19:35:07 +00:00
Chris Lattner
fa1fdcf146 add a triple so that this doesn't fail due to linux/ppc register printing
syntax.

llvm-svn: 96748
2010-02-21 19:27:38 +00:00
Chris Lattner
fc00a4e6b8 Sort the patterns before adding them to the FA so that we get the
least cost matches.  This gets us from 195 -> 208 passes on the ppc codegen tests.

llvm-svn: 96747
2010-02-21 19:22:06 +00:00
Duncan Sands
23f728e995 Remove a bunch of duplicated code, where there was one version taking a std::ostream
and another taking a raw_ostream, but otherwise identical.  Use raw_ostream everywhere.

llvm-svn: 96746
2010-02-21 19:15:19 +00:00
Chris Lattner
654f38165b filecheckize and add nouwinds.
llvm-svn: 96745
2010-02-21 18:53:28 +00:00
Jakob Stoklund Olesen
3a434bf60d Enable assertion to detect cyclic valno references.
This changes the stack overflow in PR6363 to an assertion failure.

llvm-svn: 96744
2010-02-21 18:51:48 +00:00
Anton Korobeynikov
fe0d6453ec IT turns out that during jumpless setcc lowering eq and ne were swapped.
This fixes PR6348

llvm-svn: 96734
2010-02-21 12:28:58 +00:00
Chris Lattner
c7fac8c8b2 when a match fails and we have to rollback, make sure to keep 'N' in
sync with the top of stack.  This fixes a bunch of failures on larger
testcases.

llvm-svn: 96732
2010-02-21 07:55:48 +00:00
Chris Lattner
e8842eb260 handle optional in flags that aren't present.
llvm-svn: 96731
2010-02-21 07:19:06 +00:00
Chris Lattner
4a9c3615f8 emit table indexes before each row so that it is debuggable.
llvm-svn: 96730
2010-02-21 07:16:41 +00:00
Chris Lattner
8a969fb824 fix two bugs in OPC_EmitRegister, which makes ppc happier.
llvm-svn: 96728
2010-02-21 06:58:27 +00:00
Chris Lattner
594803ba50 fix a table size miscomputation, target opcodes are 2 bytes.
With this, the matcher actually works reasonably well, but
crashes on larger examples in the scheduler.

llvm-svn: 96727
2010-02-21 06:44:29 +00:00
Chris Lattner
98d6a38236 emit to the right streams, to avoid emitting the push
body before the push.

llvm-svn: 96726
2010-02-21 06:30:04 +00:00