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

14544 Commits

Author SHA1 Message Date
Torok Edwin
be951e90d4 ocaml bindings: add llvm_ipo based on IPO.h
llvm-svn: 141284
2011-10-06 12:12:27 +00:00
Torok Edwin
1c3d252cfd add more tests for the OCaml bindings
llvm-svn: 141283
2011-10-06 12:12:12 +00:00
Craig Topper
2614f6f120 Fix assembling of xchg %eax, %eax to not use the NOP encoding of 0x90. This was done by creating a new register group that excludes AX registers. Fixes PR10345. Also added aliases for flipping the order of the operands of xchg <reg>, %eax.
llvm-svn: 141274
2011-10-06 06:44:41 +00:00
Cameron Zwarich
cc5f846d58 Remove a check from ARM shifted operand isel helper methods, which were blocking
merging an lsl #2 that has multiple uses on A9. This shift is free, so there is
no problem merging it in multiple places. Other unprofitable shifts will not be
merged.

llvm-svn: 141247
2011-10-05 23:38:50 +00:00
David Greene
882705e63e Update Test for Multidefs
Update the MultiPat.td test to create some defs via multidefs.

llvm-svn: 141235
2011-10-05 22:42:48 +00:00
David Greene
4a605dc02c Add a Multidef Test
Add a simple test for multidefs.

llvm-svn: 141234
2011-10-05 22:42:47 +00:00
Eli Friedman
dd48bb30de PR11061: Make simplifylibcalls fold strcmp("", x) correctly.
While I'm here, fix the related issue with strncmp, add some actual tests for strcmp and strncmp, and start using StringRef::compare for constant folding instead of using strcmp/strncmp so that the optimized IR isn't dependent on the host's implementation of strcmp.

llvm-svn: 141227
2011-10-05 22:27:16 +00:00
Jim Grosbach
254b9ed208 Revert 141203. InstCombine is looping on unit tests.
llvm-svn: 141209
2011-10-05 20:44:29 +00:00
Rafael Espindola
8247f7a5dd Check for the returns_twice attribute in callsFunctionThatReturnsTwice. This
fixes PR11038, but there are still some cleanups to be done.

llvm-svn: 141204
2011-10-05 20:05:13 +00:00
Jim Grosbach
a03dd9189f Update InstCombine worklist after instruction transform is complete.
When updating the worklist for InstCombine, the Add/AddUsersToWorklist
functions may access the instruction(s) being added, for debug output for
example. If the instructions aren't yet added to the basic block, this
can result in a crash. Finish the instruction transformation before
adjusting the worklist instead.

rdar://10238555

llvm-svn: 141203
2011-10-05 20:05:00 +00:00
Dan Gohman
779ae47721 Make this test less sensitive to codegen optimizations.
llvm-svn: 141195
2011-10-05 18:13:08 +00:00
Owen Anderson
2d1e930b65 Support a valid, but not very useful, encoding of CPSIE where none of the AIF bits are set.
llvm-svn: 141190
2011-10-05 17:16:40 +00:00
Duncan Sands
f7df28c1f5 GVN does simple propagation of conditions: when it sees a conditional
branch "br i1 %x, label %if_true, label %if_false" then it replaces
"%x" with "true" in places only reachable via the %if_true arm, and
with "false" in places only reachable via the %if_false arm.  Except
that actually it doesn't: if value numbering shows that %y is equal
to %x then, yes, %y will be turned into true/false in this way, but
any occurrences of %x itself are not transformed.  Fix this.  What's
more, it's often the case that %x is an equality comparison such as
"%x = icmp eq %A, 0", in which case every occurrence of %A that is
only reachable via the %if_true arm can be replaced with 0.  Implement
this and a few other variations on this theme.  This reduces the number
of lines of LLVM IR in "GCC as one big file" by 0.2%.  It has a bigger
impact on Ada code, typically reducing the number of lines of bitcode
by around 0.4% by removing repeated compiler generated checks.  Passes
the LLVM nightly testsuite and the Ada ACATS testsuite.

llvm-svn: 141177
2011-10-05 14:28:49 +00:00
Duncan Sands
348e8c285a Generalize GVN's conditional propagation logic slightly:
it's OK for the false/true destination to have multiple
predecessors as long as the extra ones are dominated by
the branch destination.

llvm-svn: 141176
2011-10-05 14:17:01 +00:00
Andrew Trick
b4cabec37a Missing test case for r141164.
llvm-svn: 141166
2011-10-05 06:23:32 +00:00
Owen Anderson
e255773f3d Teach the MC to output code/data region marker labels in MachO and ELF modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment.
llvm-svn: 141135
2011-10-04 23:26:17 +00:00
Jim Grosbach
386f7cb041 Tidy up formatting.
llvm-svn: 141123
2011-10-04 21:43:51 +00:00
Jim Grosbach
f3373734b4 Un-XFAIL file. Comment out individual failing instructions.
llvm-svn: 141117
2011-10-04 21:16:42 +00:00
Jim Grosbach
6f00406f92 Tidy up formatting.
llvm-svn: 141115
2011-10-04 20:52:57 +00:00
Jim Grosbach
0db58d15e6 Un-XFAIL file. Fix incorrect CHECK lines. General format cleanup.
llvm-svn: 141114
2011-10-04 20:50:05 +00:00
Jim Grosbach
3df5c47ec8 Un-XFAIL file. Fix incorrect CHECK line. General format cleanup.
llvm-svn: 141113
2011-10-04 20:46:49 +00:00
Jim Grosbach
4770714494 Tidy up formatting.
llvm-svn: 141111
2011-10-04 20:42:35 +00:00
Jim Grosbach
dee6bd4517 Un-XFAIL file. Fix incorrect CHECK line.
llvm-svn: 141110
2011-10-04 20:42:09 +00:00
Jim Grosbach
d7449dd23f Un-XFAIL the file. Disable only the individual tests that aren't working yet.
llvm-svn: 141108
2011-10-04 20:34:11 +00:00
David Greene
10cf9ec1db Test Operand Arguments
Add a test to do list manipulation and pass the result as arguments.
This tests the new list element operator resolve code and provides an
example of using list manipulation to do instruction pattern
substitution.

llvm-svn: 141102
2011-10-04 18:55:40 +00:00
Jim Grosbach
58f067b61b Un-XFAIL the file. Disable only the individual tests that aren't working yet.
llvm-svn: 141099
2011-10-04 18:43:15 +00:00
Jim Grosbach
93ad98accb Tidy up. Formatting.
llvm-svn: 141096
2011-10-04 17:49:45 +00:00
David Dean
b0f6751041 Fix PR9833/PR11054 (patch provided by Patrik Hägglund)
llvm-svn: 141092
2011-10-04 16:26:41 +00:00
Craig Topper
9d32602cfd Add support in the disassembler for ignoring the L-bit on certain VEX instructions. Mark instructions that have this behavior. Fixes PR10676.
llvm-svn: 141065
2011-10-04 06:30:42 +00:00
Andrew Trick
c60e2addd9 LSR should avoid redundant edge splitting.
This handles the case in which LSR rewrites an IV user that is a phi and
splits critical edges originating from a switch.
Fixes <rdar://problem/6453893> LSR is not splitting edges "nicely"

llvm-svn: 141059
2011-10-04 03:50:44 +00:00
Andrew Trick
f9b98a3c3e Unit test for r140919, loop unroll heuristics.
llvm-svn: 141049
2011-10-04 00:07:02 +00:00
Jim Grosbach
8170db143e Tidy up. These tests are covered in the .s file tests now.
llvm-svn: 141047
2011-10-03 23:40:13 +00:00
Jim Grosbach
f38874e79e ARM assembly parsing and encoding for VMOV immediate.
llvm-svn: 141046
2011-10-03 23:38:36 +00:00
Jim Grosbach
c69258c747 ARM parsing/encoding for VCMP/VCMPE.
llvm-svn: 141038
2011-10-03 22:30:24 +00:00
Akira Hatanaka
0a697c10ae Move CHECK after entry label.
llvm-svn: 141030
2011-10-03 21:24:30 +00:00
Akira Hatanaka
76c268271d Add support for 64-bit logical NOR.
llvm-svn: 141029
2011-10-03 21:23:18 +00:00
Akira Hatanaka
ae50204423 Add support for 64-bit count leading ones and zeros instructions.
llvm-svn: 141028
2011-10-03 21:16:50 +00:00
Jim Grosbach
21a9f8f50f ARM assembly parsing and encoding for VMRS/FMSTAT.
llvm-svn: 141025
2011-10-03 21:12:43 +00:00
Akira Hatanaka
6c6ff6fde7 Add support for 64-bit divide instructions.
llvm-svn: 141024
2011-10-03 21:06:13 +00:00
Jim Grosbach
0e385170ee Update test for 141010.
llvm-svn: 141022
2011-10-03 20:58:08 +00:00
Akira Hatanaka
e3c1d7eac0 Add support for 64-bit integer multiply instructions.
llvm-svn: 141017
2011-10-03 20:01:11 +00:00
Jim Grosbach
1651804363 Tidy up a bit. Formatting.
llvm-svn: 141010
2011-10-03 17:59:31 +00:00
Craig Topper
df04bee9b2 Add support for MOVBE and RDRAND instructions for the assembler and disassembler. Includes feature flag checking, but no instrinsic support. Fixes PR10832, PR11026 and PR11027.
llvm-svn: 141007
2011-10-03 17:28:23 +00:00
Rafael Espindola
4700f53cee Add the returns_twice attribute to LLVM.
llvm-svn: 141001
2011-10-03 14:45:37 +00:00
Craig Topper
4456c94f70 Treat VEX.vvvv as a 3-bit field outside of 64-bit mode. Prevents access to registers xmm8-xmm15 outside 64-bit mode.
llvm-svn: 140997
2011-10-03 08:14:29 +00:00
Craig Topper
a3372bd949 Test updates that were supposed to go with r140993.
llvm-svn: 140994
2011-10-03 07:53:59 +00:00
Nick Lewycky
4898eef762 Reapply r140979 with fix! We never did get a testcase, but careful review of the
logic by David Meyer revealed this bug.

llvm-svn: 140992
2011-10-03 07:10:45 +00:00
Torok Edwin
b7495041db attempt to fix ocaml bindings: landing pads
llvm-svn: 140991
2011-10-03 06:41:46 +00:00
Nick Lewycky
79fec8116f Revert r140979 due to reports of bootstrap failure.
llvm-svn: 140980
2011-10-03 05:14:59 +00:00
Nick Lewycky
a760a29395 Add one more case we compute a max trip count.
llvm-svn: 140979
2011-10-03 01:03:57 +00:00