- Mar 20, 2024
-
-
Changpeng Fang authored
-
Aaron Ballman authored
-
Michele Scandale authored
Folding a `select` into a floating point binary operators can only be done if the result is preserved for both case. In particular, if the other operand of the `select` can be a NaN, then the transformation won't preserve the result value.
-
Fangrui Song authored
GNU readelf prints a blank line before the first hex/string dump, which serves as a separator when there are other dump operations. Port the behavior. Pull Request: https://github.com/llvm/llvm-project/pull/85744
-
Luke Lau authored
This adds a reduced test case for the regression seen in x264 with #83035. If the intermediate concatenating shuffles are large enough then the splitting combine will prevent the strided load combine which is preferable.
-
Jeremy Morse authored
These are the last remaining "trivial" changes to passes that use Instruction pointers for insertion. All of this should be NFC, it's just changing the spelling of how we identify a position. In one or two locations, I'm also switching uses of getNextNode etc to using std::next with iterators. This too should be NFC. --------- Merged by: Stephen Tozer <stephen.tozer@sony.com>
-
Nick Desaulniers authored
Towards the goal of implementing __cxa_finalize (#85651) I'd like to be able to reverse iterate over cpp::arrays such as the one used in FixedVector. Implement the enough iterator support to be able to iterate a cpp::array in reverse, and add tests. Of note, reverse iterator's begin() refers to forward iterator's end() (and vice versa). When dereferenced (operator*), the reverse iterator returns a copy that's been pre-decremented (the underlying forward iterator is advanced).
-
Christian Ulmann authored
This commit ensures that SROA does no longer attempt to split allocas that are indexed into dynamically. Dynamic indices into arrays are allowed to be negative or out-of-bounds, when the alloca containing the array has memory backing these produced indices.
-
Farzon Lotfi authored
this implements part 1 of 2 for #83626 - `CGBuiltin.cpp` - modified to have seperate cases for signed and unsigned integers. - `SemaChecking.cpp` - modified to prevent the generation of a double dot product intrinsic if the builtin were to be called directly. - `IntrinsicsDirectX.td` creation of the signed and unsigned dot intrinsics needed for instruction expansion. - `DXILIntrinsicExpansion.cpp` - handle instruction expansion cases for integer dot product.
-
- Mar 19, 2024
-
-
Philip Reames authored
This is part of a series of small patches to compute shuffle masks for the couple of cases where we call getShuffleCost without one. My goal is to add an invariant that all calls to getShuffleCost for fixed length vectors have a mask. Note that this code appears to be reachable with scalable vectors, and thus we have to only pass a non-empty mask when the number of elements is precisely known.
-
Benjamin Kramer authored
-
Guray Ozen authored
PR adds `nvvm.barrier.arrive` Op. It is useful op for producer consumer modeling.
-
Stephen Tozer authored
Fixes a build error caused by an unupdated getAsInstruction callsite in clang. This reverts commit ab851f7f.
-
Stanislav Mekhanoshin authored
-
Florian Mayer authored
-
Simon Pilgrim authored
SSE only has AVGCEILU vXi8/vXi16 support - but for other types we should be trying to use the fixed width expansion instead of extensions
-
Jonas Devlieghere authored
Remove support for obfuscated bitcode in dsymutil and the DWARF linker. We no longer support bitcode submissions and the obfuscation support has been removed from the rest of the compiler. rdar://123863918
-
Alexey Bataev authored
This improves overall analysis for minbitwidth in SLP. It allows to analyze the trees with store/insertelement root nodes. Also, instead of using single minbitwidth, detected from the very first analysis stage, it tries to detect the best one for each trunc/ext subtree in the graph and use it for the subtree. Results in better code and less vector register pressure. Metric: size..text Program size..text results results0 diff test-suite :: SingleSource/Benchmarks/Adobe-C++/simple_types_loop_invariant.test 92549.00 92609.00 0.1% test-suite :: External/SPEC/CINT2017speed/625.x264_s/625.x264_s.test 663381.00 663493.00 0.0% test-suite :: External/SPEC/CINT2017rate/525.x264_r/525.x264_r.test 663381.00 663493.00 0.0% test-suite :: MultiSource/Benchmarks/Bullet/bullet.test 307182.00 307214.00 0.0% test-suite :: External/SPEC/CFP2017speed/638.imagick_s/638.imagick_s.test 1394420.00 1394484.00 0.0% test-suite :: External/SPEC/CFP2017rate/538.imagick_r/538.imagick_r.test 1394420.00 1394484.00 0.0% test-suite :: External/SPEC/CFP2017rate/510.parest_r/510.parest_r.test 2040257.00 2040273.00 0.0% test-suite :: External/SPEC/CFP2017rate/526.blender_r/526.blender_r.test 12396098.00 12395858.00 -0.0% test-suite :: External/SPEC/CINT2006/445.gobmk/445.gobmk.test 909944.00 909768.00 -0.0% SingleSource/Benchmarks/Adobe-C++/simple_types_loop_invariant - 4 scalar instructions remain scalar (good). Spec2017/x264 - the whole function idct4x4dc is vectorized using <16 x i16> instead of <16 x i32>, also zext/trunc are removed. In other places last vector zext/sext removed and replaced by extractelement + scalar zext/sext pair. MultiSource/Benchmarks/Bullet/bullet - reduce or <4 x i32> replaced by reduce or <4 x i8> Spec2017/imagick - Removed extra zext from 2 packs of the operations. Spec2017/parest - Removed extra zext, replaced by extractelement+scalar zext Spec2017/blender - the whole bunch of vector zext/sext replaced by extractelement+scalar zext/sext, some extra code vectorized in smaller types. Spec2006/gobmk - fixed cost estimation, some small code remains scalar. Original Pull Request: https://github.com/llvm/llvm-project/pull/84334 The patch has the same functionality (no test changes, no changes in benchmarks) as the original patch, just has some compile time improvements + fixes for xxhash unittest, discovered earlier in the previous version of the patch. Reviewers: Pull Request: https://github.com/llvm/llvm-project/pull/84536 -
Nikita Popov authored
All the isKnownNonZero() handling for instructions should be inside this function. This makes the structure more similar to computeKnownBitsFromOperator() as well. This may not be entirely NFC due to different depth handling.
-
lntue authored
gcc bot failures with `atanf(+-Inf)`: https://lab.llvm.org/buildbot/#/builders/250/builds/20331/steps/8/logs/stdio
-
Nikita Popov authored
Move the declaration of the Ty variable outside the NDEBUG guard and make use of it in the remainder of the function.
-
Zahira Ammarguellat authored
Predefined macro FUNCTION in clang is not returning the same string than MS for templated functions. See https://godbolt.org/z/q3EKn5zq4 For the same test case MSVC is returning: function: TestClass::TestClass function: TestStruct::TestStruct function: TestEnum::TestEnum The initial work for this was in the reverted patch (https://github.com/llvm/llvm-project/pull/66120). This patch solves the issues raised in the reverted patch.
-
Nikita Popov authored
Nowadays !range can be placed on instructions with vector of int return value. Support this case in isKnownNonZero().
-
Nikita Popov authored
-
alx32 authored
`macho-relative-method-lists.test` is failing on little endian platforms, when matching 'name'. ``` CHK32-NEXT: name 0x144 (0x{{[0-9a-f]*}}) instance_method_00 next:10'0 X error: no match found 18: name 0x144 (0x7ac) ``` This seems like the obvious fix. Co-authored-by:Alex B <alexborcan@meta.com>
-
Stephen Tozer authored
Reverted due to buildbot failures: https://lab.llvm.org/buildbot/#/builders/139/builds/61717/ This reverts commit 7ef433f6.
-
Stephen Tozer authored
This commit was mistakenly reverted in place of the actual failing commit prior; reapplying. This reverts commit db4170a4.
-
Stephen Tozer authored
Reverted due to buildbot failures: https://lab.llvm.org/buildbot/#/builders/139/builds/61717/ This reverts commit b4b7d988.
-
Leandro Lupori authored
On Darwin, -isysroot is needed and is automatically appended to %flang and %flang_fc1, so use %flang_fc1 instead to have both -fc1 and -isysroot in the expected positions and avoid errors.
-
Jeremy Morse authored
Because the RemoveDIs work is putting a debug-info bit into BasicBlock::iterator and iterators are needed for insertion, the getAsInstruction method declaration would need to use a fully defined instruction-iterator, which leads to a complicated header-inclusion-order problem. Much simpler to instead just not insert, and make it the callers problem to insert. This is proportionate because there are only four call-sites to getAsInstruction -- it would suck if we did this everywhere. --------- Merged by: Stephen Tozer <stephen.tozer@sony.com>
-
Benjamin Kramer authored
-
ostannard authored
This is re-working of #74460, which adds a soft-float ABI for AArch64. That was reverted because it causes errors when building the linux and fuchsia kernels. The problem is that GCC's implementation of the ABI compatibility checks when using the hard-float ABI on a target without FP registers does it's checks after optimisation. The previous version of this patch reported errors for all uses of floating-point types, which is stricter than what GCC does in practice. This changes two things compared to the first version: * Only check the types of function arguments and returns, not the types of other values. This is more relaxed than GCC, while still guaranteeing ABI compatibility. * Move the check from Sema to CodeGen, so that inline functions are only checked if they are actually used. There are some cases in the linux kernel which depend on this behaviour of GCC.
-
Tom Stellard authored
The baseline version calculations was assuming the minor release would always be 0.
-
Yitzhak Mandelbaum authored
This patch vastly simplifies the code handling terminators, without changing any behavior. Additionally, the simplification unblocks our ability to address a (simple) FIXME in the code to invoke `transferBranch`, even when builtin options are disabled.
-
Jeremy Morse authored
Seeing how constant-hoisting also happens to store an insertion-point in a DenseMap, this means we have to install DenseMapInfo for hashing BasicBlock::iterators and comparing them. I'm not really sure where to put the DenseMapInfo declarations as BasicBlock.h seems most logical, but that then means including DenseMap.h into pretty much all of LLVM. I've sent this up to the compile time tracker to see whether there's a major cost from this. --------- Merged by: Stephen Tozer <stephen.tozer@sony.com>
-
Orlando Cazalet-Hyams authored
If --load-bitcode-into-experimental-debuginfo-iterators is true then debug intrinsics are auto-upgraded to DbgRecords (the new debug info format). The upgrade is trivial because the two representations are semantically identical. llvm.dbg.value with 4 operands and llvm.dbg.addr intrinsics are upgraded in the same way as usual, but converted directly into DbgRecords instead of debug intrinsics.
-
Nikita Popov authored
Instead of hardcoding a specific IRBuilder type, use the base class.
-
Sergio Afonso authored
Revert "[Flang][OpenMP][Lower] NFC: Move clause processing helpers into the ClauseProcessor (#85258)" Reverting due to failing gfortran test. This reverts commit 2f2f16f3.
-
Zack Johnson authored
Fixing the type of the constant to avoid undefined behavior with respect to overflow.
-
NagyDonat authored
The checker alpha.security.ArrayBoundV2 performs bounds checking in two steps: first it checks for underflow, and if it isn't guaranteed then it assumes that there is no underflow. After this, it checks for overflow, and if that's guaranteed or the index is tainted then it reports it. This meant that in situations where overflow and underflow are both possible (but the index is either tainted or guaranteed to be invalid), the checker was reporting just an overflow error. This commit modifies the messages printed in these cases to mention the possibility of an underflow. --------- Co-authored-by:Balazs Benics <benicsbalazs@gmail.com>
-