oota-llvm.git
12 years agoUpdate the load-store optimizer for changes to the operands on LDR_PRE_IMM and LDRB_P...
Owen Anderson [Mon, 29 Aug 2011 17:59:41 +0000 (17:59 +0000)]
Update the load-store optimizer for changes to the operands on LDR_PRE_IMM and LDRB_PRE_IMM in r138653.

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

12 years agoFix a test that wasn't testing the right thing.
Matt Beaumont-Gay [Mon, 29 Aug 2011 17:54:20 +0000 (17:54 +0000)]
Fix a test that wasn't testing the right thing.

The APFloat "Zero" test was actually calling the
APFloat(const fltSemantics &, integerPart) constructor, and EXPECT_EQ was
treating 0 and -0 as equal.

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

12 years agoMove non-intruction patterns to a more appropriate place!
Bruno Cardoso Lopes [Mon, 29 Aug 2011 17:51:24 +0000 (17:51 +0000)]
Move non-intruction patterns to a more appropriate place!

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

12 years agoAdd support for parsing #-0 on non-memory-operand immediate values, and add a testcas...
Owen Anderson [Mon, 29 Aug 2011 17:17:09 +0000 (17:17 +0000)]
Add support for parsing #-0 on non-memory-operand immediate values, and add a testcase that necessitates it.

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

12 years agoReapply r138695. Fix PassManager stack depths.
Andrew Trick [Mon, 29 Aug 2011 17:07:00 +0000 (17:07 +0000)]
Reapply r138695. Fix PassManager stack depths.

Patch by Xiaoyi Guo!

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

12 years agoAdd AMDIL as valid target triple to LLVM.
Tobias Grosser [Mon, 29 Aug 2011 15:44:55 +0000 (15:44 +0000)]
Add AMDIL as valid target triple to LLVM.

Submitted by: Villmow, Micah <Micah.Villmow@amd.com>

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

12 years agoRemove premature previous commit.
Nicolas Geoffray [Sun, 28 Aug 2011 14:52:51 +0000 (14:52 +0000)]
Remove premature previous commit.

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

12 years agoFix PR5329: pay attention to constructor/destructor priority
Duncan Sands [Sun, 28 Aug 2011 13:17:22 +0000 (13:17 +0000)]
Fix PR5329: pay attention to constructor/destructor priority
when outputting them.  With this, the entire LLVM testsuite
passes when built with dragonegg.

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

12 years agoEncoding of instructions referencing segments has changed. Do what X86MCCodeEmitter...
Nicolas Geoffray [Sun, 28 Aug 2011 13:07:57 +0000 (13:07 +0000)]
Encoding of instructions referencing segments has changed. Do what X86MCCodeEmitter does.

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

12 years agoBitcasts are transitive. Bitcast-Bitcast-X becomes Bitcast-X.
Nadav Rotem [Sun, 28 Aug 2011 11:51:08 +0000 (11:51 +0000)]
Bitcasts are transitive. Bitcast-Bitcast-X becomes Bitcast-X.

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

12 years agoFix integer overflow bug in raw_ostream::write. This showed up as a
Nick Lewycky [Sun, 28 Aug 2011 03:30:02 +0000 (03:30 +0000)]
Fix integer overflow bug in raw_ostream::write. This showed up as a
non-deterministic crash in the test suite. Fixes PR10055!

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

12 years agoThe 'expected' argument to EXPECT_EQ is actually the first one;
John McCall [Sat, 27 Aug 2011 19:23:22 +0000 (19:23 +0000)]
The 'expected' argument to EXPECT_EQ is actually the first one;
flip these tests around.

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

12 years agoSilence GCC warnings and make an array const.
Benjamin Kramer [Sat, 27 Aug 2011 17:36:14 +0000 (17:36 +0000)]
Silence GCC warnings and make an array const.

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

12 years agoReport failure if there are less bytes than requested in a MemoryObject.
Benjamin Kramer [Sat, 27 Aug 2011 07:45:46 +0000 (07:45 +0000)]
Report failure if there are less bytes than requested in a MemoryObject.

Before we just left the remaining bytes uninitialized. This is another step in making llvm valgrind-clean again.

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

12 years agoReverted r138652, valgrind doesn't understand obj:*/tblgen.
Andrew Trick [Sat, 27 Aug 2011 06:17:30 +0000 (06:17 +0000)]
Reverted r138652, valgrind doesn't understand obj:*/tblgen.

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

12 years agoAuto upgrade the old EH scheme to use the new one. This is on a trial basis. If
Bill Wendling [Sat, 27 Aug 2011 06:11:03 +0000 (06:11 +0000)]
Auto upgrade the old EH scheme to use the new one. This is on a trial basis. If
things to disasterously over night, this can be reverted.

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

12 years agoReverting r138695 to see if it fixes clang self host.
Andrew Trick [Sat, 27 Aug 2011 06:10:16 +0000 (06:10 +0000)]
Reverting r138695 to see if it fixes clang self host.

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

12 years agoOnly delete instructions once.
Bill Wendling [Sat, 27 Aug 2011 06:10:02 +0000 (06:10 +0000)]
Only delete instructions once.

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

12 years agoUpdate to new EH scheme.
Bill Wendling [Sat, 27 Aug 2011 04:53:41 +0000 (04:53 +0000)]
Update to new EH scheme.

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

12 years agoCannot have an llvm.eh.exception call in a non-landing pad block.
Bill Wendling [Sat, 27 Aug 2011 04:53:28 +0000 (04:53 +0000)]
Cannot have an llvm.eh.exception call in a non-landing pad block.

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

12 years agoThese splits should be done whether they are critical edges or not.
Bill Wendling [Sat, 27 Aug 2011 04:40:37 +0000 (04:40 +0000)]
These splits should be done whether they are critical edges or not.

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

12 years agoFix PassManager stack depths.
Andrew Trick [Sat, 27 Aug 2011 02:11:03 +0000 (02:11 +0000)]
Fix PassManager stack depths.

Patch by Xiaoyi Guo!

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

12 years agoExcluding ARM JIT tests until someone can fix this compilation path.
Andrew Trick [Fri, 26 Aug 2011 23:39:30 +0000 (23:39 +0000)]
Excluding ARM JIT tests until someone can fix this compilation path.

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

12 years agoImprove encoding support for BLX with immediat eoperands, and fix a BLX decoding...
Owen Anderson [Fri, 26 Aug 2011 23:32:08 +0000 (23:32 +0000)]
Improve encoding support for BLX with immediat eoperands, and fix a BLX decoding bug this uncovered.

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

12 years agoCorrect encoding of BL with immediate offset.
Owen Anderson [Fri, 26 Aug 2011 22:54:51 +0000 (22:54 +0000)]
Correct encoding of BL with immediate offset.

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

12 years agoARM assembly parsing tweak for pldw.
Jim Grosbach [Fri, 26 Aug 2011 22:21:51 +0000 (22:21 +0000)]
ARM assembly parsing tweak for pldw.

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

12 years agoSpelling fail.
Owen Anderson [Fri, 26 Aug 2011 21:47:57 +0000 (21:47 +0000)]
Spelling fail.

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

12 years agoThumb2 assembler parsing and encoding of IT instruction.
Jim Grosbach [Fri, 26 Aug 2011 21:43:41 +0000 (21:43 +0000)]
Thumb2 assembler parsing and encoding of IT instruction.

This handles only the handling of the IT instruction itself, not the
processing and validation of the instructions in the IT block. That's next,
and will include encoding tests for IT itself.

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

12 years agoUpdate the dominator tree with the correct dominator for the new 'unwind' block.
Bill Wendling [Fri, 26 Aug 2011 21:36:12 +0000 (21:36 +0000)]
Update the dominator tree with the correct dominator for the new 'unwind' block.

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

12 years agoAdd support for generating CMPXCHG16B on x86-64 for the cmpxchg IR instruction.
Eli Friedman [Fri, 26 Aug 2011 21:21:21 +0000 (21:21 +0000)]
Add support for generating CMPXCHG16B on x86-64 for the cmpxchg IR instruction.

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

12 years agoSplit the landing pad block only if it's a critical edge. Also intelligently
Bill Wendling [Fri, 26 Aug 2011 21:18:55 +0000 (21:18 +0000)]
Split the landing pad block only if it's a critical edge. Also intelligently
split it in the other place where we're splitting critical edges.

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

12 years agoFix ARM codegen breakage caused by r138653.
Owen Anderson [Fri, 26 Aug 2011 21:12:37 +0000 (21:12 +0000)]
Fix ARM codegen breakage caused by r138653.

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

12 years agoRevert r138606 until LowerInvoke has been converted to the new EH scheme.
Bill Wendling [Fri, 26 Aug 2011 21:11:23 +0000 (21:11 +0000)]
Revert r138606 until LowerInvoke has been converted to the new EH scheme.

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

12 years agoWhitespace and 80-col.
Eric Christopher [Fri, 26 Aug 2011 21:02:40 +0000 (21:02 +0000)]
Whitespace and 80-col.

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

12 years agoinvalid-LDR_PRE-arm.txt was already passing, but for the wrong reasons. We were...
Owen Anderson [Fri, 26 Aug 2011 20:43:14 +0000 (20:43 +0000)]
invalid-LDR_PRE-arm.txt was already passing, but for the wrong reasons.  We were failing to specify enough fixed bits of LDR_PRE/LDRB_PRE, resulting in decoding conflicts.  Separate them into immediate vs. register versions, allowing us to specify the necessary fixed bits.  This in turn results in the test being decoded properly, and being rejected as UNPREDICTABLE rather than a hard failure.

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

12 years agovalgrind: Always suppress tblgen leaks.
Andrew Trick [Fri, 26 Aug 2011 20:41:20 +0000 (20:41 +0000)]
valgrind: Always suppress tblgen leaks.

I'll clean up the rest of the XFAIL: vg_leak lines if this works.

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

12 years agoDon't sink landingpad instructions during ind-var simplification.
Bill Wendling [Fri, 26 Aug 2011 20:40:15 +0000 (20:40 +0000)]
Don't sink landingpad instructions during ind-var simplification.

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

12 years agoUse %% for literals in RUN lines.
Andrew Trick [Fri, 26 Aug 2011 20:09:48 +0000 (20:09 +0000)]
Use %% for literals in RUN lines.

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

12 years agoUpdate for feedback from Jim.
Owen Anderson [Fri, 26 Aug 2011 19:39:26 +0000 (19:39 +0000)]
Update for feedback from Jim.

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

12 years agolit: Add %T as a replacement for the output directory
Douglas Gregor [Fri, 26 Aug 2011 19:05:18 +0000 (19:05 +0000)]
lit: Add %T as a replacement for the output directory

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

12 years agoARMDisassembler: Always return a size, even when disassembling fails.
Benjamin Kramer [Fri, 26 Aug 2011 18:21:36 +0000 (18:21 +0000)]
ARMDisassembler: Always return a size, even when disassembling fails.

This should fix PR10772.

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

12 years agoSupport an extension of ARM asm syntax to allow immediate operands to ADR instruction...
Owen Anderson [Fri, 26 Aug 2011 18:09:22 +0000 (18:09 +0000)]
Support an extension of ARM asm syntax to allow immediate operands to ADR instructions.  This is helpful for disassembler testing, and indeed exposed a disassembler bug that is also fixed here.

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

12 years agoWe don't care if TableGen leaks memory.
Benjamin Kramer [Fri, 26 Aug 2011 17:00:30 +0000 (17:00 +0000)]
We don't care if TableGen leaks memory.

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

12 years agoDon't insert branch hint lables that are never used.
Kalle Raiskila [Fri, 26 Aug 2011 10:14:56 +0000 (10:14 +0000)]
Don't insert branch hint lables that are never used.

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

12 years agoAdd a testcase for r138625.
Owen Anderson [Fri, 26 Aug 2011 06:45:08 +0000 (06:45 +0000)]
Add a testcase for r138625.

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

12 years agoFix PR10755 by checking for invalid predicate codes from UNPREDICTABLE t2IT instructi...
Owen Anderson [Fri, 26 Aug 2011 06:19:51 +0000 (06:19 +0000)]
Fix PR10755 by checking for invalid predicate codes from UNPREDICTABLE t2IT instructions when decoding their successors.
This is the last disassembly crash detected by exhaustive Thumb2 instruction space.  Major thanks to Chandler Carruth for making this kind of exhaustive testing possible.

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

12 years agoFix disassembling of VCVTSD2SI
Craig Topper [Fri, 26 Aug 2011 04:49:29 +0000 (04:49 +0000)]
Fix disassembling of VCVTSD2SI

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

12 years agoLoopInfo::updateUnloop fix, and verify Block->Loop maps.
Andrew Trick [Fri, 26 Aug 2011 03:06:34 +0000 (03:06 +0000)]
LoopInfo::updateUnloop fix, and verify Block->Loop maps.

Fixes an oversight, and adds verification to catch it in the unloop.ll tests.

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

12 years agoAtomic load/store on ARM/Thumb.
Eli Friedman [Fri, 26 Aug 2011 02:59:24 +0000 (02:59 +0000)]
Atomic load/store on ARM/Thumb.

I don't really like the patterns, but I'm having trouble coming up with a
better way to handle them.

I plan on making other targets use the same legalization
ARM-without-memory-barriers is using... it's not especially efficient, but
if anyone cares, it's not that hard to fix for a given target if there's
some better lowering.

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

12 years agoAddress review comments.
Benjamin Kramer [Fri, 26 Aug 2011 02:25:55 +0000 (02:25 +0000)]
Address review comments.

- Reword comments.
- Allow undefined behavior interfering with undefined behavior.
- Add address space checks.

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

12 years agoSimplifyCFG: If we have a PHI node that can evaluate to NULL and do a load or store...
Benjamin Kramer [Fri, 26 Aug 2011 01:22:29 +0000 (01:22 +0000)]
SimplifyCFG: If we have a PHI node that can evaluate to NULL and do a load or store to the address returned by the PHI node then we can consider this incoming value as dead and remove the edge pointing there, unless there are instructions that can affect control flow executed in between.

In theory this could be extended to other instructions, eg. division by zero, but it's likely that it will "miscompile" some code because people depend on div by zero not trapping. NULL pointer dereference usually leads to a crash so we should be on the safe side.

This shrinks the size of a Release clang by 16k on x86_64.

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

12 years agoUpdate to the new EH scheme.
Bill Wendling [Thu, 25 Aug 2011 23:48:37 +0000 (23:48 +0000)]
Update to the new EH scheme.

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

12 years agoLook at only the terminators of the basic block. Also, if we're using the new EH
Bill Wendling [Thu, 25 Aug 2011 23:48:11 +0000 (23:48 +0000)]
Look at only the terminators of the basic block. Also, if we're using the new EH
scheme, return 'true' so that it doesn't try to run the old EH scheme's fixup on
the new code.

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

12 years agoInitial check in that will auto-upgrade the old EH scheme to the new EH scheme.
Bill Wendling [Thu, 25 Aug 2011 23:22:40 +0000 (23:22 +0000)]
Initial check in that will auto-upgrade the old EH scheme to the new EH scheme.

This upgrade suffers from the problems of the old EH scheme - i.e., that the
calls to llvm.eh.exception() and llvm.eh.selector() can wander off and get
lost. It makes a valiant effort to reclaim these little lost lambs.

This is a first draft, so it hasn't yet been hooked up to the parser.

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

12 years agoDo the same as r138461. Mark VZEROALL as clobbering all YMM registers
Bruno Cardoso Lopes [Thu, 25 Aug 2011 22:23:58 +0000 (22:23 +0000)]
Do the same as r138461. Mark VZEROALL as clobbering all YMM registers

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

12 years agoRemove stray fullstop.
Nick Lewycky [Thu, 25 Aug 2011 21:46:20 +0000 (21:46 +0000)]
Remove stray fullstop.

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

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