oota-llvm.git
13 years agoTest case update for unroll-scev.
Andrew Trick [Fri, 2 Sep 2011 21:21:03 +0000 (21:21 +0000)]
Test case update for unroll-scev.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139037 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoComment and clarifying assert.
Andrew Trick [Fri, 2 Sep 2011 21:20:46 +0000 (21:20 +0000)]
Comment and clarifying assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139036 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoNo need to get fancy inserting a PHI node when the values are stored in stack
Bill Wendling [Fri, 2 Sep 2011 21:17:08 +0000 (21:17 +0000)]
No need to get fancy inserting a PHI node when the values are stored in stack
slots. This fixes a bug where the number of nodes coming into the PHI node may
not equal the number of predecessors. E.g., two or more landingpad instructions
may require a PHI before reaching the eh.exception and eh.selector instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139035 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake RecordVal Name an Init
David Greene [Fri, 2 Sep 2011 20:12:07 +0000 (20:12 +0000)]
Make RecordVal Name an Init

Store a RecordVal's name as an Init to allow class-qualified Record
members to reference Records that have Init names.  We'll use this to
provide more programmability in how we name defs and their associated
members.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139031 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChange X86 disassembly to print immediates values as signed by default. Special
Kevin Enderby [Fri, 2 Sep 2011 20:01:23 +0000 (20:01 +0000)]
Change X86 disassembly to print immediates values as signed by default.  Special
case those instructions that the immediate is not sign-extend.  radr://8795217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139028 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy up. Formatting.
Jim Grosbach [Fri, 2 Sep 2011 18:46:15 +0000 (18:46 +0000)]
Tidy up. Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139024 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate comments to reflect reality.
Bill Wendling [Fri, 2 Sep 2011 18:43:33 +0000 (18:43 +0000)]
Update comments to reflect reality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139023 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy up. 80 columns.
Jim Grosbach [Fri, 2 Sep 2011 18:43:25 +0000 (18:43 +0000)]
Tidy up. 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139022 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb2 parsing and encoding for AND (register).
Jim Grosbach [Fri, 2 Sep 2011 18:41:35 +0000 (18:41 +0000)]
Thumb2 parsing and encoding for AND (register).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139021 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSimplify by using isFullCopy().
Jakob Stoklund Olesen [Fri, 2 Sep 2011 18:18:29 +0000 (18:18 +0000)]
Simplify by using isFullCopy().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139019 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r138826 until PR10834 can be fixed.
Bill Wendling [Fri, 2 Sep 2011 18:15:04 +0000 (18:15 +0000)]
Revert r138826 until PR10834 can be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139018 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb2 parsing and encoding for ADD (register).
Jim Grosbach [Fri, 2 Sep 2011 18:14:46 +0000 (18:14 +0000)]
Thumb2 parsing and encoding for ADD (register).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139017 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDarwin wants ctors/dtors to be ordered the other way round to linux.
Duncan Sands [Fri, 2 Sep 2011 18:07:19 +0000 (18:07 +0000)]
Darwin wants ctors/dtors to be ordered the other way round to linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139015 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix the disassembly of the X86 "crc32w %ax, %eax" instruction. Bug 10702.
Kevin Enderby [Fri, 2 Sep 2011 18:03:03 +0000 (18:03 +0000)]
Fix the disassembly of the X86 "crc32w %ax, %eax" instruction. Bug 10702.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139014 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTests for Thumb2 AND (immediate) instruction.
Jim Grosbach [Fri, 2 Sep 2011 17:44:27 +0000 (17:44 +0000)]
Tests for Thumb2 AND (immediate) instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139013 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoExtra CHECK-NOT to make sure that GVN transform works properly.
Jakub Staszak [Fri, 2 Sep 2011 17:40:39 +0000 (17:40 +0000)]
Extra CHECK-NOT to make sure that GVN transform works properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139012 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago-unroll-scev flag removal
Andrew Trick [Fri, 2 Sep 2011 17:36:14 +0000 (17:36 +0000)]
-unroll-scev flag removal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139010 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoEnable SCEV-based unrolling by default.
Andrew Trick [Fri, 2 Sep 2011 17:26:28 +0000 (17:26 +0000)]
Enable SCEV-based unrolling by default.

This changes loop unrolling to use the same mechanism for trip count
computation as indvars. This is a stronger check that tends to unroll
more loops. A very common side-effect is that many single iteration
loops will be removed sooner. The real goal was simply to remove
dependence on canonical IVs.

x86 is break even.
ARM performance changes to expect (+ is good):
External/SPEC/CFP2000/183.equake/183.equake +13%
SingleSource/Benchmarks/Dhrystone/fldry     +21%
MultiSource/Applications/spiff/spiff         +3%
SingleSource/Benchmarks/Stanford/Puzzle     -14%

The Puzzle regression is actually an improvement in loop optimization
that defeats GVN: rdar://problem/10065079.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139009 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd FIXME. Thumb2 ADR encoding choice is non-trivial.
Jim Grosbach [Fri, 2 Sep 2011 17:21:59 +0000 (17:21 +0000)]
Add FIXME. Thumb2 ADR encoding choice is non-trivial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139008 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReturn undef value (instead of arbitrary) for wrong or undef index in
Jakub Staszak [Fri, 2 Sep 2011 17:01:40 +0000 (17:01 +0000)]
Return undef value (instead of arbitrary) for wrong or undef index in
ConstantVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139007 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoConstantVector returns arbitrary value for the wrong index.
Jakub Staszak [Fri, 2 Sep 2011 15:43:43 +0000 (15:43 +0000)]
ConstantVector returns arbitrary value for the wrong index.
This fixes PR10813.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139006 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCompare type size instead of type _store_ size to make sure that BitCastInst
Jakub Staszak [Fri, 2 Sep 2011 14:57:37 +0000 (14:57 +0000)]
Compare type size instead of type _store_ size to make sure that BitCastInst
will be valid. This fixes PR10820.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139005 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPass signed (not unsigned) 10 bit field to SPU 'ori' instruction.
Kalle Raiskila [Fri, 2 Sep 2011 10:05:01 +0000 (10:05 +0000)]
Pass signed (not unsigned) 10 bit field to SPU 'ori' instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139004 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake IC_VEX* not inherit from IC_*. Prevents instructions with no VEX form from disas...
Craig Topper [Fri, 2 Sep 2011 04:17:54 +0000 (04:17 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138997 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPerform the upgrading of the old EH to the new EH in a more sane manner.
Bill Wendling [Fri, 2 Sep 2011 01:30:08 +0000 (01:30 +0000)]
Perform the upgrading of the old EH to the new EH in a more sane manner.

Perform the upgrading in steps.

* First, create a map of the invokes to the EH intrinsics.

* Next, take that mapping and determine if the invoke's unwind destination has a
  single predecessor. If not, then create a new empty block to hold the new
  landingpad instruction.

* Create a landingpad instruction into the uwnind destination. Fill it with the
  values from the old selector. Map the old intrinsic calls to the new
  landingpad values (there may be multiple landingpad instructions per instrinic
  call pairs).

* Go through the old intrinsic calls, create a PHI node when necessary, and then
  replace their values with the new values from the landingpad instructions.

* Delete all dead instructions.

* ???

* Profit!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138990 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate to new EH scheme.
Bill Wendling [Fri, 2 Sep 2011 01:25:11 +0000 (01:25 +0000)]
Update to new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138989 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMerge the ARM disassembler header into the implementation file, since it is not exter...
Owen Anderson [Thu, 1 Sep 2011 23:35:51 +0000 (23:35 +0000)]
Merge the ARM disassembler header into the implementation file, since it is not externally exposed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138982 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix 80 columns violations.
Owen Anderson [Thu, 1 Sep 2011 23:23:50 +0000 (23:23 +0000)]
Fix 80 columns violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138980 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r131152, r129796, r129761. This code is currently considered
Dan Gohman [Thu, 1 Sep 2011 23:07:08 +0000 (23:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138977 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't drop alignment info on local common symbols.
Benjamin Kramer [Thu, 1 Sep 2011 23:04:27 +0000 (23:04 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138976 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoNull-initialize to shut up -Wuninitialized warnings.
Eli Friedman [Thu, 1 Sep 2011 22:27:41 +0000 (22:27 +0000)]
Null-initialize to shut up -Wuninitialized warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138974 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix apparent build error caused by r138948 on certain versions of GCC with -Werror...
James Molloy [Thu, 1 Sep 2011 22:01:14 +0000 (22:01 +0000)]
Fix apparent build error caused by r138948 on certain versions of GCC with -Werror. Sorry for the inconvenience.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138973 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReduce indentation. No functionality change.
Bill Wendling [Thu, 1 Sep 2011 21:29:49 +0000 (21:29 +0000)]
Reduce indentation. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138968 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChange worklist driven deletion to be an iterative process.
Bill Wendling [Thu, 1 Sep 2011 21:28:33 +0000 (21:28 +0000)]
Change worklist driven deletion to be an iterative process.
Duncan noticed this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138967 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix test; sorry for any inconvenience.
Eli Friedman [Thu, 1 Sep 2011 21:25:42 +0000 (21:25 +0000)]
Fix test; sorry for any inconvenience.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138966 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix an issue with the IR sink pass found by inspection. (I'm not sure anyone is...
Eli Friedman [Thu, 1 Sep 2011 21:21:24 +0000 (21:21 +0000)]
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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138965 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing newline.
Eli Friedman [Thu, 1 Sep 2011 21:20:11 +0000 (21:20 +0000)]
Add missing newline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138964 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix the build for us -Werror users.
Nick Lewycky [Thu, 1 Sep 2011 21:09:04 +0000 (21:09 +0000)]
Fix the build for us -Werror users.
Remove broken emacs mode major notation marking a C++ file as C.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138963 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake isSafeToSpeculativelyExecute() return the right answer for some new instructions...
Eli Friedman [Thu, 1 Sep 2011 21:03:03 +0000 (21:03 +0000)]
Make isSafeToSpeculativelyExecute() return the right answer for some new instructions.  Found by inspection; not sure what practical impact, if any, this has.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138962 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoXFAIL this test on arm until the backend is fixed.
Benjamin Kramer [Thu, 1 Sep 2011 18:40:03 +0000 (18:40 +0000)]
XFAIL this test on arm until the backend is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138955 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThis test depends on cmov being available.
Benjamin Kramer [Thu, 1 Sep 2011 18:40:01 +0000 (18:40 +0000)]
This test depends on cmov being available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138954 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPermit remat of partial register defs when it is safe.
Jakob Stoklund Olesen [Thu, 1 Sep 2011 18:27:51 +0000 (18:27 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138953 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoARM 'rscs' mnemonic is carry-setting 'rsc', not 'rs' with a 'cs' condition code.
Jim Grosbach [Thu, 1 Sep 2011 18:22:13 +0000 (18:22 +0000)]
ARM 'rscs' mnemonic is carry-setting 'rsc', not 'rs' with a 'cs' condition code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138952 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix vbroadcast matching logic to early unmatch if the node doesn't have
Bruno Cardoso Lopes [Thu, 1 Sep 2011 18:15:06 +0000 (18:15 +0000)]
Fix vbroadcast matching logic to early unmatch if the node doesn't have
only one use. Fix PR10825.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138951 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix up r137380 based on post-commit review by Jim Grosbach.
James Molloy [Thu, 1 Sep 2011 18:02:14 +0000 (18:02 +0000)]
Fix up r137380 based on post-commit review by Jim Grosbach.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138948 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agot2Bcc is allowed to have a predicate without a preceding IT instruction.
Owen Anderson [Thu, 1 Sep 2011 17:47:45 +0000 (17:47 +0000)]
t2Bcc is allowed to have a predicate without a preceding IT instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138946 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r138794, "Do not try to rematerialize a value from a partial definition."
Jakob Stoklund Olesen [Thu, 1 Sep 2011 17:25:18 +0000 (17:25 +0000)]
Revert r138794, "Do not try to rematerialize a value from a partial definition."

The problem is fixed for all register allocators by r138944, so this
patch is no longer necessary.

<rdar://problem/10032939>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138945 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPrevent remat of partial register redefinitions.
Jakob Stoklund Olesen [Thu, 1 Sep 2011 17:18:50 +0000 (17:18 +0000)]
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>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138944 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach MachineLICM reg pressure tracking code to deal with MVT::untyped. Sorry, I...
Evan Cheng [Thu, 1 Sep 2011 01:45:00 +0000 (01:45 +0000)]
Teach MachineLICM reg pressure tracking code to deal with MVT::untyped. Sorry, I can't come up with a small test case. rdar://10043690

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138934 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate to new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 01:28:25 +0000 (01:28 +0000)]
Update to new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138933 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoResubmit with fix. Properly remove the instructions except for landingpad, which...
Bill Wendling [Thu, 1 Sep 2011 01:28:11 +0000 (01:28 +0000)]
Resubmit with fix. Properly remove the instructions except for landingpad, which should be removed only when its invokes are.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138932 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSubmitted this too early.
Bill Wendling [Thu, 1 Sep 2011 01:18:33 +0000 (01:18 +0000)]
Submitted this too early.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138931 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't DCE the landingpad instruction.
Bill Wendling [Thu, 1 Sep 2011 01:16:58 +0000 (01:16 +0000)]
Don't DCE the landingpad instruction.

The landingpad instruction can be removed only when its invokes are removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138930 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate to new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 01:08:21 +0000 (01:08 +0000)]
Update to new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138928 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate to new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 01:02:41 +0000 (01:02 +0000)]
Update to new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138927 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate some tests to the new EH scheme.
Bill Wendling [Thu, 1 Sep 2011 00:58:03 +0000 (00:58 +0000)]
Update some tests to the new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138925 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPreRA scheduler should avoid cloning compares.
Andrew Trick [Thu, 1 Sep 2011 00:54:31 +0000 (00:54 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138924 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't forget to add the landingpad and resume instructions to the InstructionList.
Bill Wendling [Thu, 1 Sep 2011 00:50:20 +0000 (00:50 +0000)]
Don't forget to add the landingpad and resume instructions to the InstructionList.

This was found via a nightly build of 483.xalancbmk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138923 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb2 assembly parsing and encoding for ADD(immediate).
Jim Grosbach [Thu, 1 Sep 2011 00:28:52 +0000 (00:28 +0000)]
Thumb2 assembly parsing and encoding for ADD(immediate).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138922 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFixup for functions that return a bool.
Chad Rosier [Wed, 31 Aug 2011 23:49:05 +0000 (23:49 +0000)]
Fixup for functions that return a bool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138918 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReenable test.
Bill Wendling [Wed, 31 Aug 2011 23:08:05 +0000 (23:08 +0000)]
Reenable test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138916 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert accidental commit
Bill Wendling [Wed, 31 Aug 2011 23:07:46 +0000 (23:07 +0000)]
Revert accidental commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138915 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisable this test until Bill fixes it properly.
Eli Friedman [Wed, 31 Aug 2011 23:03:30 +0000 (23:03 +0000)]
Disable this test until Bill fixes it properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138914 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoStatic relocation model Thumb jump table interworking.
Jim Grosbach [Wed, 31 Aug 2011 22:23:09 +0000 (22:23 +0000)]
Static relocation model Thumb jump table interworking.

Make sure the low bit of the PC is set when loading an address directly
for jump tables in static relocation model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138912 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThe asm parser currently selects the wrong encoding for non-conditional Thumb2 branch...
Owen Anderson [Wed, 31 Aug 2011 22:00:41 +0000 (22:00 +0000)]
The asm parser currently selects the wrong encoding for non-conditional Thumb2 branches.  However, this exposed a number of situations where the decoder was too permissive in allowing invalid instructions to decode successful.  Specify additional fixed bits to close those gaps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138910 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate to new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:50:07 +0000 (21:50 +0000)]
Update to new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138908 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate to new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:44:24 +0000 (21:44 +0000)]
Update to new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138906 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove old declare statements.
Bill Wendling [Wed, 31 Aug 2011 21:41:20 +0000 (21:41 +0000)]
Remove old declare statements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138905 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate more tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:40:15 +0000 (21:40 +0000)]
Update more tests to the new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138904 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate more tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:39:05 +0000 (21:39 +0000)]
Update more tests to the new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138903 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd tests for the transformations SCCP can do on atomic loads and stores (which are...
Eli Friedman [Wed, 31 Aug 2011 21:37:06 +0000 (21:37 +0000)]
Add tests for the transformations SCCP can do on atomic loads and stores (which are safe without any modifications).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138902 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix Size Typing
David Greene [Wed, 31 Aug 2011 21:34:20 +0000 (21:34 +0000)]
Fix Size Typing

Stores sizes as uint64_t to avoid possible truncation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138901 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r138894. This was failing on cmake-clang-i686-msvc10.
Bill Wendling [Wed, 31 Aug 2011 21:20:25 +0000 (21:20 +0000)]
Revert r138894. This was failing on cmake-clang-i686-msvc10.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138900 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb2 t2Bcc should encode as t2B when condition is 'always'.
Jim Grosbach [Wed, 31 Aug 2011 21:17:31 +0000 (21:17 +0000)]
Thumb2 t2Bcc should encode as t2B when condition is 'always'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138898 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove more code around and duplicate AVX patterns: MOVHPS and MOVLPS
Bruno Cardoso Lopes [Wed, 31 Aug 2011 21:15:32 +0000 (21:15 +0000)]
Move more code around and duplicate AVX patterns: MOVHPS and MOVLPS

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138897 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove MOVAPS,MOVUPS patterns close to the instructions definition
Bruno Cardoso Lopes [Wed, 31 Aug 2011 21:15:29 +0000 (21:15 +0000)]
Move MOVAPS,MOVUPS patterns close to the instructions definition

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138896 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove "_Int" forms of MOVUPSmr and MOVAPSmr
Bruno Cardoso Lopes [Wed, 31 Aug 2011 21:15:22 +0000 (21:15 +0000)]
Remove "_Int" forms of MOVUPSmr and MOVAPSmr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138895 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate more tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 21:04:11 +0000 (21:04 +0000)]
Update more tests to the new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138894 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate the tests to the new EH scheme.
Bill Wendling [Wed, 31 Aug 2011 20:55:40 +0000 (20:55 +0000)]
Update the tests to the new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138891 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake sure we aren't deleting the landingpad instruction.
Bill Wendling [Wed, 31 Aug 2011 20:55:20 +0000 (20:55 +0000)]
Make sure we aren't deleting the landingpad instruction.

The landingpad instruction is required in the landing pad block. Because we're
not deleting terminating instructions, the invoke may still jump to here (see
Transforms/SCCP/2004-11-16-DeadInvoke.ll). Remove all uses of the landingpad
instruction, but keep it around until code-gen can remove the basic block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138890 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix encoding for tBcc with immediate offset operand.
Owen Anderson [Wed, 31 Aug 2011 20:26:14 +0000 (20:26 +0000)]
Fix encoding for tBcc with immediate offset operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138889 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMisc cleanup; addresses Duncan's comments on r138877.
Eli Friedman [Wed, 31 Aug 2011 20:13:26 +0000 (20:13 +0000)]
Misc cleanup; addresses Duncan's comments on r138877.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138887 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen performing instruction selection for LDR_PRE_IMM/LDRB_PRE_IMM, we still need...
Owen Anderson [Wed, 31 Aug 2011 20:00:11 +0000 (20:00 +0000)]
When performing instruction selection for LDR_PRE_IMM/LDRB_PRE_IMM, we still need to preserve the sign of the index.  This fixes miscompilations of Quicksort in the nightly testsuite, and hopefully others as well.
<rdar://problem/10046188>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138885 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRun the Thumb1 parser tests in Thumb2 mode, as well.
Jim Grosbach [Wed, 31 Aug 2011 19:50:28 +0000 (19:50 +0000)]
Run the Thumb1 parser tests in Thumb2 mode, as well.

Thumb2 is a superset of Thumb1, so all of the encodings should still work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138883 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove FIXME. Thumb2 MOV instruction will use separate custom tricks.
Jim Grosbach [Wed, 31 Aug 2011 18:39:39 +0000 (18:39 +0000)]
Remove FIXME. Thumb2 MOV instruction will use separate custom tricks.

When we want encoding T3 (the wide encoding), we can explicitly check for
that and twiddle the CanAcceptCarrySet accordingly. For now, just correctly
handle encodings T1 and T2 when in Thumb2 mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138879 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFill in type legalization for MERGE_VALUES in all the various cases. Patch by Micah...
Eli Friedman [Wed, 31 Aug 2011 18:36:04 +0000 (18:36 +0000)]
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

13 years agoThumb NOP encoding varies depending on ARCH revision.
Jim Grosbach [Wed, 31 Aug 2011 18:35:46 +0000 (18:35 +0000)]
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

13 years agoFix roundtripping of Thumb BL/BLX instructions with immediate offsets instead of...
Owen Anderson [Wed, 31 Aug 2011 18:30:20 +0000 (18:30 +0000)]
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

13 years agotBcc is OK to be predicated in Thumb2 outside of IT blocks (obviously).
Jim Grosbach [Wed, 31 Aug 2011 18:29:05 +0000 (18:29 +0000)]
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

13 years agoGeneric expansion for atomic load/store into cmpxchg/atomicrmw xchg; implements 64...
Eli Friedman [Wed, 31 Aug 2011 18:26:09 +0000 (18:26 +0000)]
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

13 years agoThumb2 parsing and encoding for ADC(register).
Jim Grosbach [Wed, 31 Aug 2011 18:23:08 +0000 (18:23 +0000)]
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

13 years agoAfter r138010, subroutine type does not have context info. Update type verifier accor...
Devang Patel [Wed, 31 Aug 2011 18:04:31 +0000 (18:04 +0000)]
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

13 years ago64-bit atomic cmpxchg for ARM.
Eli Friedman [Wed, 31 Aug 2011 17:52:22 +0000 (17:52 +0000)]
64-bit atomic cmpxchg for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138868 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix typo. Patch by Liu.
Akira Hatanaka [Wed, 31 Aug 2011 17:49:04 +0000 (17:49 +0000)]
Fix typo. Patch by Liu.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138866 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCompress Repeated Byte Output
David Greene [Wed, 31 Aug 2011 17:30:56 +0000 (17:30 +0000)]
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

13 years agoTweak Thumb1 ADD encoding selection a bit.
Jim Grosbach [Wed, 31 Aug 2011 17:07:33 +0000 (17:07 +0000)]
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

13 years agoPut VMOVS widening under a command line option, off by default.
Jakob Stoklund Olesen [Wed, 31 Aug 2011 17:00:02 +0000 (17:00 +0000)]
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

13 years agoThis test requires sse, otherwise x87 ops will block tailcall optimization
Benjamin Kramer [Wed, 31 Aug 2011 16:49:05 +0000 (16:49 +0000)]
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

13 years agoSpelling and grammar fixes to problems found by Duncan.
Rafael Espindola [Wed, 31 Aug 2011 16:43:33 +0000 (16:43 +0000)]
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

13 years agoMake sure we don't crash when -miphoneos-version-min is specified on x86. Hopefully...
Eli Friedman [Wed, 31 Aug 2011 16:19:51 +0000 (16:19 +0000)]
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