1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

4711 Commits

Author SHA1 Message Date
Chandler Carruth
341ed5f0a0 Remove a grep that is already checked with FileCheck.
llvm-svn: 134346
2011-07-02 20:42:56 +00:00
Chandler Carruth
88e183829b FileCheck-ize
llvm-svn: 134345
2011-07-02 20:42:53 +00:00
Chandler Carruth
7a0f51e003 FileCheck-ize and modernize IR.
llvm-svn: 134344
2011-07-02 20:42:50 +00:00
Chandler Carruth
4af34fe339 FileCheck-ize and simplify RUNs.
llvm-svn: 134343
2011-07-02 20:42:48 +00:00
Chandler Carruth
9e114fc3ee FileCheck-ize and modernize the RUN line.
llvm-svn: 134342
2011-07-02 20:42:44 +00:00
Chandler Carruth
df1690a113 FileCheck-ize, tightening checks and avoiding a temporary file.
llvm-svn: 134341
2011-07-02 20:42:42 +00:00
Chandler Carruth
a5b1de166b FileCheck-ize, tightening checks and avoiding a temporary file.
llvm-svn: 134340
2011-07-02 20:42:39 +00:00
Chandler Carruth
c041ee0766 FileCheck-ize
llvm-svn: 134339
2011-07-02 20:42:36 +00:00
Chandler Carruth
4f82b948fd FileCheck-ize
llvm-svn: 134338
2011-07-02 20:42:33 +00:00
Chandler Carruth
e344d9c676 FileCheck-ize a test, avoiding a temporary file.
llvm-svn: 134337
2011-07-02 20:42:31 +00:00
Chandler Carruth
d939fba46d FileCheck-ize and simplify this test.
llvm-svn: 134336
2011-07-02 20:42:28 +00:00
Chandler Carruth
b870175dd5 FileCheck-ize
llvm-svn: 134335
2011-07-02 20:42:25 +00:00
Chandler Carruth
d98a57cc5a FileCheck-ize another codegen test.
llvm-svn: 134334
2011-07-02 20:42:22 +00:00
Chandler Carruth
4c7e28777b Partially FileCheck-ize a test to remove a weird quoting situation.
llvm-svn: 134333
2011-07-02 20:42:20 +00:00
Chandler Carruth
0d1da937eb FileCheck-ize another test, and upgrade its syntax a bit.
llvm-svn: 134332
2011-07-02 20:42:17 +00:00
Chandler Carruth
4fd8502d12 FileCheck-ize another codegen test, tightening it up.
llvm-svn: 134331
2011-07-02 20:42:14 +00:00
Chandler Carruth
b74aff3ce8 FileCheck-ize another test, making it much more precise for testing the
individual cases, while hard coding less about registers in use.

llvm-svn: 134330
2011-07-02 20:42:11 +00:00
Chandler Carruth
70fa55f478 FileCheck-ize another test. This one is more clear and runs fewer
commands as a result.

llvm-svn: 134329
2011-07-02 20:42:08 +00:00
Chandler Carruth
72358a4bf8 FileCheck-ize a test, no functionality changed.
llvm-svn: 134328
2011-07-02 20:42:06 +00:00
Jakob Stoklund Olesen
b94d989634 Better diagnostics when inline asm fails to allocate.
asm.c:2:7: error: ran out of registers during register allocation
  asm(""::"r"(0), "r"(1), "r"(2), "r"(3), "r"(4), "r"(5), "r"(6), "r"(7), "r"(8), "r"(9));
        ^

llvm-svn: 134310
2011-07-02 07:17:37 +00:00
Eric Christopher
9689f96b1e Be less specific about register allocation ordering.
llvm-svn: 134308
2011-07-02 04:06:41 +00:00
Eric Christopher
7260817287 TargetConstant immediates won't be placed into registers so tighten
up the valid constant check earlier.

rdar://9692967

llvm-svn: 134286
2011-07-01 23:04:38 +00:00
Dan Gohman
c093f48834 Teach IVUsers to stop at non-affine expressions unless they are both
outside the loop and reducible.

This more completely hides them from LSR, which isn't usually able to
do anything meaningful with non-affine expressions anyway, and this
consequently hides them from SCEVExpander, which is acutely unprepared
for non-affine expressions.

Replace test/CodeGen/X86/lsr-nonaffine.ll with a new test that tests
the new behavior.

This works around the bug in PR10117 / rdar://problem/9633149, and is
generally an improvement besides.

llvm-svn: 134268
2011-07-01 22:05:19 +00:00
Jim Grosbach
461adc233e ARMv7M vs. ARMv7E-M support.
The DSP instructions in the Thumb2 instruction set are an optional extension
in the Cortex-M* archtitecture. When present, the implementation is considered
an "ARMv7E-M implementation," and when not, an "ARMv7-M implementation."

Add a subtarget feature hook for the v7e-m instructions and hook it up. The
cortex-m3 cpu is an example of a v7m implementation, while the cortex-m4 is
a v7e-m implementation.

rdar://9572992

llvm-svn: 134261
2011-07-01 21:12:19 +00:00
Eric Christopher
d369a9fe83 Add support for the 'j' immediate constraint. This is conditionalized on
supporting the instruction that the constraint is for 'movw'.

Part of rdar://9119939

llvm-svn: 134222
2011-07-01 01:00:07 +00:00
Eric Christopher
4bc6b7e1a6 Add support for the ARM 't' register constraint. And another testcase
for the 'x' register constraint.

Part of rdar://9119939

llvm-svn: 134220
2011-07-01 00:30:46 +00:00
Eric Christopher
d40f06b48f Add support for the 'x' constraint.
Part of rdar://9307836 and rdar://9119939

llvm-svn: 134215
2011-07-01 00:14:47 +00:00
Jakob Stoklund Olesen
8b22811785 Fix a problem with fast-isel return values introduced in r134018.
We would put the return value from long double functions in the wrong
register.

This fixes gcc.c-torture/execute/conversion.c

llvm-svn: 134205
2011-06-30 23:42:18 +00:00
Eric Christopher
2582061ec1 Add support for the 'h' constraint.
Part of rdar://9119939

llvm-svn: 134203
2011-06-30 23:23:01 +00:00
Jim Grosbach
32d3b2625b Thumb1 register to register MOV instruction is predicable.
Fix a FIXME and allow predication (in Thumb2) for the T1 register to
register MOV instructions. This allows some better codegen with
if-conversion (as seen in the test updates), plus it lays the groundwork
for pseudo-izing the tMOVCC instructions.

llvm-svn: 134197
2011-06-30 22:10:46 +00:00
Jim Grosbach
8c1fb3c4e1 Pseudo-ize the t2LDMIA_RET instruction.
It's just a t2LDMIA_UPD instruction with extra codegen properties, so it
doesn't need the encoding information. As a side-benefit, we now correctly
recognize for instruction printing as a 'pop' instruction.

llvm-svn: 134173
2011-06-30 18:25:42 +00:00
Eric Christopher
7ce905754f Fix a small thinko for constant i64 lock/orq optimization where we
we didn't have an opcode for 64-bit constant or expressions.

Fixes rdar://9692967

llvm-svn: 134121
2011-06-30 00:48:30 +00:00
Devang Patel
66c4bc1dda Revert r133953 for now.
llvm-svn: 134116
2011-06-29 23:50:13 +00:00
Cameron Zwarich
2ffbcf9b96 In the ARM global merging pass, allow extraneous alignment specifiers. This pass
already makes the assumption, which is correct on ARM, that a type's alignment is
less than its alloc size. This improves codegen with Clang (which inserts a lot of
extraneous alignment specifiers) and fixes <rdar://problem/9695089>.

llvm-svn: 134106
2011-06-29 22:24:25 +00:00
Benjamin Kramer
d97872524b Don't depend on the optimization reverted in r134067.
llvm-svn: 134068
2011-06-29 14:07:18 +00:00
Benjamin Kramer
cc91642a94 Revert a part of r126557 which could create unschedulable DAGs.
llvm-svn: 134067
2011-06-29 13:47:25 +00:00
Jakob Stoklund Olesen
7d3e1553d2 Clean up the handling of the x87 fp stack to make it more robust.
Drop the FpMov instructions, use plain COPY instead.

Drop the FpSET/GET instruction for accessing fixed stack positions.
Instead use normal COPY to/from ST registers around inline assembly, and
provide a single new FpPOP_RETVAL instruction that can access the return
value(s) from a call. This is still necessary since you cannot tell from
the CALL instruction alone if it returns anything on the FP stack. Teach
fast isel to use this.

This provides a much more robust way of handling fixed stack registers -
we can tolerate arbitrary FP stack instructions inserted around calls
and inline assembly. Live range splitting could sometimes break x87 code
by inserting spill code in unfortunate places.

As a bonus we handle floating point inline assembly correctly now.

llvm-svn: 134018
2011-06-28 18:32:28 +00:00
Roman Divacky
736e37d9b9 Implement ISD::VAARG lowering on PPC32.
llvm-svn: 134005
2011-06-28 15:30:42 +00:00
Jakob Stoklund Olesen
55a0ce1776 FileCheckize a couple of tests.
Also and add a test for popping dead return values and avoid testing the
spill precision.

llvm-svn: 133997
2011-06-28 06:25:03 +00:00
Chandler Carruth
910d35b98b FileCheck-ize a test that had the strangest TCL quote I've seen yet: an
opening single quote with no closing single quote, and with {} quotes
"inside" of it. This broke some of our tools that scrape test cases.

Also, while here, make the test actually assert what the comment says it
asserts. This was essentially authored by Nick Lewycky, and merely typed
in by myself. Let me know if this is still missing the mark, but the
previous test only succeeded due to the improper quoting preventing
*anything* from matching the grep -- it had a '4(%...)' sequence in the
output!

llvm-svn: 133980
2011-06-28 02:03:10 +00:00
Evan Cheng
7df851a4ff Remove the experimental (and unused) pre-ra splitting pass. Greedy regalloc can split live ranges.
llvm-svn: 133962
2011-06-27 23:40:45 +00:00
Devang Patel
8fbd4b55ea During bottom up fast-isel, instructions emitted to materalize registers are at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases.
llvm-svn: 133953
2011-06-27 22:32:04 +00:00
Eric Christopher
bb65f96b18 Allow lr in the register options here.
llvm-svn: 133935
2011-06-27 20:31:01 +00:00
Jakob Stoklund Olesen
58c34c0e80 Move all inline-asm-fpstack tests to a single file.
Also fix some of the tests that were actually testing wrong behavior -
An input operand in {st} is only popped by the inline asm when {st} is
also in the clobber list.

The original bug reports all had ~{st} clobbers as they should.

llvm-svn: 133916
2011-06-27 17:27:37 +00:00
Dan Bailey
8de16fa817 PTX: corrected tests that were failing
llvm-svn: 133875
2011-06-25 19:41:17 +00:00
Dan Bailey
5b68fc5126 PTX: Reverting implementation of i8.
The .b8 operations in PTX are far more limiting than I first thought. The mov operation isn't even supported, so there's no way of converting a .pred value into a .b8 without going via .b16, which is
not sensible. An improved implementation needs to use the fact that loads and stores automatically extend and truncate to implement support for EXTLOAD and TRUNCSTORE in order to correctly support
boolean values.

llvm-svn: 133873
2011-06-25 18:16:28 +00:00
Chad Rosier
2c0dc1fb19 Test case for r133858 (tail call optimize in the presence of byval).
llvm-svn: 133863
2011-06-25 02:44:56 +00:00
Devang Patel
91fee59b74 Handle debug info for i128 constants.
llvm-svn: 133821
2011-06-24 20:46:11 +00:00
Dan Bailey
2237ea06fb PTX: Add support for i8 type and introduce associated .b8 registers
The i8 type is required for boolean values, but can only use ld, st and mov instructions. The i1 type continues to be used for predicates.

llvm-svn: 133814
2011-06-24 19:27:10 +00:00
Chad Rosier
3127a19140 The Neon VCVT (between floating-point and fixed-point, Advanced SIMD)
instructions can be used to match combinations of multiply/divide and VCVT 
(between floating-point and integer, Advanced SIMD).  Basically the VCVT 
immediate operand that specifies the number of fraction bits corresponds to a 
floating-point multiply or divide by the corresponding power of 2.

For example, VCVT (floating-point to fixed-point, Advanced SIMD) can replace a 
combination of VMUL and VCVT (floating-point to integer) as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vmul.f32        d16, d17, d16
  vcvt.s32.f32    d16, d16
becomes:
  vcvt.s32.f32    d16, d16, #3

Similarly, VCVT (fixed-point to floating-point, Advanced SIMD) can replace a 
combinations of VCVT (integer to floating-point) and VDIV as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vcvt.f32.s32    d16, d16
  vdiv.f32        d16, d17, d16
becomes:
  vcvt.f32.s32    d16, d16, #3

llvm-svn: 133813
2011-06-24 19:23:04 +00:00