- May 17, 2023
-
-
Noah Goldstein authored
We can more precisely determine the upper bits doing `MaxNum / MinDenum` as opposed to only using the MSB. As well, if the `exact` flag is set, we can sometimes determine some of the low-bits. Differential Revision: https://reviews.llvm.org/D150094
-
Noah Goldstein authored
Can figure out some of the upper bits (similiar to `udiv`) if we know the sign of the inputs. As well, if we have the `exact` flag we can sometimes determine some low-bits. Differential Revision: https://reviews.llvm.org/D150093
-
Noah Goldstein authored
Differential Revision: https://reviews.llvm.org/D150092
-
Noah Goldstein authored
For `X * Y`, if there exists a subset of `X` and subset of `Y` s.t `sX * sY != 0`, then `X * Y != 0`. - See first proof: https://alive2.llvm.org/ce/z/28C9CG - NB: This is why the previous Odd case works. In knownbits we could exhaustively hunt for such a subset, but `LSB(X)` and `LSB(Y)` actually works. If `LSB(X) * LSB(Y) != 0`, then `X * Y != 0` - See proof: https://alive2.llvm.org/ce/z/p5wWid In `isKnownNonZero` we can use this as if the `LowestKnownOne(X) * LowestKnownOne(Y) != 0`, then `X * Y != 0`, and we don't need to try and other subsets. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150425 -
Noah Goldstein authored
Differential Revision: https://reviews.llvm.org/D150424
-
Austin Chang authored
Issue was an assertion failure due to an unchecked `cast`. Fix is to check the operator is `BinaryOperator` before cast so that we won't match `ConstExpr` Reviewed By: goldstein.w.n, RKSimon Differential Revision: https://reviews.llvm.org/D149699
-
Austin Chang authored
This is the implementation of D149782 The patch implements a helper function that matches and fold the following cases in the DAGCombiner: 1. `bswap(logic_op(x, bswap(y))) -> logic_op(bswap(x), y)` 2. `bswap(logic_op(bswap(x), y)) -> logic_op(x, bswap(y))` 3. `bswap(logic_op(bswap(x), bswap(y))) -> logic_op(x, y)` in multiuse case, which still reduces the number of instructions. The helper function accepts SDValue with BSWAP and BITREVERSE opcode. This patch folds the BSWAP cases and remain the BITREVERSE optimization in the future Reviewed By: RKSimon, goldstein.w.n Differential Revision: https://reviews.llvm.org/D149783
-
Austin Chang authored
Fold the following case on SelectionDAG combiner This patch includes the regression test cases ``` bswap(logic_op(x, bswap(y))) -> logic_op(bswap(x), y) bswap(logic_op(bswap(x), y)) -> logic_op(x, bswap(y)) bswap(logic_op(bswap(x), bswap(y))) -> logic_op(x, y) (with multiuse) ``` Reviewed By: goldstein.w.n Differential Revision: https://reviews.llvm.org/D149782
-
Lang Hames authored
We want to reference both byte-sized globals (@A and @C) to prevent them from being dead-stripped.
-
Craig Topper authored
-
Anlun Xu authored
Differential Revision: https://reviews.llvm.org/D150734
-
Emilia Kond authored
This check is similar to the right paren check right below it, but it doesn't need the overloaded operator check. This patch prevents brace-initialized objects that are being compared from being mis-annotated as template parameters. Fixes https://github.com/llvm/llvm-project/issues/57004 Reviewed By: owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D150629
-
Sergei Barannikov authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150704
-
YunQiang Su authored
In general, MIPS support ELF format like ELF 32-bit LSB relocatable, MIPS, MIPS64 rel2 version 1 (SYSV) and Linux's VDSO uses it. Currently clang stop CMDs like clang -march=mips64r2 -mabi=32 While it is not needed now, since the the backend support the combination now. This patch also allows something like clang --target=mipsel-linux-gnu -mabi=64 Since the triple can convert to right 64bit one automaticly. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D146269 -
Valentin Clement authored
As we are moving on with new design for the private clause representation, the reduction clause will aslo get remodeled. In order to new clash with a new dedicated reduction operation, this patch rename the current ReductionOp to ReductionOperator. It might just become obsolete once the new design is in place. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D150711
-
Roland McGrath authored
LIBC_INLINE was doubly defined in two headers. Define it only in one place. Also update a few uses to make sure it's always placed where a function attribute is valid and is used consistently on every declaration of the same function in case the attributes used in its definition must match on declarations and definitions. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D150731
-
Peter Klausler authored
I just broke the test llvm-test-suite/Fortran/gfortran/torture/execute/st_function_1.f90 with a recent patch. The bug was obvious, as is the fix, which works, so I'm just pushing it directly to make the build bots happy.
-
Sergei Barannikov authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150694
-
Roland McGrath authored
In a real-world case with functions that have many, many R_RISCV_CALL_PLT relocations due to asan and ubsan instrumentation, all these can be relaxed by an instruction and the net result is more than 65536 bytes of reduction in the output .text section that totals about 1.2MiB in final size. This changes InputSection to use a 32-bit field for bytesDropped. The RISCV relaxation keeps track in a 64-bit field and detects 32-bit overflow as it previously detected 16-bit overflow. It doesn't seem likely that 32-bit overflow will arise, but it's not inconceivable and it's cheap enough to detect it. This unfortunately increases the size of InputSection on 64-bit hosts by a word, but that seems hard to avoid. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D150722
-
Anlun Xu authored
Differential Revision: https://reviews.llvm.org/D150732
-
Anlun Xu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D149564
-
Rafael Auler authored
We have mostly harmless data races when running BinaryContext::calculateEmittedSize() in parallel, while performing split function pass. However, it is possible to end up in a state where some MCSymbols are still registered and our clean up failed. This happens rarely but it does happen, and when it happens, it is a difficult to diagnose heisenbug. To avoid this, add a new clean pass to perform a last check on MCSymbols, before they undergo our final emission pass, to verify that they are in a sane state. If we fail to do this, we might resolve some symbols to zero and crash the output binary. Reviewed By: #bolt, Amir Differential Revision: https://reviews.llvm.org/D137984
-
Kazu Hirata authored
This reverts part of commit e0039b8d. This should fix the issue reported in: https://github.com/llvm/llvm-project/issues/62546
-
LLVM GN Syncbot authored
-
Peter Klausler authored
Fortran doesn't allow inaccessible procedure bindings to be overridden, and this needs to apply to generic resolution. When resolving a type-bound generic procedure from another module, ensure only that the most extended override from its module is used if it is PRIVATE, not a later apparent override from another module. Differential Revision: https://reviews.llvm.org/D150721
-
Christian Trott authored
This patch adds std::extents. extents is one of the core classes used by std::mdspan. It describes a multi-dimensional index space with a mix of compile time and runtime sizes. Furthermore, it is templated on the index type used to describe the multi-dimensional index space. The class is designed to be highly optimizable in performance critical code sections, and is fully useable in constant expressions contexts. Testing of this class tends to be somewhat combinatorical, due to the large number of possible corner cases involved in situations where we have both runtime and compile time extents. To add to this, the class is designed to be interoperable (in particular constructible) from arguments which only need to be convertible to the index_type, but are otherwise arbitrary user types. For a larger discussion on the design of this class refer to: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0009r18.html Co-authored-by:
Damien L-G <dalg24@gmail.com> Reviewed By:...
-
Thurston Dang authored
This patch does the bare minimum to import sanitizer_common_interceptors, but without actually enabling any interceptors or meaningfully defining the COMMON_INTERCEPT macros. This will allow selectively enabling sanitizer_common interceptors (if the appropriate macros are defined), as suggested by Vitaly in D149701. Differential Revision: https://reviews.llvm.org/D150708
-
Siva Chandra Reddy authored
Few hermetic tests are failing as they are running out of memory. Differential Revision: https://reviews.llvm.org/D150724
-
Daniel Thornburgh authored
-
Peter Klausler authored
Incorrect error messages were issuing for symbol table entries with the CONTIGUOUS attribute that didn't deserve them, like host association symbols. Put the CONTIGUOUS check into CheckObjectEntity(). Differential Revision: https://reviews.llvm.org/D150712
-
Peter Klausler authored
Establish a set of optional usage warnings, and enable some only in "-pedantic" mode that, in our subjective experience with application codes, seem to issue frequently without indicating usage that really needs to be corrected. By default, with this patch the compiler should appear to be somewhat less persnickety but not less informative. Differential Revision: https://reviews.llvm.org/D150710
-
Siva Chandra Reddy authored
There are not tests currently which use the main test framework but not the `main` function from LibcTestMain.cpp. So, this change essentially simplifies by merging the *TestMain libraries with the main test libraries. Reviewed By: michaelrj, jhuber6 Differential Revision: https://reviews.llvm.org/D150698
-
Thorsten Schütt authored
This reverts commit ef1f27d6.
-
Florian Hahn authored
Adds missing test coverage for D150029.
-
Owen Pan authored
Fixes #62679. Differential Revision: https://reviews.llvm.org/D150539
-
Thorsten Schütt authored
G_BSWAP was reverted -> added to this diff. check plan: ninja check-llvm-codegen-x86 Future work: G_SUB and G_ZEXT need some modernization. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D150677
-
Fabio D'Urso authored
The AllocatorRingBuffer is allocated dynamically when Allocator is initialized. This patch adds a corresponding deinitialization call in unmapTestOnly, to avoid running out of virtual memory if the tests are run a large number of times on memory-constrained platforms. Reviewed By: Chia-hungDuan Differential Revision: https://reviews.llvm.org/D149266
-
Alex Langford authored
The documentation should have been updated in 662548c8. This updates it to be more accurate with the current design. Differential Revision: https://reviews.llvm.org/D150630
-
Alex Langford authored
The motivation behind this refactor is to be able to use DWARFAbbreviationDeclaration from LLDB. LLDB has its own implementation of DWARFAbbreviationDeclaration that is very similar to LLVM's but it has different semantics around error handling. This patch modifies llvm::DWARFAbbreviationDeclaration::extract to return an `llvm::Expected<ExtractState>` to differentiate between "I am done extracting" and "An error has occured", something which the current return type (bool) does not accurately capture. Differential Revision: https://reviews.llvm.org/D150607
-
Philip Reames authored
-