- Sep 22, 2014
-
-
Chandler Carruth authored
input v8f32 shuffles which are not 128-bit lane crossing but have different shuffle patterns in the low and high lanes. This removes most of the extract/insert traffic that was unnecessary and is particularly good at lowering cases where only one of the two lanes is shuffled at all. I've also added a collection of test cases with undef lanes because this lowering is somewhat more sensitive to undef lanes than others. llvm-svn: 218226
-
Alexander Kornienko authored
leave the "redundant cast to the same type" part). llvm-svn: 218225
-
Chandler Carruth authored
in the high and low 128-bit lanes of a v8f32 vector. No functionality change yet, but wanted to set up the baseline for my next patch which will make these quite a bit better. =] llvm-svn: 218224
-
Matt Arsenault authored
llvm-svn: 218223
-
Matt Arsenault authored
llvm-svn: 218222
-
Matt Arsenault authored
llvm-svn: 218221
-
Lang Hames authored
llvm-svn: 218220
-
- Sep 21, 2014
-
-
Sanjay Patel authored
This is purely a plumbing patch. No functional changes intended. The ultimate goal is to allow targets other than PowerPC (certainly X86 and Aarch64) to turn this: z = y / sqrt(x) into: z = y * rsqrte(x) using whatever HW magic they can use. See http://llvm.org/bugs/show_bug.cgi?id=20900 . The first step is to add a target hook for RSQRTE, take the already target-independent code selfishly hoarded by PPC, and put it into DAGCombiner. Next steps: The code in DAGCombiner::BuildRSQRTE() should be refactored further; tests that exercise that logic need to be added. Logic in PPCTargetLowering::BuildRSQRTE() should be hoisted into DAGCombiner. X86 and AArch64 overrides for TargetLowering.BuildRSQRTE() should be added. Differential Revision: http://reviews.llvm.org/D5425 llvm-svn: 218219
-
Sanjay Patel authored
llvm-svn: 218218
-
Chandler Carruth authored
the new vector shuffle lowering no longer needs to check both symmetric forms of UNPCK patterns for v4f64. llvm-svn: 218217
-
Chandler Carruth authored
lowering when it can use a symmetric SHUFPS across both 128-bit lanes. This required making the SHUFPS lowering tolerant of other vector types, and adjusting our canonicalization to canonicalize harder. This is the last of the clever uses of symmetry I've thought of for v8f32. The rest of the tricks I'm aware of here are to work around assymetry in the mask. llvm-svn: 218216
-
Chandler Carruth authored
a generic vector shuffle mask into a helper that isn't specific to the other things that influence which choice is made or the specific types used with the instruction. No functionality changed. llvm-svn: 218215
-
Chandler Carruth authored
of a single element into a zero vector for v4f64 and v4i64 in AVX. Ironically, there is less to see here because xor+blend is so crazy fast that we can't really beat that to zero the high 128-bit lane. llvm-svn: 218214
-
Chandler Carruth authored
UNPCKHPS with AVX vectors by recognizing those patterns when they are repeated for both 128-bit lanes. With this, we now generate the exact same (really nice) code for Quentin's avx_test_case.ll which was the most significant regression reported for the new shuffle lowering. In fact, I'm out of specific test cases for AVX lowering, the rest were AVX2 I think. However, there are a bunch of pretty obvious remaining things to improve with AVX... llvm-svn: 218213
-
Chandler Carruth authored
preparation for enhancing their support in the new vector shuffle lowering. llvm-svn: 218212
-
Chandler Carruth authored
important bits of cleverness: to detect and lower repeated shuffle patterns between the two 128-bit lanes with a single instruction. This patch just teaches it how to lower single-input shuffles that fit this model using VPERMILPS. =] There is more that needs to happen here. llvm-svn: 218211
-
Chandler Carruth authored
generating the test cases to format things more consistently and actually catch all the operand sequences that should be elided in favor of the asm comments. No actual changes here. llvm-svn: 218210
-
Chandler Carruth authored
v8f32 shuffles in the new vector shuffle lowering code. This is very cheap to do and makes it much more clear that anything more expensive but overlapping with this lowering should be selected afterward (for example using AVX2's VPERMPS). However, no functionality changed here as without this code we would fall through to create no-op shuffles of each input and a blend. =] llvm-svn: 218209
-
Chandler Carruth authored
VBLENDPD over using VSHUFPD. While the 256-bit variant of VBLENDPD slows down to the same speed as VSHUFPD on Sandy Bridge CPUs, it has twice the reciprocal throughput on Ivy Bridge CPUs much like it does everywhere for 128-bits. There isn't a downside, so just eagerly use this instruction when it suffices. llvm-svn: 218208
-
Chandler Carruth authored
llvm-svn: 218207
-
Chandler Carruth authored
This expands the integer cases to cover the fact that AVX2 moves their lane-crossing shuffles into the integer domain. It also adds proper support for AVX2 run lines and the "ALL" group when it doesn't matter. llvm-svn: 218206
-
Chandler Carruth authored
awkward conditions. The readability improvement of this will be even more important as I generalize it to handle more types. No functionality changed. llvm-svn: 218205
-
Chandler Carruth authored
new vector shuffle lowering. llvm-svn: 218204
-
Chandler Carruth authored
128-bit lane crossings, not 'half' crossings. This came up in code review ages ago, but I hadn't really addresesd it. Also added some documentation for the helper. No functionality changed. llvm-svn: 218203
-
Chandler Carruth authored
actual support for complex AVX shuffling tricks. We can do independent blends of the low and high 128-bit lanes of an avx vector, so shuffle the inputs into place and then do the blend at 256 bits. This will in many cases remove one blend instruction. The next step is to permute the low and high halves in-place rather than extracting them and re-inserting them. llvm-svn: 218202
-
David Majnemer authored
link.exe: Fuzz testing has shown that COMMON symbols with size > 32 will always have an alignment of at least 32 and all symbols with size < 32 will have an alignment of at least the largest power of 2 less than the size of the symbol. binutils: The BFD linker essentially work like the link.exe behavior but with alignment 4 instead of 32. The BFD linker also supports an extension to COFF which adds an -aligncomm argument to the .drectve section which permits specifying a precise alignment for a variable but MC currently doesn't support editing .drectve in this way. With all of this in mind, we decide to play a little trick: we can ensure that the alignment will be respected by bumping the size of the global to it's alignment. llvm-svn: 218201
-
Chandler Carruth authored
llvm-svn: 218200
-
Chandler Carruth authored
under AVX. This really just documents the current state of the world. I'm going to try to flesh it out to cover any test cases I plan to improve prior to improving them so that the delta made by changes is actually visible to code reviewers. This is made easier by the fact that I now have a script to automate the process of producing test cases including the check lines. =] llvm-svn: 218199
-
Yaron Keren authored
llvm-svn: 218198
-
Yaron Keren authored
llvm\tools\lld\lib\readerwriter\macho\macholinkingcontext.cpp(647): warning C4715: 'lld::MachOLinkingContext::exportSymbolNamed' : not all control paths return a value llvm\tools\lld\lib\readerwriter\macho\machonormalizedfilefromatoms.cpp(723): warning C4715: '`anonymous namespace'::Util::getSymbolTableRegion' : not all control paths return a value While all enum values do appear in the switch, an uninitialized or corrupted enum variable would not be caught without the default: case in the switch. llvm-svn: 218197
-
Ed Maste authored
The test used to trigger an assertion failure "Cannot get layout of forward declarations!", but it no longer fails when built with Clang 3.4.1 (system compiler) or 3.5 from SVN on FreeBSD. llvm.org/pr17231 llvm-svn: 218196
-
NAKAMURA Takumi authored
RTDyldMemoryManager::getSymbolAddress(): Make sure to return 0 if symbol name is not met. [-Wreturn-type] llvm-svn: 218195
-
Sanjay Patel authored
llvm-svn: 218194
-
Chandler Carruth authored
single-input shuffles with doubles. This allows them to fold memory operands into the shuffle, etc. This is just the analog to the v4f32 case in my prior commit. llvm-svn: 218193
-
Chandler Carruth authored
a generic SSE and AVX mode in addition to a specific AVX1 test path, and flesh out the AVX tests. llvm-svn: 218192
-
David Majnemer authored
llvm-svn: 218191
-
Chandler Carruth authored
instruction for single-vector floating point shuffles. This in turn allows the shuffles to fold a load into the instruction which is one of the common regressions hit with the new shuffle lowering. llvm-svn: 218190
-
David Majnemer authored
We had a few bugs: - We were considering the GVKind instead of just looking at the section characteristics - We would never print out 'y' when a section was meant to be unreadable - We would never print out 's' when a section was meant to be shared - We translated IMAGE_SCN_MEM_DISCARDABLE to 'n' when it should've meant IMAGE_SCN_LNK_REMOVE llvm-svn: 218189
-
Chandler Carruth authored
duplication of check lines. The idea is to have broad sets of compilation modes that will frequently diverge without having to always and immediately explode to the precise ISA feature set. While this already helps due to VEX encoded differences, it will help much more as I teach the new shuffle lowering about more of the new VEX encoded instructions which can still be used to implement 128-bit shuffles. llvm-svn: 218188
-
Lang Hames authored
This patch modifies RTDyldMemoryManager::getSymbolAddress(Name)'s behavior to make it consistent with how clients are using it: Name should be mangled, and getSymbolAddress should demangle it on the caller's behalf before looking the name up in the process. This patch also fixes the one client (MCJIT::getPointerToFunction) that had been passing unmangled names (by having it pass mangled names instead). Background: RTDyldMemoryManager::getSymbolAddress(Name) has always used a re-try mechanism when looking up symbol names in the current process. Prior to this patch getSymbolAddress first tried to look up 'Name' exactly as the user passed it in and then, if that failed, tried to demangle 'Name' and re-try the look up. The implication of this behavior is that getSymbolAddress expected to be called with unmangled names, and that handling mangled names was a fallback for convenience. This is inconsistent with how clients (particularly the RuntimeDyldImpl subclasses, but also MCJIT) usually use this API. Most clients pass in mangled names, and succeed only because of the fallback case. For clients passing in mangled names, getSymbolAddress's old behavior was actually dangerous, as it could cause unmangled names in the process to shadow mangled names being looked up. For example, consider: foo.c: int _x = 7; int x() { return _x; } foo.o: 000000000000000c D __x 0000000000000000 T _x If foo.c becomes part of the process (E.g. via dlopen("libfoo.dylib")) it will add symbols 'x' (the function) and '_x' (the variable) to the process. However jit clients looking for the function 'x' will be using the mangled function name '_x' (note how function 'x' appears in foo.o). When getSymbolAddress goes looking for '_x' it will find the variable instead, and return its address and in place of the function, leading to JIT'd code calling the variable and crashing (if we're lucky). By requiring that getSymbolAddress be called with mangled names, and demangling only when we're about to do a lookup in the process, the new behavior implemented in this patch should eliminate any chance of names being shadowed during lookup. There's no good way to test this at the moment: This issue only arrises when looking up process symbols (not JIT'd symbols). Any test case would have to generate a platform-appropriate dylib to pass to llvm-rtdyld, and I'm not aware of any in-tree tool for doing this in a portable way. llvm-svn: 218187
-