Craig Topper [Wed, 26 Dec 2012 05:49:15 +0000 (05:49 +0000)]
Use an additional multiclass to merge the 128/256-bit SSE/AVX instruction definitions for a bunch of SSE2 integer arithmetic instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171092
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 26 Dec 2012 04:59:20 +0000 (04:59 +0000)]
Reformat the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171091
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 26 Dec 2012 04:58:12 +0000 (04:58 +0000)]
white space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171090
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Dec 2012 04:36:03 +0000 (04:36 +0000)]
Use an additional multiclass to merge the 128/256-bit SSE/AVX instruction definitions for PAND/POR/PXOR/PANDN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171087
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Dec 2012 03:56:47 +0000 (03:56 +0000)]
Merge an AVX/SSE 256-bit and 128-bit multiclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171086
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Dec 2012 03:48:10 +0000 (03:48 +0000)]
Mark VANDNPD/VANDNPDS as not commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171085
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Dec 2012 03:19:30 +0000 (03:19 +0000)]
llvm/test/CodeGen/X86: FileCheck-ize two tests in r171083.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171084
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Dec 2012 03:08:55 +0000 (03:08 +0000)]
llvm/test/CodeGen/X86: Disable avx in two tests corresponding to r171082.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171083
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Dec 2012 02:44:47 +0000 (02:44 +0000)]
Remove alignment from a bunch more VEX encoded operations in the folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171082
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Dec 2012 02:14:19 +0000 (02:14 +0000)]
Remove alignment from folding table for VMOVUPD as an unaligned instruction it shouldn't require alignment...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171081
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Dec 2012 01:47:12 +0000 (01:47 +0000)]
Remove alignment requirements from (V)EXTRACTPS. This instruction does 32-bit stores which aren't required to be aligned on SSE or AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171080
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 26 Dec 2012 01:36:57 +0000 (01:36 +0000)]
BBVectorize: Use VTTI to compute costs for intrinsics vectorization
For the time being this includes only some dummy test cases. Once the
generic implementation of the intrinsics cost function does something other
than assuming scalarization in all cases, or some target specializes the
interface, some real test cases can be added.
Also, for consistency, I changed the type of IID from unsigned to Intrinsic::ID
in a few other places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171079
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Dec 2012 00:35:47 +0000 (00:35 +0000)]
Remove alignment requirement from VCVTSS2SD in folding tables. Reverting r171049. This instruction doesn't require alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171078
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 25 Dec 2012 23:21:29 +0000 (23:21 +0000)]
LoopVectorize: Enable vectorization of the fmuladd intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171076
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 25 Dec 2012 22:36:08 +0000 (22:36 +0000)]
BBVectorize: Enable vectorization of the fmuladd intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171075
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 25 Dec 2012 18:51:18 +0000 (18:51 +0000)]
Loosen scheduling restrictions on the PPC dcbt intrinsic
As with the prefetch intrinsic to which it maps, simply have dcbt
marked as reading from and writing to its arguments instead of having
unmodeled side effects. While this might cause unwanted code motion
(because aliasing checks don't really capture cache-line sharing),
it is more important that prefetches in unrolled loops don't block
the scheduler from rearranging the unrolled loop body.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171073
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 25 Dec 2012 17:22:53 +0000 (17:22 +0000)]
Expand PPC64 atomic load and store
Use of store or load with the atomic specifier on 64-bit types would
cause instruction-selection failures. As with the 32-bit case, these
can use the default expansion in terms of cmp-and-swap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171072
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 25 Dec 2012 16:04:38 +0000 (16:04 +0000)]
[msan] Fix handling of vectors of pointers.
VectorType::getInteger() can not be used with them, because pointer size
depends on the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171070
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 25 Dec 2012 14:56:21 +0000 (14:56 +0000)]
[msan] Fix handling of select with vector condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171069
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 25 Dec 2012 13:23:23 +0000 (13:23 +0000)]
Harden test so it's not affected by changes to compare lowering.
This only failed on hosts that don't have SSE41.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171066
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 25 Dec 2012 13:09:08 +0000 (13:09 +0000)]
X86: Shave off one shuffle from the pcmpeqq sequence for SSE2 by making use of and commutativity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171064
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 25 Dec 2012 12:54:19 +0000 (12:54 +0000)]
X86: Custom lower <2 x i64> eq and ne when SSE41 is not available.
pcmpeqd, pshufd, pshufd, pand is cheaper than unpack + cmpq, sbbq, cmpq, sbbq + pack.
Small speedup on loop-vectorized viterbi (-march=core2).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171063
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 25 Dec 2012 12:28:20 +0000 (12:28 +0000)]
ASan: initialize callbacks from ASan module pass in a separate function for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171061
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 25 Dec 2012 12:04:36 +0000 (12:04 +0000)]
ASan: move stack poisoning logic into FunctionStackPoisoner struct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171060
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 25 Dec 2012 06:13:25 +0000 (06:13 +0000)]
Fix whitespace. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171051
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 25 Dec 2012 03:29:18 +0000 (03:29 +0000)]
VCVTSS2SD requires a strict alignment. Thanks Elena.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171049
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 25 Dec 2012 00:07:12 +0000 (00:07 +0000)]
Rename LLVMContext diagnostic handler types and functions.
These are now generally used for all diagnostics from the backend, not just
for inline assembly, so this drops the "InlineAsm" from the names. No
functional change. (I've left aliases for the old names but only for long
enough to let me switch over clang to use the new ones.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171047
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 24 Dec 2012 22:43:59 +0000 (22:43 +0000)]
[CMake] AddLLVM.cmake: Tweak the corner case that "check-all" doesn't have any tests.
"check-all" can be executed with 0 status, "check-all does nothing, no tools built."
LLVM_EXTERNAL_CLANG_BUILD=OFF LLVM_BUILD_TOOLS=OFF can reproduce this.
Oscar Fuentes reported this. Thank you.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171046
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 24 Dec 2012 19:58:45 +0000 (19:58 +0000)]
Quiet gcc's -Wparenthesis warning. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171044
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 24 Dec 2012 19:55:47 +0000 (19:55 +0000)]
Fix typo "Makre" -> "Make".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171043
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 24 Dec 2012 19:23:30 +0000 (19:23 +0000)]
Use a std::string rather than a dynamically allocated char* buffer.
This affords us to use std::string's allocation routines and use the destructor
for the memory management. Switching to that also means that we can use
operator==(const std::string&, const char *) to perform the string comparison
rather than resorting to libc functionality (i.e. strcmp).
Patch by Saleem Abdulrasool!
Differential Revision: http://llvm-reviews.chandlerc.com/D230
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171042
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 24 Dec 2012 18:15:21 +0000 (18:15 +0000)]
Add LLVMContext::emitWarning methods and use them. <rdar://problem/
12867368>
When the backend is used from clang, it should produce proper diagnostics
instead of just printing messages to errs(). Other clients may also want to
register their own error handlers with the LLVMContext, and the same handler
should work for warnings in the same way as the existing emitError methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171041
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 24 Dec 2012 17:52:48 +0000 (17:52 +0000)]
Fix a typo introduced in r168577: FlAGS -> FLAGS (note the lowercase ell)
Now we really pass -Wcovered-switch-default if the compiler supports it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171040
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 24 Dec 2012 15:01:59 +0000 (15:01 +0000)]
AutoRegen.sh: update reference to documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171037
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 24 Dec 2012 11:14:06 +0000 (11:14 +0000)]
llvm/test/CodeGen/X86/fold-vex.ll: Add explicit triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171029
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 24 Dec 2012 10:04:03 +0000 (10:04 +0000)]
CostModel: We have API for checking the costs of known shuffles. This patch adds
support for the insert-subvector and extract-subvector kinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171027
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 24 Dec 2012 10:03:57 +0000 (10:03 +0000)]
Added 6 more value types: v32i1, v64i1, v32i16, v32i8, v64i8, v8f64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171026
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 24 Dec 2012 09:42:27 +0000 (09:42 +0000)]
Removed "static" from "__jit_debug_descriptor" because "static" adds C++ mangling prefix to this symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171025
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 24 Dec 2012 09:40:33 +0000 (09:40 +0000)]
Some x86 instructions can load/store one of the operands to memory. On SSE, this memory needs to be aligned.
When these instructions are encoded in VEX (on AVX) there is no such requirement. This changes the folding
tables and removes the alignment restrictions from VEX-encoded instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171024
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 24 Dec 2012 09:14:18 +0000 (09:14 +0000)]
LoopVectorizer: When checking for vectorizable types, also check
the StoreInst operands.
PR14705.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171023
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 24 Dec 2012 08:57:47 +0000 (08:57 +0000)]
Change the codegen Cost Model API for shuffeles. This patch removes the API for broadcast and adds a more general API that accepts an enum of known shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171022
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 24 Dec 2012 08:52:53 +0000 (08:52 +0000)]
Fix typo in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171021
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 24 Dec 2012 05:51:12 +0000 (05:51 +0000)]
Update the docs of the cost model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171016
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 24 Dec 2012 01:24:04 +0000 (01:24 +0000)]
llvm/MC/MCMachObjectWriter.h: ComputeSymbolTable(): Prune one description in the comment. [-Wdocumentation]
/// \param StringIndexMap [out] - Map from symbol names to offsets in the string table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171010
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 24 Dec 2012 01:22:06 +0000 (01:22 +0000)]
LoopVectorizer: Fix an endless loop in the code that looks for reductions.
The bug was in the code that detects PHIs in if-then-else block sequence.
PR14701.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171008
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 23 Dec 2012 18:46:11 +0000 (18:46 +0000)]
Documentation: fix typos reported in PR13866
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171006
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 23 Dec 2012 17:31:23 +0000 (17:31 +0000)]
CostModel: Change the default target-independent implementation for finding
the cost of arithmetic functions. We now assume that the cost of arithmetic
operations that are marked as Legal or Promote is low, but ops that are
marked as custom are higher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171002
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 23 Dec 2012 13:21:41 +0000 (13:21 +0000)]
LoopVectorize: Fix accidentaly inverted condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171001
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 23 Dec 2012 13:19:18 +0000 (13:19 +0000)]
LoopVectorize: For scalars and void types there is no need to compute vector insert/extract costs.
Fixes an assert during the build of oggenc in the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171000
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 23 Dec 2012 09:11:07 +0000 (09:11 +0000)]
We are not ready to estimate the cost of integer expansions based on the number of parts. This test is too noisy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170999
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sun, 23 Dec 2012 07:34:51 +0000 (07:34 +0000)]
docs: Add link to external LLVM backend tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170998
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 23 Dec 2012 07:33:44 +0000 (07:33 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170997
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 23 Dec 2012 07:30:09 +0000 (07:30 +0000)]
Rename a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170996
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 23 Dec 2012 07:23:55 +0000 (07:23 +0000)]
Loop Vectorizer: Update the cost model of scatter/gather operations and make
them more expensive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170995
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Dec 2012 19:15:35 +0000 (19:15 +0000)]
Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170991
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Dec 2012 18:09:02 +0000 (18:09 +0000)]
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170990
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 22 Dec 2012 17:33:22 +0000 (17:33 +0000)]
Remove a special case that doesn't seem necessary any longer.
Back when this exception was added, it was skipping a lot more code, but
now it just looks like a premature optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170989
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 22 Dec 2012 17:13:06 +0000 (17:13 +0000)]
Use getNumOperands() instead of Operands.size().
The representation of the Operands array is going to change soon so it
can be allocated from a BumpPtrAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170988
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 22 Dec 2012 16:07:56 +0000 (16:07 +0000)]
X86: Turn mul of <4 x i32> into pmuludq when no SSE4.1 is available.
pmuludq is slow, but it turns out that all the unpacking and packing of the
scalarized mul is even slower. 10% speedup on loop-vectorized paq8p.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170985
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 22 Dec 2012 11:34:28 +0000 (11:34 +0000)]
X86: Emit vector sext as shuffle + sra if vpmovsx is not available.
Also loosen the SSSE3 dependency a bit, expanded pshufb + psra is still better
than scalarized loads. Fixes PR14590.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170984
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Dec 2012 08:22:01 +0000 (08:22 +0000)]
Add a comma to fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170982
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Dec 2012 08:16:17 +0000 (08:16 +0000)]
Use a negative value to represent INVALID_SIMPLE_VALUE_TYPE instead of 256. Its much cheaper for the isSimple() checks to look for values less than 0 rather than a value greater than 255. This shaves ~8k off the size of the llc binary on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170981
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Dec 2012 03:08:37 +0000 (03:08 +0000)]
Add vAny and Metadata to the switch in getSizeInBits for consistency since every other enum was listed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170977
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 22 Dec 2012 00:47:06 +0000 (00:47 +0000)]
[utils] Tweak utils/clang-parse-diagnostics-file to ignore autoconf diagnostics.
- Also, don't print headers if we aren't going to print any diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170973
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 22 Dec 2012 00:37:52 +0000 (00:37 +0000)]
Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of attribute instead of the value of the attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170972
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 22 Dec 2012 00:31:54 +0000 (00:31 +0000)]
Fix some undefined behavior when parsing YAML input: don't try to compare an
uninitialized value against a default value. Found by -fsanitize=enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170970
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 22 Dec 2012 00:15:13 +0000 (00:15 +0000)]
Don't call back() on an empty SmallVector. Found by -fsanitize=enum!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170968
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 21 Dec 2012 23:48:49 +0000 (23:48 +0000)]
In some cases, due to scheduling constraints we copy the EFLAGS.
The only way to read the eflags is using push and pop. If we don't
adjust the stack then we run over the first frame index. This is
not something that we want to do, so we have to make sure that
our machine function does not copy the flags. If it does then
we have to emit the prolog that adjusts the stack.
rdar://
12896831
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170961
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 23:21:32 +0000 (23:21 +0000)]
[mips] Refactor subword-swap, EXT/INS, load-effective-address and read-hardware
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170956
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 23:17:36 +0000 (23:17 +0000)]
[mips] Refactor SYNC and multiply/divide instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170955
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 23:15:59 +0000 (23:15 +0000)]
[mips] Refactor BAL instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170954
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 23:13:59 +0000 (23:13 +0000)]
[mips] Fix encoding of BAL instruction. Also, fix assembler test case which
was not catching the error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170953
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 23:03:50 +0000 (23:03 +0000)]
[mips] Refactor jump, jump register, jump-and-link and nop instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170952
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 23:01:24 +0000 (23:01 +0000)]
[mips] Refactor load/store left/right and load-link and store-conditional
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170950
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:58:55 +0000 (22:58 +0000)]
[mips] Refactor load/store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170948
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:57:26 +0000 (22:57 +0000)]
[mips] Remove unnecessary isPseudo parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170947
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:46:07 +0000 (22:46 +0000)]
[mips] Refactor LUI instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170944
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:43:58 +0000 (22:43 +0000)]
[mips] Refactor count leading zero or one instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170942
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:41:52 +0000 (22:41 +0000)]
[mips] Refactor sign-extension-in-register instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170940
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:39:17 +0000 (22:39 +0000)]
[mips] Refactor instructions which copy from and to HI/LO registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170939
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:35:47 +0000 (22:35 +0000)]
[mips] Refactor logical NOR instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170937
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Dec 2012 22:33:43 +0000 (22:33 +0000)]
[mips] Move instruction definitions in MipsInstrInfo.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170936
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Dec 2012 20:12:02 +0000 (20:12 +0000)]
R600: Coding style - remove empty spaces from the beginning of functions
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170923
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Dec 2012 20:12:01 +0000 (20:12 +0000)]
R600: Fix MAX_UINT definition
Patch by: Vadim Girlin
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170922
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Dec 2012 20:11:59 +0000 (20:11 +0000)]
R600: Add SHADOWCUBE to TEX_SHADOW pattern
Patch by: Vadim Girlin
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170921
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Dec 2012 19:09:53 +0000 (19:09 +0000)]
Cleanup compiler warnings on discarding type qualifiers in casts. Switch to C++ style casts.
Patch by Saleem Abdulrasool!
Differential Revision: http://llvm-reviews.chandlerc.com/D204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170917
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 21 Dec 2012 18:38:09 +0000 (18:38 +0000)]
Add a missing assertion, the null register has no register units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170916
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Dec 2012 18:11:45 +0000 (18:11 +0000)]
try to unbreak ppc buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170913
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Dec 2012 18:00:08 +0000 (18:00 +0000)]
Teach sort_includes.py to drop duplicated includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170911
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Dec 2012 17:46:58 +0000 (17:46 +0000)]
X86: Match pmin/pmax as a target specific dag combine. This occurs during vectorization.
Part of PR14667.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170908
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Fri, 21 Dec 2012 17:06:44 +0000 (17:06 +0000)]
Remove duplicate includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170902
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 21 Dec 2012 16:33:24 +0000 (16:33 +0000)]
R600: Expand vec4 INT <-> FP conversions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170901
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Dec 2012 14:04:55 +0000 (14:04 +0000)]
X86: Match the SSE/AVX min/max vector ops using a custom node instead of intrinsics
This is very mechanical, no functionality change. Preparation for PR14667.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170898
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 21 Dec 2012 12:03:03 +0000 (12:03 +0000)]
Test that a landingpad gets the name provided when it was created (see commit
170318).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170886
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 21 Dec 2012 11:18:49 +0000 (11:18 +0000)]
[msan] Remove unreachable blocks before instrumenting a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170883
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 21 Dec 2012 05:02:12 +0000 (05:02 +0000)]
Add a missing "virtual" keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170842
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 21 Dec 2012 04:47:54 +0000 (04:47 +0000)]
Enable if-conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170841
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 21 Dec 2012 04:35:05 +0000 (04:35 +0000)]
Add ARM cortex-r5 subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170840
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Dec 2012 04:08:03 +0000 (04:08 +0000)]
Don't skip __DWARF,
Now that we don't merge section and segment names, we don't need to skip the
segment name to get to the section name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170839
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Dec 2012 03:47:03 +0000 (03:47 +0000)]
Add a function to get the segment name of a section.
On MachO, sections also have segment names. When a tool looking at a .o file
prints a segment name, this is what they mean. In reality, a .o has only one
anonymous, segment.
This patch adds a MachO only function to fetch that segment name. I named it
getSectionFinalSegmentName since the main use for the name seems to be inform
the linker with segment this section should go to.
The patch also changes MachOObjectFile::getSectionName to return just the
section name instead of computing SegmentName,SectionName.
The main difference from the previous patch is that it doesn't use
InMemoryStruct. It is extremely dangerous: if the endians match it returns
a pointer to the file buffer, if not, it returns a pointer to an internal buffer
that is overwritten in the next API call.
We should change all of this code to use
support::detail::packed_endian_specific_integral like ELF, but since these
functions only handle strings, they work with big and little endian machines
as is.
I have tested this by installing ubuntu 12.10 ppc on qemu, that is why it took
so long :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170838
91177308-0d34-0410-b5e6-
96231b3b80d8