oota-llvm.git
13 years agoFix typo in comment.
Nick Lewycky [Tue, 6 Sep 2011 06:46:01 +0000 (06:46 +0000)]
Fix typo in comment.

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

13 years agoNope! I had it right the first time. Revert the operative part of r139135 and
Nick Lewycky [Tue, 6 Sep 2011 06:39:54 +0000 (06:39 +0000)]
Nope! I had it right the first time. Revert the operative part of r139135 and
add more showing of my work.

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

13 years agoFix flipped sign. While there, show my math.
Nick Lewycky [Tue, 6 Sep 2011 05:33:18 +0000 (05:33 +0000)]
Fix flipped sign. While there, show my math.

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

13 years agoNo no no, fix typo properly!
Nick Lewycky [Tue, 6 Sep 2011 05:08:09 +0000 (05:08 +0000)]
No no no, fix typo properly!

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

13 years agoThe logic inside getMulExpr to simplify {a,+,b}*{c,+,d} was wrong, which was
Nick Lewycky [Tue, 6 Sep 2011 05:05:14 +0000 (05:05 +0000)]
The logic inside getMulExpr to simplify {a,+,b}*{c,+,d} was wrong, which was
visible given a=b=c=d=1, on iteration #1 (the second iteration). Replace it with
correct math. Fixes PR10383!

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

13 years agoRevert r139126 due to selfhost failures reported by buildbots.
Nick Lewycky [Tue, 6 Sep 2011 02:43:13 +0000 (02:43 +0000)]
Revert r139126 due to selfhost failures reported by buildbots.

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

13 years agoTeach SCEV to report a max backedge count in one interesting case in
Nick Lewycky [Mon, 5 Sep 2011 23:25:16 +0000 (23:25 +0000)]
Teach SCEV to report a max backedge count in one interesting case in
HowFarToZero; the case for a canonical loop.

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

13 years agoAdd a new MC bit for NaCl (Native Client) mode. NaCl requires that certain
Nick Lewycky [Mon, 5 Sep 2011 21:51:43 +0000 (21:51 +0000)]
Add a new MC bit for NaCl (Native Client) mode. NaCl requires that certain
instructions are more aligned than the CPU requires, and adds some additional
directives, to follow in future patches. Patch by David Meyer!

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

13 years agoUpdate the C++ backend to use the new ArrayRef'ified APIs. Patch by arrowdodger!
Nick Lewycky [Mon, 5 Sep 2011 18:50:59 +0000 (18:50 +0000)]
Update the C++ backend to use the new ArrayRef'ified APIs. Patch by arrowdodger!

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

13 years agoFix typo in comment.
Nick Lewycky [Mon, 5 Sep 2011 18:35:03 +0000 (18:35 +0000)]
Fix typo in comment.

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

13 years agoInstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original...
Benjamin Kramer [Mon, 5 Sep 2011 18:16:19 +0000 (18:16 +0000)]
InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original value if types don't match.

Fixes clang selfhost.

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

13 years agoDelete trivial landing pads that just continue unwinding the caught
Duncan Sands [Mon, 5 Sep 2011 12:57:57 +0000 (12:57 +0000)]
Delete trivial landing pads that just continue unwinding the caught
exception.

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

13 years agoAdd some simple insertvalue simplifications, for the purpose of cleaning
Duncan Sands [Mon, 5 Sep 2011 06:52:48 +0000 (06:52 +0000)]
Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg.

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

13 years agoUse canonical forms for the branch probability zero heutistic.
Benjamin Kramer [Sun, 4 Sep 2011 23:53:04 +0000 (23:53 +0000)]
Use canonical forms for the branch probability zero heutistic.

- Drop support for X >u 0, it's equivalent to X != 0 and should be canonicalized into the latter.
- Add X < 1 -> unlikely, which is what instcombine canonicalizes X <= 0 into.
- Add X > -1 -> likely, which is what instcombine canonicalizes X >= 0 into.

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

13 years agoAs a (rather delayed) followup to r136738 which stopped building the
Chandler Carruth [Sun, 4 Sep 2011 23:32:05 +0000 (23:32 +0000)]
As a (rather delayed) followup to r136738 which stopped building the
edis shared library in the Makefile build, also stop building it in the
CMake build.

Patch by arrowdodger!

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

13 years agoComplete the removal of FindBison from CMake. Noticed this when browsing
Chandler Carruth [Sun, 4 Sep 2011 23:29:12 +0000 (23:29 +0000)]
Complete the removal of FindBison from CMake. Noticed this when browsing
some CMake patch backlog...

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

13 years agoUpdate the CMake documentation to the correct variables.
Chandler Carruth [Sun, 4 Sep 2011 23:24:13 +0000 (23:24 +0000)]
Update the CMake documentation to the correct variables.

Patch by arrowdodger!

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

13 years agoUse Duncan's patch to delete the instructions in reverse order (minus the landingpad...
Bill Wendling [Sun, 4 Sep 2011 09:43:36 +0000 (09:43 +0000)]
Use Duncan's patch to delete the instructions in reverse order (minus the landingpad and terminator).

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

13 years agoThe insertion point for the loads is right before the llvm.eh.exception
Bill Wendling [Sun, 4 Sep 2011 09:02:18 +0000 (09:02 +0000)]
The insertion point for the loads is right before the llvm.eh.exception
call. The call may be in the same BB as the landingpad instruction. If that's
the case, then inserting the loads after the landingpad inst, but before the
extractvalues, causes undefined behavior.

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

13 years agovalgrind: Suppress glibc's optiized strcasecmp harder.
Benjamin Kramer [Sat, 3 Sep 2011 17:59:31 +0000 (17:59 +0000)]
valgrind: Suppress glibc's optiized strcasecmp harder.

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

13 years agoUse internal storage for command line option.
Benjamin Kramer [Sat, 3 Sep 2011 03:45:06 +0000 (03:45 +0000)]
Use internal storage for command line option.

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

13 years agoDon't reload the values that are already there. The llvm.eh.resume uses the same
Bill Wendling [Sat, 3 Sep 2011 01:38:17 +0000 (01:38 +0000)]
Don't reload the values that are already there. The llvm.eh.resume uses the same
values that the resume instruction uses.
PR10850

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

13 years agoExclude more arm jit failures pending PR10783.
Andrew Trick [Sat, 3 Sep 2011 01:08:35 +0000 (01:08 +0000)]
Exclude more arm jit failures pending PR10783.

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

13 years agoAdd AVX versions to match AESENC/AESDEC intrinsics. This hopefully ends
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:47:08 +0000 (00:47 +0000)]
Add AVX versions to match AESENC/AESDEC intrinsics. This hopefully ends
the cycle of missing AVX counterparts of already present SSE* patterns

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

13 years agoAdd AVX version of a SSE4.1 VPBLENDVB pattern
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:47:05 +0000 (00:47 +0000)]
Add AVX version of a SSE4.1 VPBLENDVB pattern

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

13 years agoAdd AVX versions of SSE4.1 EXTRACTPS patterns
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:47:03 +0000 (00:47 +0000)]
Add AVX versions of SSE4.1 EXTRACTPS patterns

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

13 years agoAdd AVX versions for SSE4.1 MOVZX* patterns
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:47:01 +0000 (00:47 +0000)]
Add AVX versions for SSE4.1 MOVZX* patterns

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

13 years agoAdd one more AVX pattern for MOVZPQILo2PQI
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:58 +0000 (00:46 +0000)]
Add one more AVX pattern for MOVZPQILo2PQI

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

13 years agoMove PUNPCKLQDQ splat pattern close to the instruction definition and
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:56 +0000 (00:46 +0000)]
Move PUNPCKLQDQ splat pattern close to the instruction definition and
duplicate it for AVX mode.

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

13 years agoAdd AVX pattern versions for PSHUFB,PSIGN{B,W,D}
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:54 +0000 (00:46 +0000)]
Add AVX pattern versions for PSHUFB,PSIGN{B,W,D}

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

13 years agoAdd AVX versions of MOVZDI2PDI patterns. Use SUBREG_TO_REG to indicate
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:51 +0000 (00:46 +0000)]
Add AVX versions of MOVZDI2PDI patterns. Use SUBREG_TO_REG to indicate
that the AVX versions (even the 128-bit ones) all clear the upper part
of the destination register.

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

13 years agoEnforce subtarget checks in a few places to be explicit when the
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:49 +0000 (00:46 +0000)]
Enforce subtarget checks in a few places to be explicit when the
pattern should be matched

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

13 years agoTidy up code moving patterns to their appropriate place!
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:47 +0000 (00:46 +0000)]
Tidy up code moving patterns to their appropriate place!

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

13 years agoAdd AVX versions of FsMOVAPS and FsMOVAPS. Teach X86InstrInfo how to use
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:45 +0000 (00:46 +0000)]
Add AVX versions of FsMOVAPS and FsMOVAPS. Teach X86InstrInfo how to use
it!

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

13 years agoTeach X86FastISel to use AVX versions of instructions when possible
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:42 +0000 (00:46 +0000)]
Teach X86FastISel to use AVX versions of instructions when possible

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

13 years agoFix 80-column and style
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:40 +0000 (00:46 +0000)]
Fix 80-column and style

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

13 years agoTidy up some SSE/AVX convert intrinsics. Also add an AVX version of
Bruno Cardoso Lopes [Sat, 3 Sep 2011 00:46:38 +0000 (00:46 +0000)]
Tidy up some SSE/AVX convert intrinsics. Also add an AVX version of
OptForSize pattern

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

13 years agoFix a truly heinous bug in DAGCombine related to AssertZext.
Owen Anderson [Sat, 3 Sep 2011 00:26:49 +0000 (00:26 +0000)]
Fix a truly heinous bug in DAGCombine related to AssertZext.
If we have a chain of zext -> assert_zext -> zext -> use, the first zext would get simplified away because of the later zext, and then the later zext would get simplified away because of the assert.  The solution is to teach SimplifyDemandedBits that assert_zext demands all of the high bits of its input, rather than only those demanded by its users.  No testcase because the only example I have manifests as llvm-gcc miscompiling LLVM, and I haven't found a smaller case that reproduces this problem.
Fixes <rdar://problem/10063365>.

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

13 years agoRevert r129875, XFAILing this test for arm, since the fix was reverted.
Dan Gohman [Sat, 3 Sep 2011 00:14:24 +0000 (00:14 +0000)]
Revert r129875, XFAILing this test for arm, since the fix was reverted.

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

13 years agoPseudo CMOV instructions don't clobber EFLAGS.
Jakob Stoklund Olesen [Fri, 2 Sep 2011 23:52:55 +0000 (23:52 +0000)]
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.

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

13 years agoCheck for EFLAGS live-out before clobbering it.
Jakob Stoklund Olesen [Fri, 2 Sep 2011 23:52:52 +0000 (23:52 +0000)]
Check for EFLAGS live-out before clobbering it.

It is only allowed to clobber EFLAGS at the end of a block if it isn't
live-in to any successor.

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

13 years agoUse existing function.
Jakob Stoklund Olesen [Fri, 2 Sep 2011 23:52:49 +0000 (23:52 +0000)]
Use existing function.

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

13 years agoThumb2 parsing and encoding for CBZ/CBNZ.
Jim Grosbach [Fri, 2 Sep 2011 23:46:10 +0000 (23:46 +0000)]
Thumb2 parsing and encoding for CBZ/CBNZ.

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

13 years agoThumb2 parsing and encoding for BXJ.
Jim Grosbach [Fri, 2 Sep 2011 23:43:09 +0000 (23:43 +0000)]
Thumb2 parsing and encoding for BXJ.

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

13 years agoThumb2 parsing and encoding for BIC.
Jim Grosbach [Fri, 2 Sep 2011 23:37:54 +0000 (23:37 +0000)]
Thumb2 parsing and encoding for BIC.

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

13 years agoThumb2 parsing and encoding for BFI.
Jim Grosbach [Fri, 2 Sep 2011 23:28:46 +0000 (23:28 +0000)]
Thumb2 parsing and encoding for BFI.

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

13 years agoThumb2 parsing and encoding for BFC.
Jim Grosbach [Fri, 2 Sep 2011 23:25:46 +0000 (23:25 +0000)]
Thumb2 parsing and encoding for BFC.

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

13 years agoThumb2 parsing and encoding of B instruction.
Jim Grosbach [Fri, 2 Sep 2011 23:22:08 +0000 (23:22 +0000)]
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.

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

13 years agoAttempt to silence known valgrind errors.
Andrew Trick [Fri, 2 Sep 2011 22:59:34 +0000 (22:59 +0000)]
Attempt to silence known valgrind errors.

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

13 years agoRemove unused variables.
Jakob Stoklund Olesen [Fri, 2 Sep 2011 22:41:25 +0000 (22:41 +0000)]
Remove unused variables.

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

13 years agoTry to eliminate the use of the 'unwind' instruction.
Bill Wendling [Fri, 2 Sep 2011 22:41:11 +0000 (22:41 +0000)]
Try to eliminate the use of the 'unwind' instruction.

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

13 years agoDon't fast-isel for atomic load/store; some cases require extra handling missing...
Eli Friedman [Fri, 2 Sep 2011 22:33:24 +0000 (22:33 +0000)]
Don't fast-isel for atomic load/store; some cases require extra handling missing from fast-isel.

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

13 years agoThumb2 parsing and encoding for ASR.
Jim Grosbach [Fri, 2 Sep 2011 21:28:54 +0000 (21:28 +0000)]
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.

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

13 years agoBetter fix for this testcase. Update it to the new EH scheme entirely.
Bill Wendling [Fri, 2 Sep 2011 21:27:08 +0000 (21:27 +0000)]
Better fix for this testcase. Update it to the new EH scheme entirely.

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

13 years agoUpdate for new EH stuff. (I'm not sure if this is 100% correct.)
Bill Wendling [Fri, 2 Sep 2011 21:24:17 +0000 (21:24 +0000)]
Update for new EH stuff. (I'm not sure if this is 100% correct.)

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

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