Commit Graph

15864 Commits

Author SHA1 Message Date
Evan Cheng
3ef1c8759a Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 01:29:16 +00:00
Eric Christopher
920a2089d9 Fix build error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113566 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 00:35:09 +00:00
Eric Christopher
db12b2ba9c Update comments, reorganize some code, rename variables to be
more clear.  No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113565 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 00:34:35 +00:00
Eric Christopher
238bb16251 64-bit fp loads can come straight out of the constant pool, not as
bad as I'd thought.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 23:50:00 +00:00
Eric Christopher
9ee4ce2f91 SIToFP and FPToSI conversions work only on fp-reg to fp-reg. Move
some data around and implement a couple of move routines to do this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113546 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 21:44:45 +00:00
Eric Christopher
aa3ace10c1 New "move to fp reg" routine. Use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:49:25 +00:00
Eric Christopher
ef2fdd2141 "Strike that, reverse it." -- Mr. Wonka.
Truncate when truncating, extend when extending.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:36:19 +00:00
Eric Christopher
ce07b5458d Add FPTrunc, fix some bugs where I forgot to update the value map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113533 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:26:31 +00:00
Eric Christopher
9a040492f7 Basic FP->Int, Int->FP conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:54:59 +00:00
Bruno Cardoso Lopes
ae4f7421c0 Add one more pattern to fallback movddup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:48:34 +00:00
Evan Cheng
5f54ce3473 For each instruction itinerary class, specify the number of micro-ops each
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.

This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:18:55 +00:00
Roman Divacky
5baf79edc0 Make ELF OS ABI dependent on the OS from target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 17:57:50 +00:00
Dale Johannesen
f73c5587fa Move remaining MMX instructions from SSE to MMX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113501 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 17:13:07 +00:00
Kalle Raiskila
bb7d33a253 Silence compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 07:30:15 +00:00
Bob Wilson
0f1e9457a5 Fix NEON VLD pseudo instruction itineraries that were incorrectly copied from
the VST pseudos.  The VLD/VST scheduling still needs work (see pr6722), but
at least we shouldn't confuse the loads with the stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 05:40:26 +00:00
Eric Christopher
ac1a19e18a Nuke whitespace and fix some indenting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 01:06:51 +00:00
Dale Johannesen
4efb0feac8 Move most MMX instructions (defined as anything that
uses MMX, even if it also uses other things) from InstrSSE
into InstrMMX.  No (intended) functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 01:02:39 +00:00
Eric Christopher
bd6bf0848e Handle 64-bit floating point binops as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 01:02:03 +00:00
Eric Christopher
bc39b829f2 Basic 32-bit FP operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:53:57 +00:00
Bob Wilson
19d644d5a9 For double-spaced VLD3/VLD4 instructions, copy the explicit super-register use
operand from the pseudo instruction to the new instruction as an implicit use.
This will preserve any other flags (e.g., kill) on the operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:38:32 +00:00
Eric Christopher
4620360842 Handle float->double extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:26:48 +00:00
Eric Christopher
9ed58dff86 Rewrite TargetMaterializeConstant splitting it out into two functions
for integer and fp constants. Implement todo to use vfp3 instructions
to materialize easy constants if we can.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:19:41 +00:00
Bob Wilson
63569c99ec Simplify copying over operands from pseudo NEON load/store instructions.
For VLD3/VLD4 with double-spaced registers, add the implicit use of the
super register for both the instruction loading the even registers and the
instruction loading the odd registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113452 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:15:32 +00:00
Bob Wilson
656edcf138 Clean up a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113442 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:39:54 +00:00
Eric Christopher
d43393ae34 Very basic compare support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:13:45 +00:00
Eric Christopher
a88d8577e6 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:58:35 +00:00
Evan Cheng
7602acbf3b Fix LDM_RET schedule itinery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:57:08 +00:00
Chris Lattner
90b54547d9 fix rdar://8407548, I missed the commuted form of xchg/test without a suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113427 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:27:05 +00:00
Chris Lattner
a7f08b4970 fix wonky formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:22:10 +00:00
Chris Lattner
373c458850 fix bugs in push/pop segment support, rdar://8407242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:13:08 +00:00
Dale Johannesen
52664c8efe Add intrinsic-based patterns for MMX PINSRW and PEXTRW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:08:40 +00:00
Eric Christopher
30b663339e Make the loads/stores match the type we really want to store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113417 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 21:49:50 +00:00
Dale Johannesen
ab1deb998e Check in forgotten file. Should fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 21:09:48 +00:00
Dale Johannesen
246658f158 Slight cleanup, use only one form of MMXI_binop_rm_int.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 20:54:00 +00:00
Jim Grosbach
d0bd76b0fb Re-enable usage of the ARM base pointer. r113394 fixed the known failures.
Re-running some nightly testers w/ it enabled to verify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 20:12:02 +00:00
Jim Grosbach
951f699afb Fix errant fall-throughs causing the base pointer to be used when the frame
pointer was intended. rdar://8401980

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 19:55:28 +00:00
Dale Johannesen
af4748168c Add intrinsic forms of mmx<->sse conversions. Notes:
Omission of memory form of PI2PD is intentional; this
does not use an MMX register and does not put the chip
into MMX mode (PI2PS, oddly enough, does).
Operands of PI2PS follow the gcc builtin, not Intel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 19:15:38 +00:00
Eric Christopher
845c5757ed Rewrite TargetMaterializeConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 18:56:34 +00:00
Bruno Cardoso Lopes
0a7dd4fa40 Minor change. Fix comments and remove unused and redundant code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 18:12:31 +00:00
Bruno Cardoso Lopes
1485cc2bb3 x86 vector shuffle lowering now relies only on target specific
nodes to emit shuffles and don't do isel mask matching anymore.
- Add the selection of the remaining shuffle opcode (movddup)
- Introduce two new functions to "recognize" where we may get
potential folds and add several comments to them explaining why
they are not yet in the desidered shape.
- Add more patterns to fallback the case where we select
a specific shuffle opcode as if it could fold a load, but it
can't, so remap to a valid instruction.
- Add a couple of FIXMEs to address in the following days once
there's a good solution to the current folding problem.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 17:43:25 +00:00
Jim Grosbach
30c93e1cd3 Be more careful about when to do dynamic stack realignment. Since we have an
option to disable base pointer usage, pay attention to it when deciding
if we can realign (if no base pointer and VLAs, we can't).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113366 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 17:22:12 +00:00
Jim Grosbach
6b53834d5f Add missing assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 17:05:45 +00:00
Kalle Raiskila
0b4ab0cfe0 Fix CellSPU vector shuffles, again.
Some cases of lowering to rotate were miscompiled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 11:53:38 +00:00
Chris Lattner
c8ae35a8e8 add support for the commuted form of the test instruction, rdar://8018260.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113352 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 05:51:12 +00:00
Chris Lattner
ba8e81cca2 implement proper support for sysret{,l,q}, rdar://8403907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 05:45:34 +00:00
Chris Lattner
ba8cea450f implement the iret suite of instructions properly,
fixing rdar://8403974



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113349 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 05:38:31 +00:00
Chris Lattner
2544f42692 add support for instruction prefixes on the same line as the instruction,
implementing rdar://8033482 and PR7254.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 05:17:37 +00:00
Chris Lattner
34e53140c2 change the MC "ParseInstruction" interface to make it the
implementation's job to check for and lex the EndOfStatement
marker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 05:10:46 +00:00
Chris Lattner
9607c40601 gas accepts xchg <mem>, <reg> as a synonym for xchg <reg>, <mem>.
Add this to the mc assembler, fixing PR8061


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 04:53:27 +00:00
NAKAMURA Takumi
186acea746 ARM/Disassembler: Fix definitions incompatible(unsigned and uint32_t) to Cygwin-1.5, following up to r113255.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 04:48:17 +00:00