- Aug 13, 2018
-
-
Craig Topper authored
[SelectionDAG] In PromoteFloatRes_BITCAST, insert a bitcast before the fp16_to_fp in case the input type isn't an i16. The bitcast can be further legalized as needed. Fixes PR38533. llvm-svn: 339533
-
Craig Topper authored
llvm-svn: 339532
-
Craig Topper authored
[InstCombine] Replace call to haveNoCommonBitsSet in visitXor with just the special case that doesn't use computeKnownBits. Summary: computeKnownBits is expensive. The cases that would be detected by the computeKnownBits portion of haveNoCommonBitsSet were already handled by the earlier call to SimplifyDemandedInstructionBits. Reviewers: spatel, lebedev.ri Reviewed By: lebedev.ri Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D50604 llvm-svn: 339531
-
Shuai Wang authored
Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50605 llvm-svn: 339530
-
Craig Topper authored
[X86] Add constant folding for AVX512 versions of scalar floating point to integer conversion intrinsics. Summary: We've supported constant folding for sse versions for many years. This patch adds support for the avx512 versions including unsigned with the default rounding mode. We could probably do more with other roundings modes and SAE in the future. The test cases are largely based on the sse.ll test cases. But I did add some test cases to ensure the unsigned versions don't accept negative values. Also checked the bounds of f64->i32 conversions to make sure unsigned has a larger positive range than signed. Reviewers: RKSimon, spatel, chandlerc Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D50553 llvm-svn: 339529
-
Daniel Sanders authored
Summary: Found by GCC's -Wunused-function. Patch by Kim Gräsman Reviewers: ab, dsanders, llvm-commits Reviewed By: dsanders Subscribers: rovka, kristof.beyls Differential Revision: https://reviews.llvm.org/D50611 llvm-svn: 339528
-
Aaron Ballman authored
This form makes more sense (it is a range over constant arguments) and is most consistent with const_arg_iterator (there are zero instances of arg_const_iterator). llvm-svn: 339527
-
Matt Arsenault authored
Also add some more tests in preparation for a future patch. llvm-svn: 339526
-
Matt Arsenault authored
Addresses fixme, although this should still be checking individual operand flags. llvm-svn: 339525
-
David Bolvansky authored
llvm-svn: 339524
-
David Bolvansky authored
llvm-svn: 339523
-
Shuai Wang authored
Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50606 llvm-svn: 339522
-
David Bolvansky authored
Summary: The as<T>() method would trigger the following warning on GCC <7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] return *reinterpret_cast<T *>(Union.buffer); ^ Union.buffer is guaranteed to be aligned to whatever types it contains, and json::Value maintains the invariant that it only calls as<T>() for a T it has previously placement-newed into Union.buffer. This should follow the rules for strict aliasing. Using two static_cast via void * instead of reinterpret_cast silences the warning and presumably makes GCC understand that no strict-aliasing violation is happening. No functional change intended. Patch by: kimgr (Kim Gräsman) Reviewers: sammccall, xiangzhai, HaoLiu, llvm-commits, xbolva00 Reviewed By: sammccall, xbolva00 Subscribers: xbolva00 Differential Revision: https://reviews.llvm.org/D50608 llvm-svn: 339521 -
David Bolvansky authored
Summary: Basic version was merged - https://reviews.llvm.org/D49954 This adds support for FP & non-commutative opcodes Precommited tests: https://reviews.llvm.org/rL338727 Reviewers: spatel, lebedev.ri Reviewed By: spatel Subscribers: jfb Differential Revision: https://reviews.llvm.org/D50190 llvm-svn: 339520
-
- Aug 12, 2018
-
-
Sanjay Patel authored
(X * Z) + (Y * Z) --> (X + Y) * Z (X * Z) - (Y * Z) --> (X - Y) * Z (X / Z) + (Y / Z) --> (X + Y) / Z (X / Z) - (Y / Z) --> (X - Y) / Z The existing code that implemented these folds failed to optimize vectors, and it transformed code with multiple uses when it should not have. llvm-svn: 339519
-
Sanjay Patel authored
llvm-svn: 339518
-
Aaron Ballman authored
Adding the readability module to the list of dependencies for the C++ Core Guidelines module. Amends r339516 for a failing bot. llvm-svn: 339517
-
Aaron Ballman authored
Add a new check to the readability module that flags uses of "magic numbers" (both floating-point and integral). Patch by Florin Iucha <florin@signbit.net> llvm-svn: 339516
-
Benjamin Kramer authored
These are always UB, but can happen for large integer inputs. Testing it is very fragile as -simplifycfg will nuke the UB top-down. llvm-svn: 339515
-
George Rimar authored
This adds a coverage for the following early continue: https://github.com/llvm-mirror/lld/blob/master/ELF/CallGraphSort.cpp#L200 llvm-svn: 339514
-
Matt Arsenault authored
I'm not sure the exact nsz flag combination that is OK. I think as long as it's on either, this is OK. For now just check it on the omod multiply. llvm-svn: 339513
-
Matt Arsenault authored
If one of the elements is undef, use the canonicalized constant from the other element instead of 0. Splat vectors are more useful for other optimizations, such as matching vector clamps. This was breaking on clamps of half3 from the undef 4th component. llvm-svn: 339512
-
Matt Arsenault authored
llvm-svn: 339511
-
George Rimar authored
llvm-svn: 339510
-
Craig Topper authored
We were checking for all bits being Known by checking Known.Zero|Known.One, but if all the bits are known then the value should be a Constant and we can just check for that instead. llvm-svn: 339509
-
Craig Topper authored
llvm-svn: 339508
-
Craig Topper authored
The use of the or_is_add predicate already gives enough of a complexity boost to get the patterns ordered properly. llvm-svn: 339507
-
Raphael Isemann authored
Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50550 llvm-svn: 339506
-
Raphael Isemann authored
Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50552 llvm-svn: 339505
-
Raphael Isemann authored
Summary: Instead of iterating over our vector of functions, we might as well use a map here to directly get the function we need. Thanks to Vedant for pointing this out. Reviewers: vsk Reviewed By: vsk Subscribers: mgrang, lldb-commits Differential Revision: https://reviews.llvm.org/D50225 llvm-svn: 339504
-
Martin Storsjo authored
This was missed in SVN r337754. llvm-svn: 339503
-
- Aug 11, 2018
-
-
Chijun Sima authored
Summary: After converting all existing passes to use the new DomTreeUpdater interface, there isn't any usage of the original DeferredDominance class. Thus, we can safely remove it from the codebase. Reviewers: kuhar, brzycki, dmgreen, davide, grosser Reviewed By: kuhar, brzycki Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D49747 llvm-svn: 339502
-
David Green authored
Try to improve the computed counts when it has been explicitly set by a pragma or command line option. This moves the code around, so that first call to computeUnrollCount to get a sensible count and override that if explicit unroll and jam counts are specified. Also added some extra debug messages for when unroll and jamming is disabled. Differential Revision: https://reviews.llvm.org/D50075 llvm-svn: 339501
-
David Green authored
Pulled out a separate function for some code that calculates if an inner loop iteration count is invariant to it's outer loop. Differential Revision: https://reviews.llvm.org/D50063 llvm-svn: 339500
-
Craig Topper authored
[X86] Remove the AL/AX/EAX/RAX short immediate forms from the macro fusion shouldScheduleAdjacent. NFC These instructions are only created by the backend during MCInst lowering. llvm-svn: 339499
-
Craig Topper authored
Unlike the other arithmetic instructions the mem-reg form of compare is just a load and not a RMW operation. According to the Intel optimization manual, this form is also supported by macro fusion. llvm-svn: 339498
-
Craig Topper authored
The are RMW of memory operations. They aren't eligible for macro fusion. llvm-svn: 339497
-
Craig Topper authored
[X86] Change the MOV32ri64 pseudo instruction to def a GR64 directly instead of wrapping it in a SUBREG_TO_REG. Now we switch to the subregister in expandPostRAPseudos where we already switched the opcode. This simplifies a few isel patterns that used the pseudo directly. And magically seems to have improved our ability to CSE it in the undef-label.ll test. llvm-svn: 339496
-
Richard Trieu authored
Treat the stack variants of control instructions the same as regular instructions. Otherwise, the vector ControlFlowStack will be the wrong size and have out-of-bounds access. This was detected by MemorySanitizer. llvm-svn: 339495
-
Douglas Yung authored
Make the section boundary checks on Windows not depend on the order as they are emitted in reverse when the compiler is built by Visual C++. llvm-svn: 339494
-