Eli Friedman
62bb16cfd1
Fill in type legalization for MERGE_VALUES in all the various cases. Patch by Micah Villmow. (No testcase because the issue only showed up in an out-of-tree backend.)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138877 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 18:36:04 +00:00
Jim Grosbach
d82175c1f0
Thumb NOP encoding varies depending on ARCH revision.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138876 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 18:35:46 +00:00
Owen Anderson
559c277aa9
Fix roundtripping of Thumb BL/BLX instructions with immediate offsets instead of labels.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138874 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 18:30:20 +00:00
Jim Grosbach
c9a9b44285
tBcc is OK to be predicated in Thumb2 outside of IT blocks (obviously).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138873 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 18:29:05 +00:00
Eli Friedman
ba567d670d
Generic expansion for atomic load/store into cmpxchg/atomicrmw xchg; implements 64-bit atomic load/store for ARM.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138872 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 18:26:09 +00:00
Jim Grosbach
72335d55d9
Thumb2 parsing and encoding for ADC(register).
...
Also add instruction aliases for non-.w versions of SBC since they're the
same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138871 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 18:23:08 +00:00
Devang Patel
b71541a2db
After r138010, subroutine type does not have context info. Update type verifier accordingly.
...
This fixes ptype.exp gdb testsuite regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138869 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 18:04:31 +00:00
Eli Friedman
4d3f329453
64-bit atomic cmpxchg for ARM.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138868 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 17:52:22 +00:00
Akira Hatanaka
334b5305a6
Fix typo. Patch by Liu.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138866 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 17:49:04 +00:00
David Greene
d92e2e4f88
Compress Repeated Byte Output
...
Emit a repeated sequence of bytes using .zero. This saves an enormous
amount of asm file space for certain programs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138864 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 17:30:56 +00:00
Jim Grosbach
0f3abd8d68
Tweak Thumb1 ADD encoding selection a bit.
...
When the destination register of an add immediate instruction is
explicitly specified, encoding T1 is preferred, else encoding T2 is
preferred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138862 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 17:07:33 +00:00
Jakob Stoklund Olesen
6154582983
Put VMOVS widening under a command line option, off by default.
...
It appears that our use of the imp-use and imp-def flags with
sub-registers is not yet robust enough to support this.
The failing test case is complicated, I am working on a reduction.
<rdar://problem/10044201>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138861 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 17:00:02 +00:00
Benjamin Kramer
31d27ce568
This test requires sse, otherwise x87 ops will block tailcall optimization
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138859 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 16:49:05 +00:00
Rafael Espindola
e81abfd30b
Spelling and grammar fixes to problems found by Duncan.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138858 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 16:43:33 +00:00
Eli Friedman
ac86d43eae
Make sure we don't crash when -miphoneos-version-min is specified on x86. Hopefully this will fix gcc testsuite failures.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138856 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 16:19:51 +00:00
Eric Christopher
c967ad8c88
Rework this conditional a bit.
...
Patch by Sanjoy Das
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138853 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 04:17:21 +00:00
NAKAMURA Takumi
bbbc283d86
lit: Normalize pathsep slashes also on %T.
...
On Python-w32 with mingw msys bash, %T was replaced to "x:\foo\bar...". msys bash cannot handle DOSish paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 03:56:17 +00:00
Bruno Cardoso Lopes
57d6a5e491
- Move all MOVSS and MOVSD patterns close to their definitions
...
- Duplicate some store patterns to their AVX forms!
- Catched a bug while restricting the patterns subtarget, fix it
and update a testcase to check it properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138851 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 03:04:20 +00:00
Bruno Cardoso Lopes
fc646a6b06
Remove unnecessary AVX checks
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138850 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 03:04:14 +00:00
Bruno Cardoso Lopes
5affa5196f
Teach more places to use VMOVAPS,VMOVUPS instead of MOVAPS,MOVUPS,
...
whenever AVX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138849 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 03:04:09 +00:00
Evan Cheng
0899f5c62d
Fix (movhps load) lowering / pattern to match more cases. rdar://10050549
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138848 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 02:05:24 +00:00
Eli Friedman
3d93861c23
Some minor cleanups for r138845.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138846 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 00:41:05 +00:00
Eli Friedman
2bdffe4882
Some 64-bit atomic operations on ARM. 64-bit cmpxchg coming next.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138845 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 00:31:29 +00:00
Benjamin Kramer
8f00ffce50
Fix test typo.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138843 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-31 00:02:59 +00:00
Rafael Espindola
f940a1a869
Remove the old tail duplication pass. It is not used and is unable to update
...
ssa, so it has to be run really early in the pipeline. Any replacement
should probably use the SSAUpdater.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138841 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 23:03:45 +00:00
Owen Anderson
eaca928a37
Fix issues with disassembly of IT instructions involving condition codes other the EQ/NE. Discovered by roundtrip testing.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138840 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 22:58:27 +00:00
Owen Anderson
21df36c57a
Fix encoding of CBZ/CBNZ Thumb2 instructions with immediate offsets rather than labels.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138837 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 22:15:17 +00:00
Benjamin Kramer
d4522460d4
Teach macho-dump to dump the uleb128s referred to by linkedit_data segments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138836 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 22:10:58 +00:00
Owen Anderson
a7710edd98
Fix encoding of PC-relative Thumb1 LDR's when using immediate offsets instead of labels.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138835 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 22:10:03 +00:00
Owen Anderson
391ac65377
Fix encoding of Thumb1 B instructions with immediate offsets, which is necessary for round-tripping.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138834 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 22:03:20 +00:00
Owen Anderson
10096dbdef
Clean up whitespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138833 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 21:58:18 +00:00
Bill Wendling
e716124feb
Fix off-by-one error Benjamin noticed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138832 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 21:23:24 +00:00
Rafael Espindola
6cac2025da
Add a triple.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138831 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 21:19:37 +00:00
Owen Anderson
1333abc785
Remove empty file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138830 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 21:17:20 +00:00
Owen Anderson
54c4735db3
Speculatively revert r138809 in an attempt to fix DragonEgg.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 21:11:06 +00:00
Bill Wendling
011a8e1684
Enable compact unwind info by default. This only applies to Darwin when CFI is
...
disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138826 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 20:54:11 +00:00
Jeffrey Yasskin
cda2a146d1
Fix C++0x narrowing errors when char is unsigned.
...
In the case of EDInstInfo, this would actually cause a bug when -1 became 255
and was then compared >=0 in llvm-mc/Disassembler.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138825 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 20:53:29 +00:00
Rafael Espindola
2ac6b01854
Preliminary documentation in docs/SegmentedStacks.html.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138823 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 20:25:49 +00:00
Owen Anderson
3318d9c27d
Port Thumb2 assembler tests over to disassembler tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138822 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 20:03:11 +00:00
Rafael Espindola
b0bf8935ee
Some test code to check if correct code is being generated.
...
Patch by Sanjoy Das.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:51:29 +00:00
Nicolas Geoffray
5af214fef0
The code model of JIT should default to JITDefault.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138819 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:50:33 +00:00
Rafael Espindola
151ab3e2f7
Adds support for variable sized allocas. For a variable sized alloca,
...
code is inserted to first check if the current stacklet has enough
space. If so, space is allocated by simply decrementing the stack
pointer. Otherwise a runtime routine (__morestack_allocate_stack_space
in libgcc) is called which allocates the required memory from the
heap.
Patch by Sanjoy Das.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138818 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:47:04 +00:00
Rafael Espindola
d07b7ec772
Adds a SelectionDAG node X86SegAlloca which will be custom lowered
...
from DYNAMIC_STACKALLOC.
Two new pseudo instructions (SEG_ALLOCA_32 and SEG_ALLOCA_64) which
will match X86SegAlloca (based on word size) are also added. They
will be custom emitted to inject the actual stack handling code.
Patch by Sanjoy Das.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138814 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:43:21 +00:00
Rafael Espindola
76927d7586
Emit segmented-stack specific code into function prologues for
...
X86. Modify the pass added in the previous patch to call this new
code.
This new prologues generated will call a libgcc routine (__morestack)
to allocate more stack space from the heap when required
Patch by Sanjoy Das.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:39:58 +00:00
Rafael Espindola
0f9827cd94
Command line option to enable support for segmented stacks:
...
-segmented-stacks.
Patch by Sanjoy Das!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138811 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:29:02 +00:00
Evan Cheng
37fefc20d3
Follow up to r138791.
...
Add a instruction flag: hasPostISelHook which tells the pre-RA scheduler to
call a target hook to adjust the instruction. For ARM, this is used to
adjust instructions which may be setting the 's' flag. ADC, SBC, RSB, and RSC
instructions have implicit def of CPSR (required since it now uses CPSR physical
register dependency rather than "glue"). If the carry flag is used, then the
target hook will *fill in* the optional operand with CPSR. Otherwise, the hook
will remove the CPSR implicit def from the MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138810 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:09:48 +00:00
Owen Anderson
6e4be237b0
When walking backwards to eliminate final stores to allocas at the end of a function, encountering an unrelated store should not cause us to give up like encountering a load does.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138809 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 18:51:55 +00:00
Benjamin Kramer
9942acab0a
Teach macho-dump how to dump linkedit_data load commands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138807 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 18:33:37 +00:00
Benjamin Kramer
bc6b89ed31
Add load commands from Lion to Macho.h.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138806 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 18:33:34 +00:00
Tobias Grosser
d36d2db62a
Update docs: Bugpoint understands -O[123]
...
Eli added this in revision 132695.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138805 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 18:26:11 +00:00