- Feb 06, 2023
-
-
Stanislav Mekhanoshin authored
If a condition register def happens past the newly created use we do not properly update LIS. It has two problems: 1) We do not extend defining segment to the end of its block marking it a live-out (this is regression after https://reviews.llvm.org/rG09d38dd7704a52e8ad2d5f8f39aaeccf107f4c56) 2) We do not extend use segment to the beginning of the use block marking it a live-in. Fixes: SWDEV-379563 Differential Revision: https://reviews.llvm.org/D143302
-
Simon Pilgrim authored
If we're shuffling an op that is extracted from the lowest subvector of a larger vector then we should try to peek through as much as possible without exceeding the root size Another step towards removing the widenSubVector call from combineX86ShufflesRecursively (Issue #45319)
-
Simon Pilgrim authored
-
Fangrui Song authored
For -fno-pic, without DW_EH_PE_indirect, the personality routine pointer in a CIE needs an R_AARCH64_ABS64 relocation. In common configurations that `__gcc_personality_v0` is defined in a shared object, this will lead to a discouraged canonical PLT entry, or, if `ld.lld -z notext` (betwen D122459 and D143136), a dynamic R_AARCH64_ABS64 relocation with an incorrect offset: https://github.com/llvm/llvm-project/issues/60392 Since GCC uses DW_EH_PE_indirect for -fno-pic code (the behavior hasn't changed since the initial port in 2012), let's follow suit by simplifying the code. ( For tiny and small code models, we use DW_EH_PE_sdata8 instead of GCC's DW_EH_PE_sdata4. This is a deliberate choice to support personality-.eh_frame offset > 2GiB. This is unneeded for small code model since "Max text segment size < 2GiB" but making `-fno-pic -mcmodel={tiny,small}` different seems unnecessary: the scenarios that uses both -fno-pic and C++ exceptions have been increasingly rare now, so there is little advantage optimizing for the little size saving with code complexity. ) --- Two clang/test/Interpreter tests would fail without 6747fc07 ([ORC] Use JITLink as the default linker for LLJIT on Linux/arm64.) Reviewed By: MatzeB Differential Revision: https://reviews.llvm.org/D143039
-
Fangrui Song authored
Similar to D131455 (-Xclang=). As well as making it convenient for some build systems, this allows `-Xarch_device '-mllvm=--inline-threshold=100'` (and `-Xarch_host`; so we don't need to allow space separators which are uncommon in driver code). Bear in mind that -mllvm options are unstable and should be avoided if possible. Reviewed By: jhuber6, yaxunl Differential Revision: https://reviews.llvm.org/D143325
-
- Feb 05, 2023
-
-
Matt Arsenault authored
is.fpclass x, fcZero is not equivalent to fcmp with 0 if denormals are treated as 0. It would be equivalent to fcZero|fcSubnormal which can be done separately; this is the minimal correctness fix. The same optimization was not ported to the GlobalISel version.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
Make the partner transform already done for nnan sources.
-
Simon Pilgrim authored
[X86] combineINSERT_SUBVECTOR - fold (insert_subvector X, (insert_subvector undef, Y, 0), Idx) -> (insert_subvector X, Y, Idx) Helps some shuffle combines that do a poor job of peeking through (insert_subvector undef, Y, 0) vector widening patterns
-
Matt Arsenault authored
is.fpclass(x, qnan|snan) -> fcmp uno x, 0.0 is.fpclass(nnan x, qnan|snan|other) -> is.fpclass(x, other) Start porting the existing combines from llvm.amdgcn.class to the generic intrinsic. Start with the ones which aren't dependent on the FP mode.
-
Paul Walker authored
This patch changes the lowering for the following builtins to emit calls to the new aarch64.sve.###.u intrinsics. svabd_x svabd_n_x svadd_x svadd_n_x svasr_x svasr_n_x svdiv_x svdiv_n_x svdivr_x svdivr_n_x svlsl_x svlsl_n_x svlsr_x svlsr_n_x svmax_x svmax_n_x svmin_x svmin_n_x svmul_x svmul_n_x svmulh_x svmulh_n_x svsub_x svsub_n_x svsubr_x svsubr_n_x Depends on D141938 Differential Revision: https://reviews.llvm.org/D141939
-
Matt Arsenault authored
This does not read canonicalized values, which matches the behavior of the basic DAG expansion using integer operations. There is a buggy expansion using FP-operations if legal which needs to be adjusted to account for this. We need to be aware of the denormal mode to switch between is.fpclass calls and fcmp. There's no real spec for denormal handling anywhere, but I believe this is the most harmonious way to deal with the question considering the requirement to not quiet input signaling nans. This matches the behavior of MSVC's _fpclass and AMDGPU's v_cmp_class_f32. fpclassify currently does not use this, and has inconsistent behavior for denormals under DAZ on different platforms (i.e. clang and gcc report FP_ZERO return FP_ZERO for a denormal under DAZ, MSVC reports FP_SUBNORMAL).
-
Matt Arsenault authored
Code is inserting an addrspacecast it shouldn't be, but that's a separate CodeExtractor bug. This also stops caring about typed pointers.
-
David Green authored
This adds basic a visitABD to optimize ABDS and ABDU nodes, similar to the existing visitAVG method. The fold I was initially interested in was folding shuffles though the binop. This also: - Marks ABDS and ABDU as commutative binops (https://alive2.llvm.org/ce/z/oCDogb and https://alive2.llvm.org/ce/z/7zrs86). - Add reassociative folds. - Add constant folding using max(x,y)-min(x,y) - Canonicalizes constants to the RHS - Folds abds x, 0 -> abs(x) (https://alive2.llvm.org/ce/z/4ZEibv) - Folds abdu x, 0 -> x (https://alive2.llvm.org/ce/z/J_rKqx) - Folds abd x, undef -> 0 (https://alive2.llvm.org/ce/z/NV6Nsv and https://alive2.llvm.org/ce/z/vs92hu). Differential Revision: https://reviews.llvm.org/D143193
-
Jonas Hahnfeld authored
According to the IR verifier, "Declaration[s] may not be in a Comdat!" This is a re-commit of 76b3f0b4 and 87d78382 with updates to the test: * Force emission of the extra-module, to trigger the bug after D138264, by providing a second symbol @g, and making the comdat nodeduplicate. (Technically only one is needed, but two should be safer.) * Name the comdat $f to avoid failure on Windows: LLVM ERROR: Associative COMDAT symbol 'c' does not exist. * Mark the test as UNSUPPORTED on macOS, MachO doesn't support COMDATs. Differential Revision: https://reviews.llvm.org/D142443
-
Simon Pilgrim authored
[AArch64] AArch64ExpandImm.cpp - fix MSVC "32-bit shift implicitly converted to 64 bits" warning. NFC.
-
Matt Arsenault authored
We were assuming we could rely on the flat scratch init detection to imply if there are possible flat addressed stack objects, which doesn't work outside of a kernel. We should have a way to prove if a given flat access can't access the stack. We could use a not-stack parameter attribute to avoid these splits. Make the minimally correct change for GlobalISel; I'll address this better in my larger patch to rewrite load and store legalization. Fixes: SWDEV-218237
-
Lang Hames authored
Also updates the OrcCAPIsTest unit test to enable the C API tests on Linux.
-
Owen Anderson authored
instructions. Credit to czwarich for figuring out the algorithm to test for this. Re-applied with fix for ubsan error on out-of-range shift. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D140952
-
Owen Anderson authored
This reverts commit 8d433a0a due to test failures on CodeGen/AArch64/GlobalISel/store-merging.ll
-
Petr Hosek authored
This addresses issue introduced accidentally in D117263.
-
Owen Anderson authored
instructions. Credit to czwarich for figuring out the algorithm to test for this. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D140952
-
Craig Topper authored
After D142953, non-zero cases were handled in RISCVDAGToDAGISel::Select and zeros were handled with isel patterns. The zeros cases are sufficiently similar to zero that we might as well handle them all together. We already needed to detect the cases to skip out to tablegen.
-
Craig Topper authored
For RV32, we now use scalar fcvt of x0, scalar fneg, splat scalar fp to vector. For RV64, we use li of 1, slli by 63, splat GPR to vector.
-
Craig Topper authored
This avoids multiple places needing to convert it to SDValue. It's simpler to convert it to SDNode * in the places that need it.
-
Craig Topper authored
-
Craig Topper authored
-
Craig Topper authored
-
Nikolas Klauser authored
We renamed the `_LIBCPP_CONSTEXPR_` a while ago. This matches the change for `_LIBCPP_EXPLICIT_`. Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D143165
-
Nikolas Klauser authored
Other macros that disable parts of the library are named `_LIBCPP_HAS_NO_WHATEVER`. Reviewed By: ldionne, Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D143164
-
Petr Hosek authored
Currently, for BUILTIN_TARGETS and RUNTIME_TARGETS you can either use the special "default" value, or a target triple. For the "default" value, we don't set any target triple and passthrough a subset of CMake variables into the subbuild. This is typically used on Darwin where we build universal binaries and a single target triple therefore isn't sufficient. For the target triple value, you can set arbitrary CMake variables through RUNTIMES_<target>_<variable>, but we always set target triple to <target>. This gives more flexibility, because we can precisely control what variables are set in the subbuild, but is unsuitable for platforms like Darwin. To address this, we would like to introduce a third option which is similar to the second option, except we won't set target triple in the subbuild (you can always do so yourself by setting the appropriate CMake variable, e.g. RUNTIMES_<name>_CMAKE_C_COMPILER_TARGET=<triple>). This change is a first step in that direction, by eliminating the support of target triples from builtin_register_target and runtime_register_target helper functions. Differential Revision: https://reviews.llvm.org/D117263
-
Khem Raj authored
Pass -D_FILE_OFFSET_BITS=64 to compiler flags on 32bit glibc based systems. This will make sure that 64bit versions of LFS functions are used e.g. seek will behave same as lseek64. Also revert [1] partially because this added a cmake test to detect lseek64 but then forgot to pass the needed macro to actual compile, this test was incomplete too since libc implementations like musl has 64bit off_t by default on 32bit systems and does not bundle[2] -D_LARGEFILE64_SOURCE under -D_GNU_SOURCE like glibc, which means the compile now fails on musl because the cmake check passes but we do not have _LARGEFILE64_SOURCE defined. Using the *64 function was transitional anyways so use -D_FILE_OFFSET_BITS=64 instead [1] https://github.com/llvm/llvm-project/commit/8db7e5e4eed4c4e697dc3164f2c9351d8c3e942b [2] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D139752
-
Fangrui Song authored
-
Simon Pilgrim authored
Fixes #60413
-
Florian Hahn authored
Update a few tests to add users to loads to avoid them being optimized out by future changes. In cases the unused loads didn't matter for the test, remove them.
-
Fangrui Song authored
D122069 incorrectly uses StringMap iteration order (https://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringmap-h). Switch to MapVector.
-
Jonas Hahnfeld authored
A number of AArch64 bots report errors in clang-repl, for example https://lab.llvm.org/buildbot/#/builders/197/builds/3920 This reverts commit 87d78382.
-
Nico Weber authored
-
Mircea Trofin authored
e006c7df already covered the regalloc one.
-