- Dec 31, 2023
-
-
xumingjie.enna1 authored
The index constraints for the collected getelementptr instructions should be single **and** non-constant.
-
Florian Hahn authored
The check makes sure that the result for getZExtValue is guaranteed to fit into 64 bit.
-
Florian Hahn authored
Check for FP constant instead of checking for floating point types, as Undef/Poison values can have floating point types while not being FPConstants. This fixes a crash introduced by #66745 (f3b20cb1).
-
Yingwei Zheng authored
This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or `poison`. Definition of `noundef` from LangRef: ``` noundef This attribute applies to parameters and return values. If the value representation contains any undefined or poison bits, the behavior is undefined. Note that this does not refer to padding introduced by the type’s storage representation. ``` Alive2: https://alive2.llvm.org/ce/z/g8Eis6 Compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=30dcc33c4ea3ab50397a7adbe85fe977d4a400bd&to=c5e8738d4bfbf1e97e3f455fded90b791f223d74&stat=instructions:u |stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang| |--|--|--|--|--|--|--| |+0.01%|+0.01%|-0.01%|+0.01%|+0.03%|-0.04%|+0.01%| The motivation of this patch is to reduce the number of `freeze` insts and enable more optimizations.
-
Andrzej Warzynski authored
Failing bot: * https://lab.llvm.org/buildbot/#/builders/21/builds/88731 Failing test was introduced in: * https://github.com/llvm/llvm-project/pull/74598 Sending without a review as the fix is straightforward and I want to prioritize fixing the broken bot and unblocking everyone who's been affected.
-
Jie Fu authored
llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3810:14: error: unused variable 'LHS' [-Werror,-Wunused-variable] 3810 | Value *LHS, *RHS; | ^~~ llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3810:20: error: unused variable 'RHS' [-Werror,-Wunused-variable] 3810 | Value *LHS, *RHS; | -
Yingwei Zheng authored
This patch does the following folds: ``` (select A && B, T, F) -> (select A, (select B, T, F), F) (select A || B, T, F) -> (select A, T, (select B, T, F)) ``` if `(select B, T, F)` can be folded into a value or a canonicalized SPF. Alive2: https://alive2.llvm.org/ce/z/4Bdrbu The original motivation of this patch is to simplify the following pattern: ``` %.sroa.speculated.i = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i, i64 1) %add.i = add i64 %.sroa.speculated.i, %sub.ptr.div.i.i %cmp7.i = icmp ult i64 %add.i, %sub.ptr.div.i.i %cmp9.i = icmp ugt i64 %add.i, 1152921504606846975 %or.cond.i = or i1 %cmp7.i, %cmp9.i %cond.i = select i1 %or.cond.i, i64 1152921504606846975, i64 %add.i -> %.sroa.speculated.i = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i, i64 1) %add.i = add i64 %.sroa.speculated.i, %sub.ptr.div.i.i %cmp7.i = icmp ult i64 %add.i, %sub.ptr.div.i.i %max = call i64 @llvm.umax.i64(i64 %add.i, 1152921504606846975) %cond.i = select i1 %cmp7.i, i64 1152921504606846975, i64 %max ``` The later form has a better codegen for some backends. It is also more analysis-friendly than the original one. Godbolt: https://godbolt.org/z/eK6eb5jf1 Alive2: https://alive2.llvm.org/ce/z/VHlxL2 Compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=7c71d3996a72b9b024622f23bf556539b961c88c&to=638ce8666fadaca1ab2639a3c2bc52a4a8508f40&stat=instructions:u |stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang| |--|--|--|--|--|--|--| |+0.02%|-0.00%|+0.02%|-0.03%|-0.00%|-0.05%|-0.00%| It is an alternative to #76203 and #76363 because we can simplify `select (icmp eq/ne a, b), a, b` into `b` or `a`. Fixes #75784. Fixes #76043. Thank @XChy for providing additional tests. Co-authored-by:
XChy <xxs_chy@outlook.com>
-
Louis Dionne authored
This removes a long standing piece of technical debt. Most other platforms have moved all their header search path logic to the driver, but Darwin still had some logic for setting framework search paths present in the frontend. This patch moves that logic to the driver alongside existing logic that already handles part of these search paths. This is intended to be a pure refactor without any functional change visible to users, since the search paths before and after should be the same, and in the same order. The change in the tests is necessary because we would previously add the DriverKit framework search path in the frontend regardless of whether we actually need to, which we now handle correctly because the driver checks for ld64-605.1+. Fixes #75638
-
Yingwei Zheng authored
See also https://github.com/llvm/llvm-project/pull/76621
-
Kunwar Grover authored
Added @Groverkss and @Superty as default reviewers for Presburger lib paths.
-
Bharathi Ramana Joshi authored
Make identifiers::isEqual return false instead of failing assertion when identifiers are not equal.
-
Phoebe Wang authored
-
Min-Yih Hsu authored
Specifically, 'f', 'g', 'q', 'k', and 'l' addressing modes. NFC.
-
Yingwei Zheng authored
This patch removes redundant SPF support (https://github.com/llvm/llvm-project/commit/5350e1b5096aa4707aa525baf7398d93b4a4f1a5) from `computeKnownBitsFromOperator` as we always canonicalize a SPF into an intrinsic call. Compile-time improvement: http://llvm-compile-time-tracker.com/compare.php?from=3dc0638cfc19e140daff7bf1281648daca8212fa&to=8771ef0749fb2ba4304dc68d418c88ec5769346f&stat=instructions:u |stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang| |--|--|--|--|--|--|--| -0.01%|-0.01%|+0.01%|+0.00%|+0.01%|+0.04%|-0.01%|
-
Abhinav271828 authored
Fixed a bug where IntMatrix determinant() had a bug where it would try to assign to a null pointer. Added a test case that triggers this bug to avoid regressions.
-
Han-Chung Wang authored
The revision moves pack/unpack related patterns to PackAndUnpackPatterns.cpp. This follows the convention like other tensor ops. It also renames `populateSimplifyTensorPack` to `populateSimplifyPackAndUnpackPatterns` and adds a TODO item for tensor.unpack op.
-
Craig Hesling authored
Add the required CMAKE_BUILD_TYPE to the cmake configuration line. We drop the comment about enabling tests, since it is already implied and doesn't add any additional context.
-
Aiden Grossman authored
This patch makes minor adjustments to the llvm-exegesis docs for clarity. Particularly, an update is made to the list of snippet annotations to list the correct number of annotations that was not updated when the docs were originally updated for the snippet address annotation. In addition, this patch changes a decimal value for the snippet memory annotation example for an explicit hex value to emphasize that the LLVM-EXEGESIS-MEM-DEF annotation takes a hex value for the memory value.
-
Michael Maitland authored
Builtins.def says that bfloat should be represented by the 'y' character, not the 'b' character. The 'b' character is specified to represent boolean. The implementation currently uses 'b' correctly for boolean and incorrectly re-uses 'b' for bfloat. This was not caught since no builtins are emitted in build/tools/clang/include/clang/Basic/riscv_sifive_vector_builtins.inc. Don't know that we can test this without creating builtins that expose this issue, although I'm not sure we really want to do that.
-
- Dec 30, 2023
-
-
Mark de Wever authored
The status table incorrectly marks P0521R0 as nothing to do. This is not correct the function should be deprecated. During our latest monthly meeting we argreed to remove the _LIBCPP_ENABLE_CXXyy_REMOVED_FEATURES macros, therefore the new macro is not added to that global list. Implements - P0521R0 Proposed Resolution for CA 14 (shared_ptr use_count/unique) Implements parts of - P0619R4 Reviewing Deprecated Facilities of C++17 for C++20 --------- Co-authored-by:Nikolas Klauser <nikolasklauser@berlin.de>
-
Owen Pan authored
-
Yeting Kuo authored
The patch adds the instructions in Zicfiss extension. Zicfiss extension is to support shadow stack for control flow integrity. This patch is based on version [0.3.1]. [0.3.1]: https://github.com/riscv/riscv-cfi/releases/tag/v0.3.1
-
Owen Pan authored
-
Mikhail Gudim authored
The original PR had a typo which was causing a bug.
-
Owen Pan authored
-
Ben Shi authored
Co-authored-by:Balazs Benics <benicsbalazs@gmail.com>
-
Mikhail Gudim authored
These instructions are legal in the presence of Zbkb extension.
-
Alexander Shaposhnikov authored
Add tests for llvm.abs. This is a preparation for https://github.com/llvm/llvm-project/pull/73189 Test plan: ninja check-all
-
Owen Pan authored
-
Owen Pan authored
Closes #52975.
-
Aiden Grossman authored
This patch switches out the `and` keyword for && in preprocessor directives recently added to fix some buildbot failures to be consistent with the rest of the code base.
-
Enna1 authored
…r instruction. Before https://github.com/llvm/llvm-project/commit/77a609b55636dc540090ef9105c60a99cfdbd1dd, we always skip in-tree uses of the vectorized scalars in `buildExternalUses()`, that commit handles the case that if the in-tree use is scalar operand in vectorized instruction, we need to generate extract for these in-tree uses. in-tree uses remain as scalar in vectorized instructions can be 3 cases: - The pointer operand of vectorized LoadInst uses an in-tree scalar - The pointer operand of vectorized StoreInst uses an in-tree scalar - The scalar argument of vector form intrinsic uses an in-tree scalar Generating extract for in-tree uses for vectorized instructions are implemented in `BoUpSLP::vectorizeTree()`: - https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L11497-L11506 - https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L11542-L11551 - https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L11657-L11667 However, https://github.com/llvm/llvm-project/commit/77a609b55636dc540090ef9105c60a99cfdbd1dd not only generates extract for vectorized instructions, but also generates extract for original scalar instructions. There is no need to generate extract for origin scalar instrutions, as these scalar instructions will be replaced by vector instructions and get erased later. This patch marks there is no exact user for in-tree scalars that remain as scalar in vectorized instructions when building external uses, In this case all uses of this scalar will be automatically replaced by extractelement. and remove - https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L11497-L11506 - https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L11542-L11551 - https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L11657-L11667 extracts.
-
Aiden Grossman authored
a15532d7 landed a patch that added support for detecting more AMD znver2 CPUs and cleaned up some of the surrounding code, including the znver3 detection. Since one model group is 00h-0fh, I adjusted the check to include checking if the value is greater than zero. Since the value is unsigned, this is always true and gcc warns on it. This patch removes the comparison with zero to get rid of the compiler warning.
-
Aiden Grossman authored
Previous patches moved the save/restore system call register functions behind a preprocessor check, but neglected to move the constant expression array used by the functions behind the preprocessor check. This patch gates the array behind the preprocessor check to fix build failures caused by -Werror,unused-const-variable on the clang--ppc64-aix buildbot.
-
Aiden Grossman authored
Relanding this patch broke some builds (including Windows) due to certain functions not being guarded by appropriate preprocessor directives, particularly the loadImmediateSegmentRegister function not having most of its functionality only enabled on Linux. The previous relanding addressed issues with headers not being available on non-x86_64 linux, but neglected to fix issues with the header not being included, but the function still trying to use it on certain platforms, such as x86-64 windows.
-
Aiden Grossman authored
This reverts commit 8b485070. This relands commit 7c383481. This caused build failures on non-x86-64 builders as there was no preprocessor logic around the newly included headers. This has been fixed in the relanded patch.
-
Joseph Huber authored
Summary: In the future, we may have more checks for different kinds of inputs, e.g. SPIR-V. This patch simply reworks the handling to be more generic and do the magic detection up-front. The checks inside the routines are now asserts so we don't spend time checking this stuff over and over again. This patch also tweaked the bitcode check. I used a different function to get the Lazy-IR module now, as it returns the raw expected value rather than the SM diganostic. No functionality change intended.
-
Rainer Orth authored
Most asan tests `FAIL` on FreeBSD 14.0/amd64 with ``` ==17651==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. ``` With `ASAN_OPTIONS=verbosity=2` one sees: ``` ==4880==info->dlpi_name = [vdso] info->dlpi_addr = 0xffffe780 ==4880==info->dlpi_name = lib/clang/18/lib/freebsd/libclang_rt.asan-i386.so info->dlpi_addr = 0x2808a000 ``` Ignoring the vDSO as on Linux fixes this. Tested on `amd64-pc-freebsd14.0`.
-
XDeme authored
Fixes llvm/llvm-project#76314
-
Jan Patrick Lehr authored
This adds the ROCm device libs defines for both target architectures so that we an compile libc on such GPUs.
-