Nick Lewycky
c4c43fbb07
Teach SCEV to report a max backedge count in one interesting case in
...
HowFarToZero; the case for a canonical loop.
llvm-svn: 139126
2011-09-05 23:25:16 +00:00
Benjamin Kramer
4b79c21ef2
InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original value if types don't match.
...
Fixes clang selfhost.
llvm-svn: 139120
2011-09-05 18:16:19 +00:00
Duncan Sands
29192d042e
Delete trivial landing pads that just continue unwinding the caught
...
exception.
llvm-svn: 139117
2011-09-05 12:57:57 +00:00
Duncan Sands
fd26a954a8
Add some simple insertvalue simplifications, for the purpose of cleaning
...
up do-nothing exception handling code produced by dragonegg.
llvm-svn: 139113
2011-09-05 06:52:48 +00:00
Dan Gohman
5423017526
Revert r129875, XFAILing this test for arm, since the fix was reverted.
...
llvm-svn: 139058
2011-09-03 00:14:24 +00:00
Jakob Stoklund Olesen
1f72dd40c7
Pseudo CMOV instructions don't clobber EFLAGS.
...
The explanation about a 0 argument being materialized as xor is no
longer valid. Rematerialization will check if EFLAGS is live before
clobbering it.
The code produced by X86TargetLowering::EmitLoweredSelect does not
clobber EFLAGS.
This causes one less testb instruction to be generated in the cmov.ll
test case.
llvm-svn: 139057
2011-09-02 23:52:55 +00:00
Jim Grosbach
f347d1d772
Thumb2 parsing and encoding for CBZ/CBNZ.
...
llvm-svn: 139054
2011-09-02 23:46:10 +00:00
Jim Grosbach
34842ceb97
Thumb2 parsing and encoding for BXJ.
...
llvm-svn: 139053
2011-09-02 23:43:09 +00:00
Jim Grosbach
9e55023ca7
Thumb2 parsing and encoding for BIC.
...
llvm-svn: 139052
2011-09-02 23:37:54 +00:00
Jim Grosbach
93e3fd29b2
Thumb2 parsing and encoding for BFI.
...
llvm-svn: 139051
2011-09-02 23:28:46 +00:00
Jim Grosbach
be31448d99
Thumb2 parsing and encoding for BFC.
...
llvm-svn: 139050
2011-09-02 23:25:46 +00:00
Jim Grosbach
a0d34d3b5e
Thumb2 parsing and encoding of B instruction.
...
Tweak handling of IT blocks a bit to enable this. The differentiation between
B and Bcc needs special sauce.
llvm-svn: 139049
2011-09-02 23:22:08 +00:00
Bill Wendling
4aa2573748
Try to eliminate the use of the 'unwind' instruction.
...
llvm-svn: 139046
2011-09-02 22:41:11 +00:00
Eli Friedman
f3dd6da7a8
Don't fast-isel for atomic load/store; some cases require extra handling missing from fast-isel.
...
llvm-svn: 139044
2011-09-02 22:33:24 +00:00
Jim Grosbach
a216debb37
Thumb2 parsing and encoding for ASR.
...
For other shift and rotate instructions, too. Tests for those forthcoming
as I work my way through the ISA.
llvm-svn: 139040
2011-09-02 21:28:54 +00:00
Bill Wendling
912668d998
Better fix for this testcase. Update it to the new EH scheme entirely.
...
llvm-svn: 139039
2011-09-02 21:27:08 +00:00
Bill Wendling
17706bcffb
Update for new EH stuff. (I'm not sure if this is 100% correct.)
...
llvm-svn: 139038
2011-09-02 21:24:17 +00:00
Andrew Trick
310a448cfe
Test case update for unroll-scev.
...
llvm-svn: 139037
2011-09-02 21:21:03 +00:00
Kevin Enderby
5b03f72292
Change X86 disassembly to print immediates values as signed by default. Special
...
case those instructions that the immediate is not sign-extend. radr://8795217
llvm-svn: 139028
2011-09-02 20:01:23 +00:00
Jim Grosbach
370e923434
Thumb2 parsing and encoding for AND (register).
...
llvm-svn: 139021
2011-09-02 18:41:35 +00:00
Jim Grosbach
2761155203
Thumb2 parsing and encoding for ADD (register).
...
llvm-svn: 139017
2011-09-02 18:14:46 +00:00
Duncan Sands
5c04c62765
Darwin wants ctors/dtors to be ordered the other way round to linux.
...
llvm-svn: 139015
2011-09-02 18:07:19 +00:00
Kevin Enderby
54e09b4799
Fix the disassembly of the X86 "crc32w %ax, %eax" instruction. Bug 10702.
...
llvm-svn: 139014
2011-09-02 18:03:03 +00:00
Jim Grosbach
b861b2b475
Tests for Thumb2 AND (immediate) instruction.
...
llvm-svn: 139013
2011-09-02 17:44:27 +00:00
Jakub Staszak
63a3a0e010
Extra CHECK-NOT to make sure that GVN transform works properly.
...
llvm-svn: 139012
2011-09-02 17:40:39 +00:00
Andrew Trick
4a31ba3bae
-unroll-scev flag removal
...
llvm-svn: 139010
2011-09-02 17:36:14 +00:00
Jim Grosbach
c302f5cce7
Add FIXME. Thumb2 ADR encoding choice is non-trivial.
...
llvm-svn: 139008
2011-09-02 17:21:59 +00:00
Jakub Staszak
057d423e4b
ConstantVector returns arbitrary value for the wrong index.
...
This fixes PR10813.
llvm-svn: 139006
2011-09-02 15:43:43 +00:00
Jakub Staszak
7470fb01d0
Compare type size instead of type _store_ size to make sure that BitCastInst
...
will be valid. This fixes PR10820.
llvm-svn: 139005
2011-09-02 14:57:37 +00:00
Kalle Raiskila
f5769c1070
Pass signed (not unsigned) 10 bit field to SPU 'ori' instruction.
...
llvm-svn: 139004
2011-09-02 10:05:01 +00:00
Craig Topper
94ce535647
Make IC_VEX* not inherit from IC_*. Prevents instructions with no VEX form from disassembling to their non-VEX form. Also prevents weak filter collisons that were keeping valid VEX instructions from decoding properly. Make VEX_L* not inherit from VEX_* because the VEX.L bit always important. This stops packed int VEX encodings from being disassembled when specified with VEX.L=1. Fixes PR10831 and PR10806.
...
llvm-svn: 138997
2011-09-02 04:17:54 +00:00
Bill Wendling
723cec7a5f
Update to new EH scheme.
...
llvm-svn: 138989
2011-09-02 01:25:11 +00:00
Dan Gohman
3767be9aee
Revert r131152, r129796, r129761. This code is currently considered
...
to be unreliable on platforms which require memcpy calls, and it is
complicating broader legalize cleanups. It is hoped that these cleanups
will make memcpy byval easier to implement in the future.
llvm-svn: 138977
2011-09-01 23:07:08 +00:00
Benjamin Kramer
6397051ece
Don't drop alignment info on local common symbols.
...
- On COFF the .lcomm directive has an alignment argument.
- On ELF we fall back to .local + .comm
Based on a patch by NAKAMURA Takumi.
Fixes PR9337, PR9483 and PR10128.
llvm-svn: 138976
2011-09-01 23:04:27 +00:00
Eli Friedman
4028a51c74
Fix test; sorry for any inconvenience.
...
llvm-svn: 138966
2011-09-01 21:25:42 +00:00
Eli Friedman
71f5c2f158
Fix an issue with the IR sink pass found by inspection. (I'm not sure anyone is actually using this, but might as well fix it since I found the issue.)
...
llvm-svn: 138965
2011-09-01 21:21:24 +00:00
Eli Friedman
cc6e92892f
Add missing newline.
...
llvm-svn: 138964
2011-09-01 21:20:11 +00:00
Benjamin Kramer
c032617581
XFAIL this test on arm until the backend is fixed.
...
llvm-svn: 138955
2011-09-01 18:40:03 +00:00
Benjamin Kramer
0f6ff8cb2b
This test depends on cmov being available.
...
llvm-svn: 138954
2011-09-01 18:40:01 +00:00
Jakob Stoklund Olesen
5dc87d0f4d
Permit remat of partial register defs when it is safe.
...
An instruction may define part of a register where the other bits are
undefined. In that case, it is safe to rematerialize the instruction.
For example:
%vreg2:ssub_0<def> = VLDRS <cp#0>, 0, pred:14, pred:%noreg, %vreg2<imp-def>
The extra <imp-def> operand indicates that the instruction does not read
the other parts of the virtual register, so a remat is safe.
This patch simply allows multiple def operands for the virtual register.
It is MI->readsVirtualRegister() that determines if we depend on a
previous value so remat is impossible.
llvm-svn: 138953
2011-09-01 18:27:51 +00:00
Jim Grosbach
f6d5d60f99
ARM 'rscs' mnemonic is carry-setting 'rsc', not 'rs' with a 'cs' condition code.
...
llvm-svn: 138952
2011-09-01 18:22:13 +00:00
Bruno Cardoso Lopes
f61d1c072e
Fix vbroadcast matching logic to early unmatch if the node doesn't have
...
only one use. Fix PR10825.
llvm-svn: 138951
2011-09-01 18:15:06 +00:00
Owen Anderson
35d240f9e8
t2Bcc is allowed to have a predicate without a preceding IT instruction.
...
llvm-svn: 138946
2011-09-01 17:47:45 +00:00
Jakob Stoklund Olesen
6357fa2f06
Prevent remat of partial register redefinitions.
...
An instruction that redefines only part of a larger register can never
be rematerialized since the virtual register value depends on the old
value in other parts of the register.
This was fixed for the inline spiller in r138794. This patch fixes the
problem for all register allocators, and includes a small test case.
<rdar://problem/10032939>
llvm-svn: 138944
2011-09-01 17:18:50 +00:00
Bill Wendling
185d377597
Update to new EH scheme.
...
llvm-svn: 138933
2011-09-01 01:28:25 +00:00
Bill Wendling
d33e3007fa
Update to new EH scheme.
...
llvm-svn: 138928
2011-09-01 01:08:21 +00:00
Bill Wendling
3b17c1b48d
Update to new EH scheme.
...
llvm-svn: 138927
2011-09-01 01:02:41 +00:00
Bill Wendling
e88632d667
Update some tests to the new EH scheme.
...
llvm-svn: 138925
2011-09-01 00:58:03 +00:00
Andrew Trick
832a6a1909
PreRA scheduler should avoid cloning compares.
...
Added canClobberReachingPhysRegUse() to handle a particular pattern in
which a two-address instruction could be forced to interfere with
EFLAGS, causing a compare to be unnecessarilly cloned.
Fixes rdar://problem/5875261
llvm-svn: 138924
2011-09-01 00:54:31 +00:00
Jim Grosbach
1d3c137839
Thumb2 assembly parsing and encoding for ADD(immediate).
...
llvm-svn: 138922
2011-09-01 00:28:52 +00:00
Bill Wendling
080f40a49d
Reenable test.
...
llvm-svn: 138916
2011-08-31 23:08:05 +00:00
Bill Wendling
54b91028f0
Revert accidental commit
...
llvm-svn: 138915
2011-08-31 23:07:46 +00:00
Eli Friedman
c472975fd9
Disable this test until Bill fixes it properly.
...
llvm-svn: 138914
2011-08-31 23:03:30 +00:00
Bill Wendling
5624fe0cff
Update to new EH scheme.
...
llvm-svn: 138908
2011-08-31 21:50:07 +00:00
Bill Wendling
e336599f6d
Update to new EH scheme.
...
llvm-svn: 138906
2011-08-31 21:44:24 +00:00
Bill Wendling
55fb73a6e0
Remove old declare statements.
...
llvm-svn: 138905
2011-08-31 21:41:20 +00:00
Bill Wendling
22055c713f
Update more tests to the new EH scheme.
...
llvm-svn: 138904
2011-08-31 21:40:15 +00:00
Bill Wendling
d4e871404d
Update more tests to the new EH scheme.
...
llvm-svn: 138903
2011-08-31 21:39:05 +00:00
Eli Friedman
293c31b81c
Add tests for the transformations SCCP can do on atomic loads and stores (which are safe without any modifications).
...
llvm-svn: 138902
2011-08-31 21:37:06 +00:00
Bill Wendling
c4c24f03e9
Revert r138894. This was failing on cmake-clang-i686-msvc10.
...
llvm-svn: 138900
2011-08-31 21:20:25 +00:00
Bill Wendling
e6174a2c85
Update more tests to the new EH scheme.
...
llvm-svn: 138894
2011-08-31 21:04:11 +00:00
Bill Wendling
b1e680fd3f
Update the tests to the new EH scheme.
...
llvm-svn: 138891
2011-08-31 20:55:40 +00:00
Owen Anderson
a455a0b1e7
Fix encoding for tBcc with immediate offset operand.
...
llvm-svn: 138889
2011-08-31 20:26:14 +00:00
Jim Grosbach
6a69d6902f
Run the Thumb1 parser tests in Thumb2 mode, as well.
...
Thumb2 is a superset of Thumb1, so all of the encodings should still work.
llvm-svn: 138883
2011-08-31 19:50:28 +00:00
Jim Grosbach
6eb213c919
Thumb NOP encoding varies depending on ARCH revision.
...
llvm-svn: 138876
2011-08-31 18:35:46 +00:00
Owen Anderson
5c160fd243
Fix roundtripping of Thumb BL/BLX instructions with immediate offsets instead of labels.
...
llvm-svn: 138874
2011-08-31 18:30:20 +00:00
Eli Friedman
7c3bdede25
Generic expansion for atomic load/store into cmpxchg/atomicrmw xchg; implements 64-bit atomic load/store for ARM.
...
llvm-svn: 138872
2011-08-31 18:26:09 +00:00
Jim Grosbach
af8c3cc710
Thumb2 parsing and encoding for ADC(register).
...
Also add instruction aliases for non-.w versions of SBC since they're the
same.
llvm-svn: 138871
2011-08-31 18:23:08 +00:00
Eli Friedman
1ccecbb9d3
64-bit atomic cmpxchg for ARM.
...
llvm-svn: 138868
2011-08-31 17:52:22 +00:00
David Greene
cdef71f4f3
Compress Repeated Byte Output
...
Emit a repeated sequence of bytes using .zero. This saves an enormous
amount of asm file space for certain programs.
llvm-svn: 138864
2011-08-31 17:30:56 +00:00
Jim Grosbach
6d606fbe14
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.
llvm-svn: 138862
2011-08-31 17:07:33 +00:00
Benjamin Kramer
5247ca0ae5
This test requires sse, otherwise x87 ops will block tailcall optimization
...
llvm-svn: 138859
2011-08-31 16:49:05 +00:00
Bruno Cardoso Lopes
9fc6b8be03
- 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
llvm-svn: 138851
2011-08-31 03:04:20 +00:00
Evan Cheng
cb1e5bae4c
Fix (movhps load) lowering / pattern to match more cases. rdar://10050549
...
llvm-svn: 138848
2011-08-31 02:05:24 +00:00
Eli Friedman
2c7bb52f56
Some minor cleanups for r138845.
...
llvm-svn: 138846
2011-08-31 00:41:05 +00:00
Eli Friedman
c3f9c4a852
Some 64-bit atomic operations on ARM. 64-bit cmpxchg coming next.
...
llvm-svn: 138845
2011-08-31 00:31:29 +00:00
Benjamin Kramer
50cabb5de4
Fix test typo.
...
llvm-svn: 138843
2011-08-31 00:02:59 +00:00
Rafael Espindola
a45c20b049
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.
llvm-svn: 138841
2011-08-30 23:03:45 +00:00
Owen Anderson
2fa06a7226
Fix issues with disassembly of IT instructions involving condition codes other the EQ/NE. Discovered by roundtrip testing.
...
llvm-svn: 138840
2011-08-30 22:58:27 +00:00
Owen Anderson
fdf3cd7f2b
Fix encoding of CBZ/CBNZ Thumb2 instructions with immediate offsets rather than labels.
...
llvm-svn: 138837
2011-08-30 22:15:17 +00:00
Owen Anderson
d16fb43b1f
Fix encoding of PC-relative Thumb1 LDR's when using immediate offsets instead of labels.
...
llvm-svn: 138835
2011-08-30 22:10:03 +00:00
Owen Anderson
543c89fb15
Fix encoding of Thumb1 B instructions with immediate offsets, which is necessary for round-tripping.
...
llvm-svn: 138834
2011-08-30 22:03:20 +00:00
Rafael Espindola
1450f61e8f
Add a triple.
...
llvm-svn: 138831
2011-08-30 21:19:37 +00:00
Owen Anderson
b359367a3d
Remove empty file.
...
llvm-svn: 138830
2011-08-30 21:17:20 +00:00
Owen Anderson
e316e5b2ad
Speculatively revert r138809 in an attempt to fix DragonEgg.
...
llvm-svn: 138829
2011-08-30 21:11:06 +00:00
Owen Anderson
2e282257ed
Port Thumb2 assembler tests over to disassembler tests.
...
llvm-svn: 138822
2011-08-30 20:03:11 +00:00
Rafael Espindola
9f2edc8d2c
Some test code to check if correct code is being generated.
...
Patch by Sanjoy Das.
llvm-svn: 138820
2011-08-30 19:51:29 +00:00
Owen Anderson
d708ec4c6a
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.
...
llvm-svn: 138809
2011-08-30 18:51:55 +00:00
Andrew Trick
d74c19449e
Lit option for ignoring stderr output.
...
This is useful for testing a build a temporarily hand instrumented
build.
Patch by arrowdodger!
llvm-svn: 138804
2011-08-30 17:42:33 +00:00
Roman Divacky
71038e7021
Set CR1EQ only when lowering vararg floating arguments (not any vararg
...
arguments as before), unset CR1EQ otherwise.
llvm-svn: 138802
2011-08-30 17:04:16 +00:00
Craig Topper
4f2fba1108
Add vvvv support to disassembling of instructions with MRMDestMem and MRMDestReg form. Needed to support mem dest form of vmaskmovps/d. Fixes PR10807.
...
llvm-svn: 138795
2011-08-30 07:09:35 +00:00
Evan Cheng
e891654a58
Change ARM / Thumb2 addc / adde and subc / sube modeling to use physical
...
register dependency (rather than glue them together). This is general
goodness as it gives scheduler more freedom. However it is motivated by
a nasty bug in isel.
When a i64 sub is expanded to subc + sube.
libcall #1
\
\ subc
\ / \
\ / \
\ / libcall #2
sube
If the libcalls are not serialized (i.e. both have chains which are dag
entry), legalizer can serialize them in arbitrary orders. If it's
unlucky, it can force libcall #2 before libcall #1 in the above case.
subc
|
libcall #2
|
libcall #1
|
sube
However since subc and sube are "glued" together, this ends up being a
cycle when the scheduler combine subc and sube as a single scheduling
unit.
The right solution is to fix LegalizeType too chains the libcalls together.
However, LegalizeType is not processing nodes in order so that's harder than
it should be. For now, the move to physical register dependency will do.
rdar://10019576
llvm-svn: 138791
2011-08-30 01:34:54 +00:00
Owen Anderson
3e0aa03fe9
Add missing encoding information for some of the GPR<->FP register moves.
...
llvm-svn: 138780
2011-08-29 23:15:25 +00:00
Jim Grosbach
4b23a65582
Remove redundant tests from XFAIL'ed test file.
...
llvm-svn: 138779
2011-08-29 23:04:04 +00:00
Jim Grosbach
55d6f43cab
Thumb2 assembly parsing and encoding support for ADC(immediate).
...
llvm-svn: 138778
2011-08-29 23:01:38 +00:00
Jim Grosbach
89a12be8bb
Remove test file. Superceded by other more exhaustive tests.
...
llvm-svn: 138777
2011-08-29 23:00:19 +00:00
Jim Grosbach
ed16ec4248
Thumb2 parsing and encoding for IT blocks.
...
llvm-svn: 138773
2011-08-29 22:24:09 +00:00
Kevin Enderby
7e2489a7c9
Fix the disassembly of the X86 crc32 instruction. Bug 10702 and rdar://8795217
...
llvm-svn: 138771
2011-08-29 22:06:28 +00:00
Eli Friedman
850b9a9a84
Explicitly zero out parts of a vector which are required to be zero by the algorithm in LowerUINT_TO_FP_i32. This only has a substantial effect on the generated code when the input is extracted from a vector register; other ways of loading an i32 do the appropriate zeroing implicitly. Fixes PR10802.
...
llvm-svn: 138768
2011-08-29 21:15:46 +00:00
Bill Wendling
e79ce47ad7
Update tests to new EH model. Add landingpad instructions to landing pads.
...
llvm-svn: 138759
2011-08-29 20:39:23 +00:00
Nadav Rotem
5fc81ffbac
Fixes following the CR by Chris and Duncan:
...
Optimize chained bitcasts of the form A->B->A.
Undo r138722 and change isEliminableCastPair to allow this case.
llvm-svn: 138756
2011-08-29 19:58:36 +00:00
Owen Anderson
967674d26c
Improve handling of #-0 offsets for many more pre-indexed addressing modes.
...
llvm-svn: 138754
2011-08-29 19:36:44 +00:00
Owen Anderson
baa7edb06a
Add testcase for r138746.
...
llvm-svn: 138747
2011-08-29 18:02:40 +00:00
Owen Anderson
f02d98d7c0
Add support for parsing #-0 on non-memory-operand immediate values, and add a testcase that necessitates it.
...
llvm-svn: 138739
2011-08-29 17:17:09 +00:00
Duncan Sands
4d63542b82
Fix PR5329: pay attention to constructor/destructor priority
...
when outputting them. With this, the entire LLVM testsuite
passes when built with dragonegg.
llvm-svn: 138724
2011-08-28 13:17:22 +00:00
Nadav Rotem
52600ee8c3
Bitcasts are transitive. Bitcast-Bitcast-X becomes Bitcast-X.
...
llvm-svn: 138722
2011-08-28 11:51:08 +00:00
Andrew Trick
d22f9b395b
Reverted r138652, valgrind doesn't understand obj:*/tblgen.
...
llvm-svn: 138703
2011-08-27 06:17:30 +00:00
Bill Wendling
ba198e661e
Auto upgrade the old EH scheme to use the new one. This is on a trial basis. If
...
things to disasterously over night, this can be reverted.
llvm-svn: 138702
2011-08-27 06:11:03 +00:00
Bill Wendling
2f92d2cdae
Update to new EH scheme.
...
llvm-svn: 138699
2011-08-27 04:53:41 +00:00
Bill Wendling
46c720994a
Cannot have an llvm.eh.exception call in a non-landing pad block.
...
llvm-svn: 138698
2011-08-27 04:53:28 +00:00
Andrew Trick
4f3cb540a6
Excluding ARM JIT tests until someone can fix this compilation path.
...
llvm-svn: 138676
2011-08-26 23:39:30 +00:00
Owen Anderson
b205c029a4
Improve encoding support for BLX with immediat eoperands, and fix a BLX decoding bug this uncovered.
...
llvm-svn: 138675
2011-08-26 23:32:08 +00:00
Owen Anderson
6c70e58041
Correct encoding of BL with immediate offset.
...
llvm-svn: 138673
2011-08-26 22:54:51 +00:00
Eli Friedman
5e5704277f
Add support for generating CMPXCHG16B on x86-64 for the cmpxchg IR instruction.
...
llvm-svn: 138660
2011-08-26 21:21:21 +00:00
Bill Wendling
ac88ab7cce
Revert r138606 until LowerInvoke has been converted to the new EH scheme.
...
llvm-svn: 138656
2011-08-26 21:11:23 +00:00
Owen Anderson
16d33f36d5
invalid-LDR_PRE-arm.txt was already passing, but for the wrong reasons. We were failing to specify enough fixed bits of LDR_PRE/LDRB_PRE, resulting in decoding conflicts. Separate them into immediate vs. register versions, allowing us to specify the necessary fixed bits. This in turn results in the test being decoded properly, and being rejected as UNPREDICTABLE rather than a hard failure.
...
llvm-svn: 138653
2011-08-26 20:43:14 +00:00
Andrew Trick
28dc5abd05
valgrind: Always suppress tblgen leaks.
...
I'll clean up the rest of the XFAIL: vg_leak lines if this works.
llvm-svn: 138652
2011-08-26 20:41:20 +00:00
Bill Wendling
eed1e8905a
Don't sink landingpad instructions during ind-var simplification.
...
llvm-svn: 138651
2011-08-26 20:40:15 +00:00
Andrew Trick
07aeb629ec
Use %% for literals in RUN lines.
...
llvm-svn: 138647
2011-08-26 20:09:48 +00:00
Owen Anderson
a01bcbfc80
Support an extension of ARM asm syntax to allow immediate operands to ADR instructions. This is helpful for disassembler testing, and indeed exposed a disassembler bug that is also fixed here.
...
llvm-svn: 138635
2011-08-26 18:09:22 +00:00
Benjamin Kramer
6eb9666bb8
We don't care if TableGen leaks memory.
...
llvm-svn: 138634
2011-08-26 17:00:30 +00:00
Owen Anderson
f3b6507e26
Add a testcase for r138625.
...
llvm-svn: 138626
2011-08-26 06:45:08 +00:00
Craig Topper
c66d50d1a2
Fix disassembling of VCVTSD2SI
...
llvm-svn: 138623
2011-08-26 04:49:29 +00:00
Eli Friedman
452aae6202
Atomic load/store on ARM/Thumb.
...
I don't really like the patterns, but I'm having trouble coming up with a
better way to handle them.
I plan on making other targets use the same legalization
ARM-without-memory-barriers is using... it's not especially efficient, but
if anyone cares, it's not that hard to fix for a given target if there's
some better lowering.
llvm-svn: 138621
2011-08-26 02:59:24 +00:00
Benjamin Kramer
fb212a6309
SimplifyCFG: If we have a PHI node that can evaluate to NULL and do a load or store to the address returned by the PHI node then we can consider this incoming value as dead and remove the edge pointing there, unless there are instructions that can affect control flow executed in between.
...
In theory this could be extended to other instructions, eg. division by zero, but it's likely that it will "miscompile" some code because people depend on div by zero not trapping. NULL pointer dereference usually leads to a crash so we should be on the safe side.
This shrinks the size of a Release clang by 16k on x86_64.
llvm-svn: 138618
2011-08-26 01:22:29 +00:00
Bill Wendling
62fe9e9aa6
Update to the new EH scheme.
...
llvm-svn: 138606
2011-08-25 23:48:37 +00:00
Bruno Cardoso Lopes
8347b86293
Add support for AVX 256-bit version of MOVDDUP!
...
llvm-svn: 138588
2011-08-25 21:40:37 +00:00
Owen Anderson
5e30972cff
Port over additional encoding tests to decoding tests, and fix an operand ordering bug this exposed.
...
llvm-svn: 138575
2011-08-25 18:30:18 +00:00
Andrew Trick
6446bf780a
ARM fix for missing implicit operands on ldmia_ret.
...
rdar://10005094: miscompile of 176.gcc
llvm-svn: 138568
2011-08-25 17:50:53 +00:00
Craig Topper
76e3e0b554
Give ATTR_VEX higher priority when generating the disassembler context table. Fixes disassembling of VEX instructions with 'pp'=00. Fixes subset of PR10678.
...
llvm-svn: 138552
2011-08-25 07:42:00 +00:00
Craig Topper
e1541838f9
Add TB encoding to VEROALL, VZEROUPPER, and VCVTPS2PD to allow them to be disassembled. Fixes PR10723.
...
llvm-svn: 138551
2011-08-25 06:57:46 +00:00
Bill Wendling
3fb137f7ef
LSR wants to split the landing pad's critical edge. Let it do it, but use the
...
proper function to do it.
llvm-svn: 138550
2011-08-25 05:55:40 +00:00
Bruno Cardoso Lopes
296256fb32
Add support for 256-bit versions of VSHUFPD and VSHUFPS.
...
llvm-svn: 138546
2011-08-25 02:58:26 +00:00
Bill Wendling
ff2091737e
Update tests to the newest EH syntax.
...
llvm-svn: 138541
2011-08-25 01:30:18 +00:00
Bill Wendling
b37db20e40
Add feature test for the new exception handling stuff.
...
llvm-svn: 138539
2011-08-25 01:19:13 +00:00
Eli Friedman
9c73a57b20
Hook up 64-bit atomic load/store on x86-32. I plan to write more efficient implementations eventually.
...
llvm-svn: 138505
2011-08-24 22:33:28 +00:00
Evan Cheng
eee864520c
Some autoconf tests use module level inline asm to test compiler's handling of
...
.cfi_startproc. e.g. libffi:
$ cat confopt.c
asm (".cfi_startproc\n\t.cfi_endproc");
int main () { return 0; }
Teach MC / dwarf emission to handle these cfi directives which essentially
create an empty frame.
rdar://10017184
llvm-svn: 138504
2011-08-24 22:31:37 +00:00
Jim Grosbach
b2a2c031b8
Update tests for 138501.
...
llvm-svn: 138502
2011-08-24 22:30:18 +00:00
Jim Grosbach
4b701af908
Thumb parsing and encoding for SUB (SP minu immediate).
...
Fix FiXME in test file. Remove FIXME for SUB (SP minus register) since that
form is Thumb2 only.
llvm-svn: 138494
2011-08-24 21:42:27 +00:00
Jim Grosbach
0a0b3071df
Thumb parsing and encoding support for ADD SP instructions.
...
Fix the test FIXME and add parsing support for the ADD (SP plus immediate)
and ADD (SP plus register) instruction forms.
llvm-svn: 138488
2011-08-24 21:22:15 +00:00
Eli Friedman
5aabaaa367
Basic tests for atomic load and store on x86.
...
llvm-svn: 138486
2011-08-24 21:16:59 +00:00
Nadav Rotem
365af6f17b
Implement Constant::isAllOnesValue(). Fix ConstantFolding to use the new api.
...
llvm-svn: 138469
2011-08-24 20:18:38 +00:00
Owen Anderson
16fd0d96f2
Port over more encoding tests to decoding tests.
...
llvm-svn: 138441
2011-08-24 17:08:34 +00:00
Richard Osborne
6e3c83eb1c
Add Uses=[SP] to call instructions. This fixes a miscompilation with a
...
variable sized alloca.
llvm-svn: 138433
2011-08-24 13:32:43 +00:00
Craig Topper
de92622aa5
Break 256-bit vector int add/sub/mul into two 128-bit operations to avoid costly scalarization. Fixes PR10711.
...
llvm-svn: 138427
2011-08-24 06:14:18 +00:00
Bruno Cardoso Lopes
9e9f2ce32d
Fix a nasty bug where a v4i64 was being wrong emitted with 32-bit
...
permutations. Also tidy up some patterns and make them close to their
instruction definition!
llvm-svn: 138392
2011-08-23 22:06:37 +00:00
Eric Christopher
7bc78f692c
Revert "Address Duncan's CR request:"
...
This reverts commit 20a05be15ea5271ab6185b83200fa88263362400. (svn rev 138340)
Conflicts:
test/Transforms/InstCombine/bitcast.ll
llvm-svn: 138366
2011-08-23 20:11:10 +00:00
Jim Grosbach
37563cd545
Thumb parsing and encoding for WFE, WFI and YIELD.
...
llvm-svn: 138364
2011-08-23 20:02:30 +00:00
Jim Grosbach
ad9e8655ee
Thumb parsing and encoding for UXTB and UXTH.
...
llvm-svn: 138363
2011-08-23 19:59:32 +00:00
Jim Grosbach
5e4ea175f6
Thumb parsing and encoding for TST.
...
llvm-svn: 138362
2011-08-23 19:53:17 +00:00
Jim Grosbach
bb07e73e0d
Thumb parsing and encoding for SXTB and SXTH.
...
llvm-svn: 138361
2011-08-23 19:51:42 +00:00
Jim Grosbach
5cc338da67
Thumb parsing and encoding for SVC.
...
llvm-svn: 138360
2011-08-23 19:49:10 +00:00
Jim Grosbach
d88404fbaa
Thumb parsing and encoding for SUB.
...
llvm-svn: 138359
2011-08-23 19:45:45 +00:00
Nick Lewycky
4c8ff77f1b
PerformSubCombine to work on integers larger than i128. Fixes a crasher.
...
llvm-svn: 138354
2011-08-23 19:01:24 +00:00
Jim Grosbach
f1ca6a6df6
Thumb parsing and encoding for STRH.
...
llvm-svn: 138352
2011-08-23 18:56:20 +00:00
Jim Grosbach
635aa69a91
Thumb parsing and encoding for STRB.
...
llvm-svn: 138349
2011-08-23 18:43:06 +00:00
Jim Grosbach
505be75900
Thumb parsing and encoding for tSTRspi.
...
llvm-svn: 138348
2011-08-23 18:39:41 +00:00
Jim Grosbach
6e546e0725
Thumb parsing and encoding for STR.
...
Not including tSTRspi.
llvm-svn: 138347
2011-08-23 18:33:38 +00:00
Jim Grosbach
d80d169a04
Thumb parsing and encoding for STM.
...
llvm-svn: 138345
2011-08-23 18:15:37 +00:00
Nadav Rotem
7d3effa389
Fix a typo in the test from the previous commit.
...
llvm-svn: 138342
2011-08-23 17:56:54 +00:00
Owen Anderson
924bcfc92f
Fix decoding of Thumb2 prefetch instructions, which account for all the remaining Thumb2 decoding failures found by randomized testing so far.
...
llvm-svn: 138341
2011-08-23 17:51:38 +00:00
Nadav Rotem
c78e6607b5
Address Duncan's CR request:
...
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector
llvm-svn: 138340
2011-08-23 17:48:43 +00:00
Owen Anderson
041dba6dec
Fix two more instances of mis-matched operand names breaking disassembly. Found by randomized testing.
...
llvm-svn: 138337
2011-08-23 17:37:32 +00:00
Owen Anderson
dcea63236e
Port more assemble tests over to disassembly tests.
...
llvm-svn: 138336
2011-08-23 17:26:35 +00:00
Craig Topper
6612e35b0d
Add support for breaking 256-bit v16i16 and v32i8 VSETCC into two 128-bit ones, avoiding sclarization. Add vex form of pcmpeqq and pcmpgtq. Fixes more cases for PR10712.
...
llvm-svn: 138321
2011-08-23 04:36:33 +00:00
Bruno Cardoso Lopes
2a3ffb5d97
Introduce a pass to insert vzeroupper instructions to avoid AVX to
...
SSE transition penalty. The pass is enabled through the "x86-use-vzeroupper"
llc command line option. This is only the first step (very naive and
conservative one) to sketch out the idea, but proper DFA is coming next
to allow smarter decisions. Comments and ideas now and in further commits
will be very appreciated.
llvm-svn: 138317
2011-08-23 01:14:17 +00:00
Jim Grosbach
cc9d792ec1
Thumb parsing and encoding for SETEND.
...
llvm-svn: 138312
2011-08-22 23:58:02 +00:00
Jim Grosbach
3636be3c8f
Thumb parsing and encoding for SBC.
...
llvm-svn: 138311
2011-08-22 23:55:58 +00:00
Jim Grosbach
c3c32d9e09
Thumb parsing and encoding for RSB.
...
llvm-svn: 138308
2011-08-22 23:47:13 +00:00
Jim Grosbach
73661b8a37
Thumb parsing and encoding for ROR.
...
llvm-svn: 138304
2011-08-22 23:40:51 +00:00
Jim Grosbach
a9d88df987
Thumb parsing and encoding for REV/REV16/REVSH.
...
llvm-svn: 138303
2011-08-22 23:39:25 +00:00
Owen Anderson
1346d79b4b
t2SMLAD is a four-register instruction, not a three-register one.
...
llvm-svn: 138301
2011-08-22 23:31:45 +00:00
Owen Anderson
f94b7b7d57
Correct operand naming of t2USAT16 to allow proper decoding.
...
llvm-svn: 138300
2011-08-22 23:27:47 +00:00
Owen Anderson
5e9989a920
Match operand naming to allow correct decoding of t2LDRSH_POST.
...
llvm-svn: 138298
2011-08-22 23:22:05 +00:00
Jim Grosbach
38c59fcb08
Improve error checking for tPUSH and tPOP register lists.
...
llvm-svn: 138295
2011-08-22 23:17:34 +00:00
Jim Grosbach
096423b6be
Tidy up. Trailing whitespace.
...
llvm-svn: 138293
2011-08-22 23:13:54 +00:00
Owen Anderson
a743409ec8
Provide a correct decoder hook for Thumb2 shifted registers. Found by randomized testing.
...
llvm-svn: 138292
2011-08-22 23:10:16 +00:00
Jim Grosbach
40da063178
Thumb parsing and encoding for PUSH.
...
llvm-svn: 138290
2011-08-22 23:05:11 +00:00
Jim Grosbach
5507203262
Fix think-o.
...
llvm-svn: 138288
2011-08-22 23:04:26 +00:00
Jim Grosbach
139acd21e6
Thumb assemmbly parsing diagnostic improvements for LDM.
...
llvm-svn: 138287
2011-08-22 23:01:07 +00:00
Jim Grosbach
0869b900cc
Thumb assembly parsing and encoding for POP.
...
llvm-svn: 138286
2011-08-22 23:00:19 +00:00
Owen Anderson
061738a680
Provide operand encoding information for half-precision VCVT instructions. Found by randomized testing.
...
llvm-svn: 138273
2011-08-22 21:34:00 +00:00
Bruno Cardoso Lopes
74f090d44c
Add support for breaking 256-bit int VETCC into two 128-bit ones,
...
avoding scalarization of the compare. Reduces code from 59 to 6
instructions. Fix PR10712.
llvm-svn: 138271
2011-08-22 20:31:04 +00:00
Owen Anderson
df698b032c
Fix decoding of VMOVSRR and VMOVRRS, which account for the overwhelming majority of decoder crashes detected by randomized testing.
...
llvm-svn: 138269
2011-08-22 20:27:12 +00:00
Owen Anderson
721c3704da
Fix another batch of VLD/VST decoding crashes discovered by randomized testing.
...
llvm-svn: 138255
2011-08-22 18:42:13 +00:00
Owen Anderson
ac92e77bb8
Correct writeback handling of duplicating VLD instructions. Discovered by randomized testing.
...
llvm-svn: 138251
2011-08-22 18:22:06 +00:00
Owen Anderson
fe29fe431d
Port another swathe of Thumb1 encoding tests over to decoding tests.
...
llvm-svn: 138250
2011-08-22 18:05:49 +00:00
Owen Anderson
b49813206b
Fix an incorrect shift when decoding SP-relative stores in Thumb1-mode. Add more tests.
...
llvm-svn: 138246
2011-08-22 17:56:58 +00:00
Jim Grosbach
aa42847164
Thumb assembly parsing and encoding for ORR.
...
llvm-svn: 138245
2011-08-22 17:41:44 +00:00
Dan Gohman
56e1cef705
Constant pointers to objects don't need reference counting.
...
llvm-svn: 138242
2011-08-22 17:29:11 +00:00
Dan Gohman
bce94fded8
Make a few tests slightly more strict.
...
llvm-svn: 138241
2011-08-22 17:27:02 +00:00
Duncan Sands
b40654e21d
Testcase for PR10663.
...
llvm-svn: 138231
2011-08-22 10:32:09 +00:00
Jim Grosbach
bd16424f91
Fix AsmParser binary precedence for shift operators.
...
rdar://9976729
llvm-svn: 138208
2011-08-20 16:24:13 +00:00
Jim Grosbach
3322f02a03
Tidy up. Whitespace.
...
llvm-svn: 138207
2011-08-20 16:10:09 +00:00
Nadav Rotem
ad4a70ad3e
Add constant folding support for bitcasts of splat vectors to integers.
...
llvm-svn: 138206
2011-08-20 14:02:29 +00:00
Eric Christopher
6582dfa7c5
Remove remainder of migrated or obsolete tests from FrontendC and remove
...
the empty directory.
llvm-svn: 138181
2011-08-20 01:04:56 +00:00
Eric Christopher
c19fd6eadc
Remove migrated or obsolete tests.
...
llvm-svn: 138176
2011-08-20 00:49:30 +00:00
Eric Christopher
1efe3d9663
Remove obsolete or migrated tests.
...
llvm-svn: 138173
2011-08-20 00:38:20 +00:00
Chad Rosier
d6641af80c
With the fix in r138164: "Add <imp-def> operands to QQ and QQQQ stack loads."
...
-verify-machineinstrs can be enabled for this test case.
llvm-svn: 138171
2011-08-20 00:34:45 +00:00
Eric Christopher
c2528a529a
Remove obsoleted test.
...
llvm-svn: 138170
2011-08-20 00:26:30 +00:00