Eli Friedman [Tue, 16 Aug 2011 01:42:56 +0000 (01:42 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137703
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 01:28:22 +0000 (01:28 +0000)]
Revert a bit of r137667; the logic in question can safely handle atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137702
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 01:17:17 +0000 (01:17 +0000)]
Migrate this test from llvm/test/FrontendC++/ptr-to-method-devirt.cpp and
FileCheckize. It is more properly an optimizer test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137700
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 00:41:37 +0000 (00:41 +0000)]
After talking with Bill, it seems like the LandingPad handling here is likely
to be wrong (or at least somewhat suspect). Leave a FIXME for Bill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137694
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Aug 2011 00:20:11 +0000 (00:20 +0000)]
Minor comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137693
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 23:59:28 +0000 (23:59 +0000)]
Update SimplifyCFG for atomic operations.
This commit includes a mention of the landingpad instruction, but it's not
changing the behavior around it. I think the current behavior is correct,
though. Bill, can you double-check that?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137691
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 23:55:52 +0000 (23:55 +0000)]
Add comments and test for atomic load/store and mem2reg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137690
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 23:47:24 +0000 (23:47 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137689
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 23:42:20 +0000 (23:42 +0000)]
Add a test file for Thumb2 NEON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137687
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 23:38:54 +0000 (23:38 +0000)]
Specify a necessary fixed bit for VLD3DUP, and otherwise rearrange the Thumb2 NEON decoding hooks to bring us closer to correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137686
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 15 Aug 2011 23:36:51 +0000 (23:36 +0000)]
While I'm here, remove the "_alt" hacks to a series of INSERT_SUBREG and
also add the AVX versions of the 128-bit patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137685
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 15 Aug 2011 23:36:45 +0000 (23:36 +0000)]
Reorder declarations of vmovmskp* and also put the necessary AVX
predicate and TB encoding fields. This fix the encoding for the
attached testcase. This fixes PR10625.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137684
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 23:36:40 +0000 (23:36 +0000)]
Continue to hoist uses of getCompileUnit() up. The goal is to get rid of uses of getCompileUnit().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137683
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 15 Aug 2011 23:22:56 +0000 (23:22 +0000)]
Avoid evaluating Neon macro arguments more than once by disabling type checks.
It turns out that the use of "__extension__" in these macros was disabling
the expected "incompatible pointer" warnings, so these type checks were not
doing anything anyway. They introduced a serious bug by evaluating some
macro arguments twice, which is a big problem for arguments with side effects.
I'll have to find another way to get the right type checking. Radar
9947657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137680
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 23:19:54 +0000 (23:19 +0000)]
In places where it's using "getFirstNonPHI", skip the landingpad instruction if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137679
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 23:03:29 +0000 (23:03 +0000)]
MCTargetAsmParser target match predicate support.
Allow a target assembly parser to do context sensitive constraint checking
on a potential instruction match. This will be used, for example, to handle
Thumb2 IT block parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137675
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 23:00:00 +0000 (23:00 +0000)]
Add a finalize() hook, that'll let DIBuilder construct compile unit lazily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137673
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 22:53:05 +0000 (22:53 +0000)]
Don't sink the instruction to before a landingpad instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137672
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 22:24:32 +0000 (22:24 +0000)]
This is somewhat déjà-vu, but avoid using getCompileUnit() as much as possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137668
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 22:16:46 +0000 (22:16 +0000)]
Update inter-procedural optimizations for atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137667
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 22:09:40 +0000 (22:09 +0000)]
Update instcombine for atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137664
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 22:04:40 +0000 (22:04 +0000)]
Refactor. Variables are part of compile unit so let CompileUnit create new variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137663
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 21:56:39 +0000 (21:56 +0000)]
Add some comments here because the lack of a check for volatile/atomic here is a bit unusual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137662
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 15 Aug 2011 21:45:54 +0000 (21:45 +0000)]
Fix PR10656. It's only profitable to use 128-bit inserts and extracts
when AVX mode is one. Otherwise is just more work for the type
legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137661
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 21:43:21 +0000 (21:43 +0000)]
There is no need to maintain a set to keep track of variables that use location expressions. In such cases, AT_location attribute's value will be a label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137659
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 21:35:16 +0000 (21:35 +0000)]
Fix warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137658
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 21:29:01 +0000 (21:29 +0000)]
Add some more comprehensive VFP decoding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137657
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 21:24:36 +0000 (21:24 +0000)]
Simplify. Let DbgVariable keep track of variable's DBG_VALUE machine instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137656
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 21:14:31 +0000 (21:14 +0000)]
Duncan pointed out that the LandingPadInst might read memory. (It might also
write to memory.) Marking it as such makes some checks for immobility go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137655
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 21:05:06 +0000 (21:05 +0000)]
Fix llvm::CloneModule to correctly clone globals. Patch per bug report by Simon Moll on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137654
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 21:00:18 +0000 (21:00 +0000)]
Fix predicates methods on Instruction to handle atomic load/store correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137652
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Aug 2011 20:55:03 +0000 (20:55 +0000)]
Fix this test to avoid leaving a temporary file behind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137651
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 20:54:19 +0000 (20:54 +0000)]
Misc analysis passes that need to be aware of atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137650
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 20:53:08 +0000 (20:53 +0000)]
Move MatchResultTy enum into base class definition.
No need for it to be redefined as part of every derived target asm parser
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137649
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 15 Aug 2011 20:52:09 +0000 (20:52 +0000)]
Atomic load/store support in LICM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137648
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:51:32 +0000 (20:51 +0000)]
Enforce the constraint that Rt must be even on LDRD/STRD instructions in ARM mode. Update tests to reflect this fact.
Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137647
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Aug 2011 20:50:36 +0000 (20:50 +0000)]
Add an ipsccp test. Migrated from test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137646
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:15:43 +0000 (20:15 +0000)]
Add a test for Thumb1 LDRSH decoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137645
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:12:03 +0000 (20:12 +0000)]
Add testcase for STRH. Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137644
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:11:11 +0000 (20:11 +0000)]
Remove dead classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137643
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 20:10:51 +0000 (20:10 +0000)]
The "landingpad" instruction will never be "trivially" dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137642
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 20:08:25 +0000 (20:08 +0000)]
Fix incorrect encoding of UMAAL and friends. Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137641
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 19:01:20 +0000 (19:01 +0000)]
Simplify mapping to variable from its abstract variable info.
When a variable is inlined multiple places, abstract variable keeps name, location, type etc.. info and all other concreate instances of the variable directly refers to abstract variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137637
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 19:00:06 +0000 (19:00 +0000)]
Fix decoding LDRSB and LDRSH in Thumb1 mode. Patch by James Molloy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137636
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Aug 2011 18:44:44 +0000 (18:44 +0000)]
Fix problems decoding the to/from-lane NEON memory instructions, and add a comprehensive NEON decoding testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137635
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 18:40:16 +0000 (18:40 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137632
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 18:35:42 +0000 (18:35 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137631
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:23:40 +0000 (18:23 +0000)]
Don't try to sink the landingpad instruction. It's immobile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137629
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:22:49 +0000 (18:22 +0000)]
The landingpad instruction isn't loop-invariant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137628
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:22:00 +0000 (18:22 +0000)]
Mark the SCC as "might unwind" if we run into a 'resume' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137627
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Aug 2011 18:21:07 +0000 (18:21 +0000)]
Skip the insertion iterator past the landingpad instruction if there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137626
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 17:57:41 +0000 (17:57 +0000)]
Refactor. Global variables are part of compile unit so let CompileUnit create new global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137621
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 17:30:25 +0000 (17:30 +0000)]
Tidy up trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137619
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 17:24:54 +0000 (17:24 +0000)]
Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137618
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Aug 2011 16:52:24 +0000 (16:52 +0000)]
Update comment to reflect MC target machine refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137615
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 14 Aug 2011 08:01:36 +0000 (08:01 +0000)]
Add inlining for the new EH scheme.
This builds off of the current scheme, but instead of llvm.eh.exception and
llvm.eh.selector, it uses the landingpad instruction. And instead of
llvm.eh.resume, it uses the resume instruction.
Because of the invariants in the landing pad instruction, a lot of code that's
currently needed to find the appropriate intrinsic calls for an invoke
instruction won't be needed once we go to the new EH scheme. The "FIXME"s tell
us what to remove after we switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137576
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 14 Aug 2011 04:51:49 +0000 (04:51 +0000)]
This transform is not safe. Thanks to Eli for pointing that out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137575
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 14 Aug 2011 03:41:33 +0000 (03:41 +0000)]
Don't attempt to add 'nsw' when intermediate instructions had no such guarantee.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137572
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 14 Aug 2011 01:45:19 +0000 (01:45 +0000)]
Teach instcombine to preserve the nsw bit by doing an after-the-fact analysis
when combining add and sub instructions. Patch by Pranav Bhandarkar!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137570
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Aug 2011 00:34:04 +0000 (00:34 +0000)]
EE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.
With libcxx, it seems <unistd.h> would not be provided. Thanks to Ryuta Suzuki.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137567
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 13 Aug 2011 20:31:45 +0000 (20:31 +0000)]
Fix PR 10635. When generating integer constants, the constant element type may
be illegal, even if the requested vector type is legal. Testcase is one of the
disabled ARM tests in the vector-select patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137562
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 13 Aug 2011 17:06:34 +0000 (17:06 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137556
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 13 Aug 2011 05:14:55 +0000 (05:14 +0000)]
Expand VMOVQQQQ pseudo instructions.
Apparently we never added code to expand these pseudo instructions, and in
over a year, no one has noticed. Our register allocator must be awesome!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137551
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 13 Aug 2011 01:04:44 +0000 (01:04 +0000)]
Remove the last improper use of getGlobalContext() from LLVM.
This caused a race condition where a thread calls ~LLVMContextImpl which calls
Module::dropAllReferences which calls begin() on an empty ilist that would
create the sentinel, which racily accesses the global context.
This can not be fixed by locking inside createSentinel because the lock would
need to be shared with all users of the global context, including those that
reside outside LLVM's own code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137546
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Aug 2011 23:37:55 +0000 (23:37 +0000)]
Fix the getelementptr description so it is extremely clear that array indices passed to getelementptr are signed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137538
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Aug 2011 22:50:01 +0000 (22:50 +0000)]
Move "atomic" and "volatile" designations on instructions after the opcode
of the instruction.
Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137527
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 12 Aug 2011 22:20:41 +0000 (22:20 +0000)]
ARM STR_POST_IMM offset encoding fix in load/store optimizer.
Tidy up the code a bit and push the definition of the value next to the uses
to try to minimize this sort of issue from arising again while I'm at it.
rdar://
9945172
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137525
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 12 Aug 2011 21:54:42 +0000 (21:54 +0000)]
Fix comment!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137521
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Aug 2011 21:50:54 +0000 (21:50 +0000)]
Some reorganization of atomic docs. Added explicit section for NonAtomic. Added example for illegal non-atomic operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137520
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 12 Aug 2011 21:48:26 +0000 (21:48 +0000)]
The VPERM2F128 is a AVX instruction which permutes between two 256-bit
vectors. It operates on 128-bit elements instead of regular scalar
types. Recognize shuffles that are suitable for VPERM2F128 and teach
the x86 legalizer how to handle them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137519
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 12 Aug 2011 21:48:22 +0000 (21:48 +0000)]
Move code around and add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137518
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Aug 2011 21:30:06 +0000 (21:30 +0000)]
Define unaligned load and store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137515
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 12 Aug 2011 21:02:34 +0000 (21:02 +0000)]
ARM expansion of pre-indexed store pseudos should maintain memoperands.
Partial fix for rdar://
9945172.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137513
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 12 Aug 2011 20:52:25 +0000 (20:52 +0000)]
Add checks for the landingpad instruction's clause values to make sure that
they're the correct type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137511
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 12 Aug 2011 20:36:11 +0000 (20:36 +0000)]
Fix some remaining issues with decoding ARM-mode memory instructions, and add another batch of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137502
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 12 Aug 2011 20:24:12 +0000 (20:24 +0000)]
Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.
This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 12 Aug 2011 20:02:50 +0000 (20:02 +0000)]
Fix decoding of ARM-mode STRH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137499
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 19:49:16 +0000 (19:49 +0000)]
apparently variable naming conventions never got added, document the
prevailing convention. Thanks to Dave Zarzycki for the patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137497
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 19:48:19 +0000 (19:48 +0000)]
minor typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137496
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 12 Aug 2011 19:42:45 +0000 (19:42 +0000)]
Port over the basic ARM encodings test file to a decoding test file. Greatly increases our test coverage of basic ARM-mode instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137495
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 12 Aug 2011 19:41:29 +0000 (19:41 +0000)]
Specify fixed bit in the LDRBT encoding, which allows us to distinguish it from certain USAT16 encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137494
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 12 Aug 2011 18:18:02 +0000 (18:18 +0000)]
Constify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137489
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 18:12:40 +0000 (18:12 +0000)]
fix one reference that slipped through, thanks Eli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137488
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 12 Aug 2011 18:12:39 +0000 (18:12 +0000)]
Fix decoding of pre-indexed stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137487
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Aug 2011 18:12:06 +0000 (18:12 +0000)]
Test case for 137484
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137486
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 12 Aug 2011 18:10:19 +0000 (18:10 +0000)]
Use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137485
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Aug 2011 18:09:59 +0000 (18:09 +0000)]
When constant double 0.0 is lowered, make sure 0 is copied directly from an
integer register to a floating point register. It is not valid to interpret
the value of a floating pointer register as part of a double precision
floating point value after a single precision floating point computational
or move instruction stores its result to the register.
- In the test case, the following code is generated before this patch is
applied:
mtc1 $zero, $f2 ; unformatted copy to $f2
mov.s $f0, $f2 ; $f0 is in single format
sdc1 $f12, 0($sp)
mov.s $f1, $f2 ; $f1 is in single format
c.eq.d $f12, $f0 ; $f0 cannot be interpreted as double
- The following code is generated after this patch is applied:
mtc1 $zero, $f0 ; unformatted copy to $f0
mtc1 $zero, $f1 ; unformatted copy to $f1
c.eq.d $f12, $f0 ; $f0 can be interpreted as double
Bhanu Chetlapalli and Chris Dearman at MIPS technologies reported this bug and
provided the test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137484
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 18:08:19 +0000 (18:08 +0000)]
add ifdef's to let people easily remove these dead api for testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137483
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 18:07:26 +0000 (18:07 +0000)]
switch to the new struct api.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137482
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 18:07:07 +0000 (18:07 +0000)]
switch to the new struct apis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137481
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 18:06:37 +0000 (18:06 +0000)]
switch to use the new api for structtypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 18:03:30 +0000 (18:03 +0000)]
forward to the correct constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137479
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 12 Aug 2011 18:01:34 +0000 (18:01 +0000)]
Provide fast path as Jakob suggested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137478
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 12 Aug 2011 17:58:32 +0000 (17:58 +0000)]
Separate decoding for STREXD and LDREXD to make each work better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137476
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 12 Aug 2011 17:43:31 +0000 (17:43 +0000)]
Tidy up formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 17:43:05 +0000 (17:43 +0000)]
add two missing function impls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137470
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 17:31:02 +0000 (17:31 +0000)]
add new accessors to reflect new terminology in struct types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137468
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Aug 2011 17:25:45 +0000 (17:25 +0000)]
Fix bugpoint fallout from the new type system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137467
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 12 Aug 2011 17:15:04 +0000 (17:15 +0000)]
Revert r137310 because it does not optimize any code on ToT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137466
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 12 Aug 2011 17:01:02 +0000 (17:01 +0000)]
Tidy up formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137464
91177308-0d34-0410-b5e6-
96231b3b80d8