Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:53 +0000 (01:26 +0000)]
Invert the subvector insertion to be more likely to be taken as a COPY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136324
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:50 +0000 (01:26 +0000)]
Add patterns to generate copies for extract_subvector instead of
using vextractf128. This will reduce the number of issued instruction
for several avx codes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136323
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:46 +0000 (01:26 +0000)]
movd/movq write zeros in the high 128-bit part of the vector. Use
them to match 256-bit scalar_to_vector+zext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136322
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:43 +0000 (01:26 +0000)]
Add a few patterns to match allzeros without having to use the fp unit.
Take advantage that the 128-bit vpxor zeros the higher part and use it.
This also fixes PR10491
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136321
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:39 +0000 (01:26 +0000)]
Add SINT_TO_FP and FP_TO_SINT support for v8i32 types. Also move
a convert pattern close to the instruction definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136320
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Jul 2011 01:20:19 +0000 (01:20 +0000)]
Fix a use after free. An instruction can't be both an intrinsic call and a fence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136319
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jul 2011 00:38:23 +0000 (00:38 +0000)]
Initial stab at getting inlining working with the EH rewrite.
This takes the new 'resume' instruction and turns it into a direct jump to the
caller's landing pad code. The caller's landingpad instruction is merged with
the landingpad instructions of the callee. This is a bit rough and makes some
assumptions in how the code works. But it passes a simple test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136313
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 28 Jul 2011 00:37:03 +0000 (00:37 +0000)]
ARM parsing and encoding tests.
UXTAB, UXTAB16, UXTAH, UXTB, UXTB16, and UXTH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136312
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 28 Jul 2011 00:29:20 +0000 (00:29 +0000)]
Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136310
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Jul 2011 23:36:57 +0000 (23:36 +0000)]
Refactor and improve the encodings/decodings for addrmode3 loads, and make the writeback operand always the first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136295
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 Jul 2011 23:22:03 +0000 (23:22 +0000)]
Emit an error is asm parser parsed X86_64 only registers, e.g. %rax, %sil.
This can happen in cases where TableGen generated asm matcher cannot check
whether a register operand is in the right register class. e.g. mem operands.
rdar://
8204588
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136292
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 23:10:05 +0000 (23:10 +0000)]
ARM assembly parsing and encoding for USUB16 and USUB8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136289
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 23:07:00 +0000 (23:07 +0000)]
ARM assembly parsing and encoding for USAX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136288
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 27 Jul 2011 23:01:50 +0000 (23:01 +0000)]
Fix llvm-mc handing of x86 instructions that take 8-bit unsigned immediates.
llvm-mc gives an "invalid operand" error for instructions that take an unsigned
immediate which have the high bit set such as:
pblendw $0xc5, %xmm2, %xmm1
llvm-mc treats all x86 immediates as signed values and range checks them.
A small number of x86 instructions use the imm8 field as a set of bits.
This change only changes those instructions and where the high bit is not
ignored. The others remain unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136287
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:35:06 +0000 (22:35 +0000)]
Clean up tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136286
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:34:17 +0000 (22:34 +0000)]
ARM assembly parsing and encoding support for USAT and USAT16.
Use range checked immediate operands for instructions. Add tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136285
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:23:02 +0000 (22:23 +0000)]
ARM assembly parsing and encoding tests for USAD8 and USADA8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136284
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 Jul 2011 22:21:52 +0000 (22:21 +0000)]
Code generation for 'fence' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136283
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:13:08 +0000 (22:13 +0000)]
ARM assembly parsing and encoding tests for UQSUB16 and UQSUB8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136282
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:11:41 +0000 (22:11 +0000)]
Fix comment copy/paste-o.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136281
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:09:30 +0000 (22:09 +0000)]
ARM assembly parsing and encoding tests for UQASX and UQSAX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136280
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:08:14 +0000 (22:08 +0000)]
ARM assembly parsing and encoding tests for UQADD16 and UQADD8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136279
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 27 Jul 2011 22:05:51 +0000 (22:05 +0000)]
Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136278
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 22:01:42 +0000 (22:01 +0000)]
ARM assembly parsing and encoding for UMULL.
Fix parsing of the 's' suffix for the mnemonic. Add tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136277
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Jul 2011 22:00:01 +0000 (22:00 +0000)]
Remove outdated FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136275
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 21:58:11 +0000 (21:58 +0000)]
ARM assembly parsing and encoding for UMLAL.
Fix parsing of the 's' suffix for the mnemonic. Add tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136274
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 21:53:42 +0000 (21:53 +0000)]
ARM assembly parsing and encoding tests for UMAAL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136272
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Jul 2011 21:44:28 +0000 (21:44 +0000)]
Refuse to inline two functions which use different personality functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136269
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 21:21:59 +0000 (21:21 +0000)]
ARM assembly parsing and encoding tests for UHSUB16 and UHSUB8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136267
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 21:20:45 +0000 (21:20 +0000)]
ARM assembly parsing and encoding tests for UHADD16, UHADD8 and UHASX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136266
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 21:09:25 +0000 (21:09 +0000)]
ARM parsing and encoding of SBFX and UBFX.
Encode the width operand as it encodes in the instruction, which simplifies
the disassembler and the encoder, by using the imm1_32 operand def. Add a
diagnostic for the context-sensitive constraint that the width must be in
the range [1,32-lsb].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136264
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Jul 2011 21:00:28 +0000 (21:00 +0000)]
Keep enums stable. Append EH stuff to the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136263
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 20:43:44 +0000 (20:43 +0000)]
ARM assembly parsing and encoding tests for UADD16, UADD8 and UASX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136261
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 20:38:58 +0000 (20:38 +0000)]
ARM assembly parsing and encoding tests for TST instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136260
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 20:37:36 +0000 (20:37 +0000)]
ARM assembly parsing and encoding tests for TEQ instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136259
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Jul 2011 20:29:48 +0000 (20:29 +0000)]
Refactor the STRT and STRBT instructions to distinguish between the register-addend and immediate-addend versions. Temporarily XFAIL the asm parsing tests for these instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136255
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Jul 2011 20:18:04 +0000 (20:18 +0000)]
Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 20:15:40 +0000 (20:15 +0000)]
ARM assembly parsing and encoding for extend instructions.
Assembly parser handling for extend instruction rotate operands. Add tests
for the sign extend instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136252
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 27 Jul 2011 19:47:34 +0000 (19:47 +0000)]
Teach the ConstantMerge pass about alignment. Fixes PR10514!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136250
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 Jul 2011 19:43:50 +0000 (19:43 +0000)]
X86ISD::MEMBARRIER does not require SSE2; it doesn't actually generate any code, and all x86 processors will honor the required semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136249
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 Jul 2011 18:59:19 +0000 (18:59 +0000)]
The numbering of LLVMOpcode is supposed to be stable; revert my earlier change, and append Fence onto the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136245
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 27 Jul 2011 18:57:40 +0000 (18:57 +0000)]
Add test cases for BlockFrequency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136244
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 27 Jul 2011 18:40:45 +0000 (18:40 +0000)]
Add a generic 'capacity_in_bytes' function to allow inspection of memory usage of various data structures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136233
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 18:19:32 +0000 (18:19 +0000)]
ARM assembly parsing aliases for extend instructions w/o rotate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136229
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Jul 2011 18:14:50 +0000 (18:14 +0000)]
Update document listing DIVariable elements to reflect recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136228
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 17:48:13 +0000 (17:48 +0000)]
ARM cleanup of remaining extend instructions.
Refactor the rest of the extend instructions to not artificially distinguish
between a rotate of zero and a rotate of any other value. Replace the by-zero
versions with Pat<>'s for ISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136226
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Jul 2011 16:47:19 +0000 (16:47 +0000)]
ARM extend instructions simplification.
Refactor the SXTB, SXTH, SXTB16, UXTB, UXTH, and UXTB16 instructions to not
have an 'r' and an 'r_rot' version, but just a single version with a rotate
that can be zero. Use plain Pat<>'s for the ISel of the non-rotated version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136225
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 27 Jul 2011 16:00:40 +0000 (16:00 +0000)]
Optimize 96-bit division a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136222
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 27 Jul 2011 15:51:51 +0000 (15:51 +0000)]
Move static methods to the anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136221
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 27 Jul 2011 15:42:09 +0000 (15:42 +0000)]
Edge to itself is backedge as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136219
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Wed, 27 Jul 2011 15:20:06 +0000 (15:20 +0000)]
Trim includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136218
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Wed, 27 Jul 2011 10:19:32 +0000 (10:19 +0000)]
Update CMake build for new gtest file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136215
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 27 Jul 2011 09:26:13 +0000 (09:26 +0000)]
Remove some code that is no longer needed now that googletest knows how
to print STL containers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136213
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 27 Jul 2011 09:25:14 +0000 (09:25 +0000)]
Merge gtest-1.6.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136212
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Wed, 27 Jul 2011 06:22:51 +0000 (06:22 +0000)]
Explicitly cast narrowing conversions inside {}s that will become errors in
C++0x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136211
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Jul 2011 01:10:27 +0000 (01:10 +0000)]
Revert r136156, which broke several buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136206
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 Jul 2011 01:08:30 +0000 (01:08 +0000)]
Misc mid-level changes for new 'fence' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136205
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 Jul 2011 01:02:25 +0000 (01:02 +0000)]
Minor simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136202
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 27 Jul 2011 00:56:37 +0000 (00:56 +0000)]
Move some code around to open opportunity for more shuffle matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136201
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 27 Jul 2011 00:56:34 +0000 (00:56 +0000)]
The vpermilps and vpermilpd have different behaviour regarding the
usage of the shuffle bitmask. Both work in 128-bit lanes without
crossing, but in the former the mask of the high part is the same
used by the low part while in the later both lanes have independent
masks. Handle this properly and and add support for vpermilpd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136200
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 27 Jul 2011 00:56:27 +0000 (00:56 +0000)]
Remove more dead code!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136199
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 Jul 2011 00:46:46 +0000 (00:46 +0000)]
Fix AliasSetTracker so that it doesn't make any assumptions about instructions it doesn't know about (like the atomic instructions I'm adding).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136198
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 Jul 2011 00:38:12 +0000 (00:38 +0000)]
Support .code32 and .code64 in X86 assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136197
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Jul 2011 00:34:13 +0000 (00:34 +0000)]
It is quiet possible that inlined function body is split into multiple chunks of consequtive instructions. But, there is not any way to describe this in .debug_inline accelerator table used by gdb. However, describe non contiguous ranges of inlined function body appropriately using AT_range of DW_TAG_inlined_subroutine debug info entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136196
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 27 Jul 2011 00:07:56 +0000 (00:07 +0000)]
Remove these two directories. The tests can be ported to dragonegg if
they're still wanted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136193
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 26 Jul 2011 23:49:39 +0000 (23:49 +0000)]
Remove test/FrontendC, almost all of the tests have been migrated
to clang now, the rest are in process (6) or have been deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136191
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 26 Jul 2011 23:41:46 +0000 (23:41 +0000)]
Add support for multi-way live range splitting.
When splitting global live ranges, it is now possible to split for
multiple destination intervals at once. Previously, we only had the main
and stack intervals.
Each edge bundle is assigned to a split candidate, and splitAroundRegion
will insert copies between the candidate intervals and the stack
interval as needed.
The multi-way splitting is used to split around compact regions when
enabled with -compact-regions. The best candidate register still gets
all the bundles it wants, but everything outside the main interval is
first split around compact regions before we create single-block
intervals.
Compact region splitting still causes some regressions, so it is not
enabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136186
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 26 Jul 2011 23:12:08 +0000 (23:12 +0000)]
Print out the MBB live-in registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136178
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 26 Jul 2011 23:00:24 +0000 (23:00 +0000)]
Eliminate copies of undefined values during coalescing.
These copies would coalesce easily, but the resulting value would be
defined by a deleted instruction. Now we also remove the undefined value
number from the destination register.
This fixes PR10503.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136174
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 26 Jul 2011 22:45:39 +0000 (22:45 +0000)]
Update test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136170
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 26 Jul 2011 22:42:13 +0000 (22:42 +0000)]
Add a neat little two's complement hack for x86.
On x86 we can't encode an immediate LHS of a sub directly. If the RHS comes from a XOR with a constant we can
fold the negation into the xor and add one to the immediate of the sub. Then we can turn the sub into an add,
which can be commuted and encoded efficiently.
This code is generated for __builtin_clz and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136167
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 26 Jul 2011 22:03:40 +0000 (22:03 +0000)]
Recognize unpckh* masks and match 256-bit versions. The new versions are
different from the previous 128-bit because they work in lanes.
Update a few comments and add testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136157
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Jul 2011 22:00:59 +0000 (22:00 +0000)]
Delete unnecessarily cautious LastCALLSEQ code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136156
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 21:44:37 +0000 (21:44 +0000)]
ARM rot_imm printing adjustment.
Allow the rot_imm operand to be optional. This sets the stage for refactoring
away the "rr" versions from the multiclasses and replacing them with Pat<>s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136154
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 21:28:43 +0000 (21:28 +0000)]
ARM cleanup of rot_imm encoding.
Start of cleaning this up a bit. First step is to remove the encoder hook by
storing the operand as the bits it'll actually encode to so it can just be
directly used. Map it to the assembly source values 8/16/24 when we print it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136152
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 26 Jul 2011 21:02:58 +0000 (21:02 +0000)]
Prevent x86-specific DAGCombine from creating nodes with illegal type (which could not be selected). Fixes a minor isel issue that was breaking the testcase from r136130.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136148
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 26 Jul 2011 20:57:44 +0000 (20:57 +0000)]
Remove one last reference to Target in MC library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136145
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Jul 2011 20:54:26 +0000 (20:54 +0000)]
Split am2offset into register addend and immediate addend forms, necessary for allowing the fixed-length disassembler to distinguish between SBFX and STR_PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136141
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Tue, 26 Jul 2011 20:52:25 +0000 (20:52 +0000)]
Update generated code to use new API of GetElementPtrInst::Create.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136138
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 20:49:44 +0000 (20:49 +0000)]
FileCheck'ize test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136135
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 26 Jul 2011 20:42:28 +0000 (20:42 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136133
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 20:41:24 +0000 (20:41 +0000)]
Fix over-zealous rename from r136095.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136132
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 26 Jul 2011 20:41:03 +0000 (20:41 +0000)]
XFAIL this test while I investigate it; it's failing for an unexpected reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136131
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 26 Jul 2011 20:38:49 +0000 (20:38 +0000)]
Add obvious missing case to switch. PR10497.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136130
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 26 Jul 2011 20:24:06 +0000 (20:24 +0000)]
Fix a couple minor mistakes pointed out by Bill in adding 'fence' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136124
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 26 Jul 2011 19:02:16 +0000 (19:02 +0000)]
Fix llvm-mc target detection code to match llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136115
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 26 Jul 2011 18:31:49 +0000 (18:31 +0000)]
Updating stale documentation on regalloc modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136112
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 26 Jul 2011 18:31:41 +0000 (18:31 +0000)]
Use the correct for for the version. It's little endian and my brain is
obviously big endian. :-)
PR10502
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136111
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 18:25:39 +0000 (18:25 +0000)]
ARM diagnostics for ldrexd/stredx out of order paired register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136110
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 26 Jul 2011 18:22:39 +0000 (18:22 +0000)]
Remove now unused patterns. 0 insertions(+), 98 deletions(-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136109
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 26 Jul 2011 18:22:27 +0000 (18:22 +0000)]
Cleanup old matching for PUNPCK* variants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136108
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 26 Jul 2011 18:09:53 +0000 (18:09 +0000)]
While extracting lexical scopes from machine instruction stream, work on one machine basic block at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136106
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 18:07:21 +0000 (18:07 +0000)]
ARM parsing and encoding tests for load/store exclusive instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136105
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 17:44:46 +0000 (17:44 +0000)]
ARM fix for LDREX source register encoding.
rdar://
9842203
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136102
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 26 Jul 2011 17:19:55 +0000 (17:19 +0000)]
SCEV: Added a data structure for storing not-taken info per loop
exit. Added an interfaces for querying either the loop's exact/max
backedge taken count or a specific loop exit's not-taken count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136100
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 26 Jul 2011 17:19:30 +0000 (17:19 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136099
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 17:15:11 +0000 (17:15 +0000)]
ARM assembly parsing and encoding for SWP[B] instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136098
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 17:11:05 +0000 (17:11 +0000)]
ARM SWP instructions store, too, not just load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136096
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 17:10:22 +0000 (17:10 +0000)]
Clean up the ARM asm parser a bit.
No intendeded functional change. Just cleaning up a bit to make things more
self-consistent in layout and style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136095
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jul 2011 16:44:05 +0000 (16:44 +0000)]
ARM fix asm parsing range check for [0,31] immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136091
91177308-0d34-0410-b5e6-
96231b3b80d8