oota-llvm.git
12 years agoAdd support for AVX 256-bit version of MOVDDUP!
Bruno Cardoso Lopes [Thu, 25 Aug 2011 21:40:37 +0000 (21:40 +0000)]
Add support for AVX 256-bit version of MOVDDUP!

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

12 years agoMake isMOVDDUP mask check more strict and update comments!
Bruno Cardoso Lopes [Thu, 25 Aug 2011 21:40:34 +0000 (21:40 +0000)]
Make isMOVDDUP mask check more strict and update comments!

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

12 years agoConstify Comparison
David Greene [Thu, 25 Aug 2011 20:18:22 +0000 (20:18 +0000)]
Constify Comparison

Make ConstantInt::uge() const so it may be used in const contexts.

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

12 years agoPort over additional encoding tests to decoding tests, and fix an operand ordering...
Owen Anderson [Thu, 25 Aug 2011 18:30:18 +0000 (18:30 +0000)]
Port over additional encoding tests to decoding tests, and fix an operand ordering bug this exposed.

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

12 years agoIntel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.
Benjamin Kramer [Thu, 25 Aug 2011 18:05:56 +0000 (18:05 +0000)]
Intel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.

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

12 years agoARM fix for missing implicit operands on ldmia_ret.
Andrew Trick [Thu, 25 Aug 2011 17:50:53 +0000 (17:50 +0000)]
ARM fix for missing implicit operands on ldmia_ret.

rdar://10005094: miscompile of 176.gcc

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

12 years agowhitespace
Andrew Trick [Thu, 25 Aug 2011 17:40:54 +0000 (17:40 +0000)]
whitespace

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

12 years agoExplicitly disallow predication in Thumb1 assembly.
Jim Grosbach [Thu, 25 Aug 2011 17:23:55 +0000 (17:23 +0000)]
Explicitly disallow predication in Thumb1 assembly.

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

12 years agoAdd more missing TB encodings to VEX instructions to allow them to be disassembled...
Craig Topper [Thu, 25 Aug 2011 08:11:01 +0000 (08:11 +0000)]
Add more missing TB encodings to VEX instructions to allow them to be disassembled. Fixes remainder of PR10678.

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

12 years agoGive ATTR_VEX higher priority when generating the disassembler context table. Fixes...
Craig Topper [Thu, 25 Aug 2011 07:42:00 +0000 (07:42 +0000)]
Give ATTR_VEX higher priority when generating the disassembler context table. Fixes disassembling of VEX instructions with 'pp'=00. Fixes subset of PR10678.

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

12 years agoAdd TB encoding to VEROALL, VZEROUPPER, and VCVTPS2PD to allow them to be disassemble...
Craig Topper [Thu, 25 Aug 2011 06:57:46 +0000 (06:57 +0000)]
Add TB encoding to VEROALL, VZEROUPPER, and VCVTPS2PD to allow them to be disassembled. Fixes PR10723.

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

12 years agoLSR wants to split the landing pad's critical edge. Let it do it, but use the
Bill Wendling [Thu, 25 Aug 2011 05:55:40 +0000 (05:55 +0000)]
LSR wants to split the landing pad's critical edge. Let it do it, but use the
proper function to do it.

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

12 years agoInitialize member variable.
Benjamin Kramer [Thu, 25 Aug 2011 04:04:18 +0000 (04:04 +0000)]
Initialize member variable.

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

12 years agoAdd support for 256-bit versions of VSHUFPD and VSHUFPS.
Bruno Cardoso Lopes [Thu, 25 Aug 2011 02:58:26 +0000 (02:58 +0000)]
Add support for 256-bit versions of VSHUFPD and VSHUFPS.

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

12 years agoAdd memory version of SHUFPD to mask decoding!
Bruno Cardoso Lopes [Thu, 25 Aug 2011 02:58:21 +0000 (02:58 +0000)]
Add memory version of SHUFPD to mask decoding!

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

12 years agoRemove empty directories.
Eli Friedman [Thu, 25 Aug 2011 01:33:48 +0000 (01:33 +0000)]
Remove empty directories.

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

12 years agoUpdate tests to the newest EH syntax.
Bill Wendling [Thu, 25 Aug 2011 01:30:18 +0000 (01:30 +0000)]
Update tests to the newest EH syntax.

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

12 years agoHide -global-merge option.
Evan Cheng [Thu, 25 Aug 2011 01:22:49 +0000 (01:22 +0000)]
Hide -global-merge option.

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

12 years agoAdd feature test for the new exception handling stuff.
Bill Wendling [Thu, 25 Aug 2011 01:19:13 +0000 (01:19 +0000)]
Add feature test for the new exception handling stuff.

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

12 years agoWhen inserting new instructions, use getFirstInsertionPt instead of
Bill Wendling [Thu, 25 Aug 2011 01:08:34 +0000 (01:08 +0000)]
When inserting new instructions, use getFirstInsertionPt instead of
getFirstNonPHI so that it will skip over the landingpad instructions as well.

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

12 years agoAdd a command line option to disable global merge pass.
Evan Cheng [Thu, 25 Aug 2011 01:00:36 +0000 (01:00 +0000)]
Add a command line option to disable global merge pass.

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

12 years agoRemove a out-of-place comment.
Evan Cheng [Thu, 25 Aug 2011 00:54:42 +0000 (00:54 +0000)]
Remove a out-of-place comment.

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

12 years agoCreate a section for non-instructions patterns in the beginning of the
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:18:11 +0000 (23:18 +0000)]
Create a section for non-instructions patterns in the beginning of the
file, and move more code around!

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

12 years agoMove code around!
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:18:09 +0000 (23:18 +0000)]
Move code around!

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

12 years agoOrganize UNPCK* patterns, also add remaining for AVX.
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:18:06 +0000 (23:18 +0000)]
Organize UNPCK* patterns, also add remaining for AVX.

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

12 years agoMove remaining MOVDDUP patterns close to MOVDDUP defintion and duplicate
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:18:04 +0000 (23:18 +0000)]
Move remaining MOVDDUP patterns close to MOVDDUP defintion and duplicate
the missing ones for AVX.

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

12 years agoOrganize and tidy up MOVDDUP section. Also update comments!
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:18:02 +0000 (23:18 +0000)]
Organize and tidy up MOVDDUP section. Also update comments!

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

12 years agoMove MOVHLPS patterns close to MOVHLPS definition, and duplicate the
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:17:59 +0000 (23:17 +0000)]
Move MOVHLPS patterns close to MOVHLPS definition, and duplicate the
pattern for 128-bit AVX mode.

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

12 years agoMove all PSHUF* patterns close to the PSHUF* definitions. Also be
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:17:57 +0000 (23:17 +0000)]
Move all PSHUF* patterns close to the PSHUF* definitions. Also be
explicit about which subtarget they refer to, and add AVX versions of
the ones we currently don't. Remove old and now wrong comments!

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

12 years agoMove all SHUFP* patterns close to the SHUFP* definitions. Also be
Bruno Cardoso Lopes [Wed, 24 Aug 2011 23:17:55 +0000 (23:17 +0000)]
Move all SHUFP* patterns close to the SHUFP* definitions. Also be
explicit about which subtarget they refer to, and add AVX versions of
the ones we currently don't. Make the mask check more strict, to be
clear it won't be used to match to 256-bit versions!

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

12 years agoPerform more thorough checking of t2IT mask parameters, which fixes all remaining...
Owen Anderson [Wed, 24 Aug 2011 22:40:22 +0000 (22:40 +0000)]
Perform more thorough checking of t2IT mask parameters, which fixes all remaining crashers when disassembling the entire 16-bit instruction space.

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

12 years agoHook up 64-bit atomic load/store on x86-32. I plan to write more efficient implement...
Eli Friedman [Wed, 24 Aug 2011 22:33:28 +0000 (22:33 +0000)]
Hook up 64-bit atomic load/store on x86-32.  I plan to write more efficient implementations eventually.

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

12 years agoSome autoconf tests use module level inline asm to test compiler's handling of
Evan Cheng [Wed, 24 Aug 2011 22:31:37 +0000 (22:31 +0000)]
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

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

12 years agoUpdate tests for 138501.
Jim Grosbach [Wed, 24 Aug 2011 22:30:18 +0000 (22:30 +0000)]
Update tests for 138501.

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

12 years agoARM asm backend initialize isThumbMode based on target triple.
Jim Grosbach [Wed, 24 Aug 2011 22:27:35 +0000 (22:27 +0000)]
ARM asm backend initialize isThumbMode based on target triple.

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

12 years agoThumb .n mnemonic qualifiers can be ignored for now.
Jim Grosbach [Wed, 24 Aug 2011 22:19:48 +0000 (22:19 +0000)]
Thumb .n mnemonic qualifiers can be ignored for now.

We'll need to pay attention to them when we start getting more serious about
the details of parsing thumb2 assembly.

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

12 years agoThumb parsing and encoding for SUB (SP minu immediate).
Jim Grosbach [Wed, 24 Aug 2011 21:42:27 +0000 (21:42 +0000)]
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.

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

12 years agoBe careful not to walk off the end of the operand info list while updating VFP predic...
Owen Anderson [Wed, 24 Aug 2011 21:35:46 +0000 (21:35 +0000)]
Be careful not to walk off the end of the operand info list while updating VFP predicates.

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

12 years agoThumb parsing and encoding support for ADD SP instructions.
Jim Grosbach [Wed, 24 Aug 2011 21:22:15 +0000 (21:22 +0000)]
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.

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

12 years agoFix whitespace.
Eli Friedman [Wed, 24 Aug 2011 21:17:30 +0000 (21:17 +0000)]
Fix whitespace.

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

12 years agoBasic tests for atomic load and store on x86.
Eli Friedman [Wed, 24 Aug 2011 21:16:59 +0000 (21:16 +0000)]
Basic tests for atomic load and store on x86.

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

12 years agoSkip the landingpad instruction when determining the insertion point.
Bill Wendling [Wed, 24 Aug 2011 21:06:46 +0000 (21:06 +0000)]
Skip the landingpad instruction when determining the insertion point.

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

12 years agoBasic x86 code generation for atomic load and store instructions.
Eli Friedman [Wed, 24 Aug 2011 20:50:09 +0000 (20:50 +0000)]
Basic x86 code generation for atomic load and store instructions.

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

12 years agoUse getFirstInsertionPt instead of getFirstNonPHI so that it skips to the proper
Bill Wendling [Wed, 24 Aug 2011 20:28:43 +0000 (20:28 +0000)]
Use getFirstInsertionPt instead of getFirstNonPHI so that it skips to the proper
insertion place.

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

12 years agoSome minor updates to atomic acquire/release docs in LangRef.
Eli Friedman [Wed, 24 Aug 2011 20:28:39 +0000 (20:28 +0000)]
Some minor updates to atomic acquire/release docs in LangRef.

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

12 years agoImplement Constant::isAllOnesValue(). Fix ConstantFolding to use the new api.
Nadav Rotem [Wed, 24 Aug 2011 20:18:38 +0000 (20:18 +0000)]
Implement Constant::isAllOnesValue(). Fix ConstantFolding to use the new api.

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

12 years agoWhen printing Thumb1 NOP ('mov r8, r8'), make sure to print the predicate.
Jim Grosbach [Wed, 24 Aug 2011 20:06:14 +0000 (20:06 +0000)]
When printing Thumb1 NOP ('mov r8, r8'), make sure to print the predicate.

rdar://10015134

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

12 years agoMark VZEROALL as clobbering all YMM registers
Bruno Cardoso Lopes [Wed, 24 Aug 2011 18:48:33 +0000 (18:48 +0000)]
Mark VZEROALL as clobbering all YMM registers

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

12 years agoAdd missing explicit writeback operand to tSTMIA_UPD.
Jim Grosbach [Wed, 24 Aug 2011 18:19:42 +0000 (18:19 +0000)]
Add missing explicit writeback operand to tSTMIA_UPD.

rdar://10014745

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

12 years agoMove TargetRegistry and TargetSelect from Target to Support where they belong.
Evan Cheng [Wed, 24 Aug 2011 18:08:43 +0000 (18:08 +0000)]
Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

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

12 years agoFix a crashing bug in SplitBlock when it is called on a block with no
Rafael Espindola [Wed, 24 Aug 2011 18:07:01 +0000 (18:07 +0000)]
Fix a crashing bug in SplitBlock when it is called on a block with no
dominator information even though dominators were previously computed.

Patch by Nick Sumner.

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

12 years agoThumb add SP assembly syntax fix.
Jim Grosbach [Wed, 24 Aug 2011 18:04:27 +0000 (18:04 +0000)]
Thumb add SP assembly syntax fix.

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

12 years agoThumb1 ADD/SUB SP instructions are predicable in Thumb2 mode.
Jim Grosbach [Wed, 24 Aug 2011 17:46:13 +0000 (17:46 +0000)]
Thumb1 ADD/SUB SP instructions are predicable in Thumb2 mode.

Add the predicate operand to the instructions. Update the back end
accordingly where the instructions are used. Restrict the SP operands
to actually only be SP, as otherwise these break assembly parsing for the
normal instruction variants.

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

12 years agoBe stricter in enforcing IT instruction predicate values, so that we don't end up...
Owen Anderson [Wed, 24 Aug 2011 17:21:43 +0000 (17:21 +0000)]
Be stricter in enforcing IT instruction predicate values, so that we don't end up trying to print out an illegal predicate.

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

12 years agoPort over more encoding tests to decoding tests.
Owen Anderson [Wed, 24 Aug 2011 17:08:34 +0000 (17:08 +0000)]
Port over more encoding tests to decoding tests.

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

12 years agoTidy up. Trailing whitespace.
Jim Grosbach [Wed, 24 Aug 2011 16:44:17 +0000 (16:44 +0000)]
Tidy up. Trailing whitespace.

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

12 years agoAdd Uses=[SP] to call instructions. This fixes a miscompilation with a
Richard Osborne [Wed, 24 Aug 2011 13:32:43 +0000 (13:32 +0000)]
Add Uses=[SP] to call instructions. This fixes a miscompilation with a
variable sized alloca.

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

12 years agoBreak 256-bit vector int add/sub/mul into two 128-bit operations to avoid costly...
Craig Topper [Wed, 24 Aug 2011 06:14:18 +0000 (06:14 +0000)]
Break 256-bit vector int add/sub/mul into two 128-bit operations to avoid costly scalarization. Fixes PR10711.

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

12 years agoAdd the sentinal "no handle" value to the ResumeInst.
Bill Wendling [Wed, 24 Aug 2011 00:00:23 +0000 (00:00 +0000)]
Add the sentinal "no handle" value to the ResumeInst.

A value of -1 at a call site tells the personality function that this call isn't
handled by the current function. Since the ResumeInsts are converted to calls to
_Unwind_SjLj_Resume, add a (volatile) store of -1 to its 'call site'.

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

12 years agoDon't replace *all* uses with the new stuff.
Bill Wendling [Tue, 23 Aug 2011 22:55:03 +0000 (22:55 +0000)]
Don't replace *all* uses with the new stuff.

This is not necessarily the first or dominating use of the EH values. The IR
breaks if it's not. So replace the specific value in the instruction with the
new value.

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

12 years agoLook at the end of the entry block for an invoke.
Bill Wendling [Tue, 23 Aug 2011 22:20:16 +0000 (22:20 +0000)]
Look at the end of the entry block for an invoke.

The invoke could be at the end of the entry block. If it's the only one, then we
won't process all of the landingpad instructions correctly. This code is
currently ugly, but should be made much nicer once the new EH switch is thrown.

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

12 years agoFix a nasty bug where a v4i64 was being wrong emitted with 32-bit
Bruno Cardoso Lopes [Tue, 23 Aug 2011 22:06:37 +0000 (22:06 +0000)]
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!

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

12 years agoA landingpad instruction is neither folded nor dead.
Bill Wendling [Tue, 23 Aug 2011 21:33:05 +0000 (21:33 +0000)]
A landingpad instruction is neither folded nor dead.

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

12 years agoMove ARM frame-unwinding EHABI handling a touch earlier.
Jim Grosbach [Tue, 23 Aug 2011 21:32:34 +0000 (21:32 +0000)]
Move ARM frame-unwinding EHABI handling a touch earlier.

It should go before AsmPrinter MC pseudo expansion since it's based on
MachineInstr, not MCInst. Otherwise any frame related pseudo instructions
may be missed.

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

12 years ago[SU]XT[BH] are only available on ARMv6 and up.
Jim Grosbach [Tue, 23 Aug 2011 20:53:08 +0000 (20:53 +0000)]
[SU]XT[BH] are only available on ARMv6 and up.

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

12 years agoAdd some useful accessors to c++ api that appear to be missing from the c api
Nate Begeman [Tue, 23 Aug 2011 20:27:46 +0000 (20:27 +0000)]
Add some useful accessors to c++ api that appear to be missing from the c api

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

12 years agoSome refactoring so TargetRegistry.h no longer has to include any files
Evan Cheng [Tue, 23 Aug 2011 20:15:21 +0000 (20:15 +0000)]
Some refactoring so TargetRegistry.h no longer has to include any files
from MC.

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

12 years agoRevert "Address Duncan's CR request:"
Eric Christopher [Tue, 23 Aug 2011 20:11:10 +0000 (20:11 +0000)]
Revert "Address Duncan's CR request:"

This reverts commit 20a05be15ea5271ab6185b83200fa88263362400. (svn rev 138340)

Conflicts:

test/Transforms/InstCombine/bitcast.ll

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

12 years agoThumb parsing and encoding for WFE, WFI and YIELD.
Jim Grosbach [Tue, 23 Aug 2011 20:02:30 +0000 (20:02 +0000)]
Thumb parsing and encoding for WFE, WFI and YIELD.

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

12 years agoThumb parsing and encoding for UXTB and UXTH.
Jim Grosbach [Tue, 23 Aug 2011 19:59:32 +0000 (19:59 +0000)]
Thumb parsing and encoding for UXTB and UXTH.

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

12 years agoThumb parsing and encoding for TST.
Jim Grosbach [Tue, 23 Aug 2011 19:53:17 +0000 (19:53 +0000)]
Thumb parsing and encoding for TST.

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

12 years agoThumb parsing and encoding for SXTB and SXTH.
Jim Grosbach [Tue, 23 Aug 2011 19:51:42 +0000 (19:51 +0000)]
Thumb parsing and encoding for SXTB and SXTH.

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

12 years agoThumb parsing and encoding for SVC.
Jim Grosbach [Tue, 23 Aug 2011 19:49:10 +0000 (19:49 +0000)]
Thumb parsing and encoding for SVC.

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

12 years agoThumb parsing and encoding for SUB.
Jim Grosbach [Tue, 23 Aug 2011 19:45:45 +0000 (19:45 +0000)]
Thumb parsing and encoding for SUB.

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

12 years agoFix 80 col violations.
Evan Cheng [Tue, 23 Aug 2011 19:17:21 +0000 (19:17 +0000)]
Fix 80 col violations.

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

12 years agoPerformSubCombine to work on integers larger than i128. Fixes a crasher.
Nick Lewycky [Tue, 23 Aug 2011 19:01:24 +0000 (19:01 +0000)]
PerformSubCombine to work on integers larger than i128. Fixes a crasher.

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

12 years agoThumb parsing and encoding for STRH.
Jim Grosbach [Tue, 23 Aug 2011 18:56:20 +0000 (18:56 +0000)]
Thumb parsing and encoding for STRH.

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

12 years agoThread safety: Adding in an option for variadic expr* array of arguments
Caitlin Sadowski [Tue, 23 Aug 2011 18:49:23 +0000 (18:49 +0000)]
Thread safety: Adding in an option for variadic expr* array of arguments

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

12 years agoThumb parsing and encoding for STRB.
Jim Grosbach [Tue, 23 Aug 2011 18:43:06 +0000 (18:43 +0000)]
Thumb parsing and encoding for STRB.

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

12 years agoThumb parsing and encoding for tSTRspi.
Jim Grosbach [Tue, 23 Aug 2011 18:39:41 +0000 (18:39 +0000)]
Thumb parsing and encoding for tSTRspi.

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

12 years agoThumb parsing and encoding for STR.
Jim Grosbach [Tue, 23 Aug 2011 18:33:38 +0000 (18:33 +0000)]
Thumb parsing and encoding for STR.

Not including tSTRspi.

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

12 years agoFix an example in the documentation.
Rafael Espindola [Tue, 23 Aug 2011 18:26:56 +0000 (18:26 +0000)]
Fix an example in the documentation.
Patch by Sanjoy Das!

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

12 years agoThumb parsing and encoding for STM.
Jim Grosbach [Tue, 23 Aug 2011 18:15:37 +0000 (18:15 +0000)]
Thumb parsing and encoding for STM.

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

12 years agoFactor low reg checking into a helper function.
Jim Grosbach [Tue, 23 Aug 2011 18:13:04 +0000 (18:13 +0000)]
Factor low reg checking into a helper function.

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

12 years agoFix a typo in the test from the previous commit.
Nadav Rotem [Tue, 23 Aug 2011 17:56:54 +0000 (17:56 +0000)]
Fix a typo in the test from the previous commit.

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

12 years agoFix decoding of Thumb2 prefetch instructions, which account for all the remaining...
Owen Anderson [Tue, 23 Aug 2011 17:51:38 +0000 (17:51 +0000)]
Fix decoding of Thumb2 prefetch instructions, which account for all the remaining Thumb2 decoding failures found by randomized testing so far.

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

12 years agoAddress Duncan's CR request:
Nadav Rotem [Tue, 23 Aug 2011 17:48:43 +0000 (17:48 +0000)]
Address Duncan's CR request:
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector

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

12 years agoFix Thumb2 decoding of CPS instructions to mirror ARM decoding of the same instructions.
Owen Anderson [Tue, 23 Aug 2011 17:45:18 +0000 (17:45 +0000)]
Fix Thumb2 decoding of CPS instructions to mirror ARM decoding of the same instructions.

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

12 years agoClean up Thumb load/store multiple definitions.
Jim Grosbach [Tue, 23 Aug 2011 17:41:15 +0000 (17:41 +0000)]
Clean up Thumb load/store multiple definitions.

There is no non-writeback store multiple instruction in Thumb1, so
don't define one. As a result load multiple is the only instantiation of
the multiclass, so refactor that away entirely.

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

12 years agoFix two more instances of mis-matched operand names breaking disassembly. Found...
Owen Anderson [Tue, 23 Aug 2011 17:37:32 +0000 (17:37 +0000)]
Fix two more instances of mis-matched operand names breaking disassembly.  Found by randomized testing.

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

12 years agoPort more assemble tests over to disassembly tests.
Owen Anderson [Tue, 23 Aug 2011 17:26:35 +0000 (17:26 +0000)]
Port more assemble tests over to disassembly tests.

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

12 years agoThis patch adds support of le32 pseudo-cpu that stands for generic
Ivan Krasin [Tue, 23 Aug 2011 16:59:00 +0000 (16:59 +0000)]
This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU. Used by PNaCl and Emscripten.

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

12 years agoFix fpimmm->fpimm typo.
Eric Christopher [Tue, 23 Aug 2011 15:42:35 +0000 (15:42 +0000)]
Fix fpimmm->fpimm typo.

Patch by Micah Villmow!

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

12 years agoUpdate config.sub, config.guess and configure.
Ivan Krasin [Tue, 23 Aug 2011 06:43:49 +0000 (06:43 +0000)]
Update config.sub, config.guess and configure.

The motivation to do that:

1. Now, llvm would use the stock config.sub. Before that we had an
uncommitted FreeBSD-related patch. Now, it has been upstreamed and
comes back. It means that it would be easier to update these files in
the next time (less magic knowledge)

2. Fix a typo for pseudo-CPUs: 32e[lb] -> [lb]e32, 64e[lb]->[lb]64.
One of these CPUs is used for PNaCl and it was not really convenient
to have a CPU that starts with a digit.

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

12 years agoAdd support for breaking 256-bit v16i16 and v32i8 VSETCC into two 128-bit ones, avoid...
Craig Topper [Tue, 23 Aug 2011 04:36:33 +0000 (04:36 +0000)]
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.

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

12 years agolib/Support/Windows/Windows.h: Update required IE ver. 0x0600 should be enough for...
NAKAMURA Takumi [Tue, 23 Aug 2011 03:49:11 +0000 (03:49 +0000)]
lib/Support/Windows/Windows.h: Update required IE ver. 0x0600 should be enough for Windows XP.

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

12 years agoIntroduce a pass to insert vzeroupper instructions to avoid AVX to
Bruno Cardoso Lopes [Tue, 23 Aug 2011 01:14:17 +0000 (01:14 +0000)]
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.

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

12 years agoThumb parsing and encoding for SETEND.
Jim Grosbach [Mon, 22 Aug 2011 23:58:02 +0000 (23:58 +0000)]
Thumb parsing and encoding for SETEND.

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

12 years agoThumb parsing and encoding for SBC.
Jim Grosbach [Mon, 22 Aug 2011 23:55:58 +0000 (23:55 +0000)]
Thumb parsing and encoding for SBC.

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

12 years agoThumb parsing and encoding for RSB.
Jim Grosbach [Mon, 22 Aug 2011 23:47:13 +0000 (23:47 +0000)]
Thumb parsing and encoding for RSB.

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