- Nov 04, 2023
-
-
Simon Pilgrim authored
[X86] X86ISelLowering.cpp - use StringRef::starts_with/ends_with instead of startswith/endswith. NFC. startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
-
Philip Reames authored
IndVars has the existing notion of a narrow definition which is known to positive and thus both sign and zero extension kinds are actually the same operations. There's existing logic for forming a SCEV based on the extension kind and the no-wrap flags. This change extends that logic to form the opposite extension kind for a positive def if doing so is allowed by the flags. Note that we already do something analogous for the getWideRecurrence case as well.
-
Philip Reames authored
Adding test coverage in advance of upcoming changes. Note that these tests specifically use unsigned comparisons for the backends, the signed versions are fairly well handled by existing logic.
-
Craig Topper authored
If we start with an i128 shift, the initial shift amount would usually have zeros in bit 8 and above. xoring the shift amount with -1 will set those upper bits to 1. If DAGCombiner is able to prove those bits are now 1, then the shift that uses the xor will be replaced with undef. Which we don't want. Reduce the xor constant to VT.bits-1 where VT is half the size of the larger shift type. This avoids toggling the upper bits. The hardware shift instruction only uses the lower bits of the shift amount. I assume the code used NOT because the hardware doesn't use the upper bits, but that isn't compatible with the LLVM poison semantics. Fixes #71142.
-
Craig Topper authored
[RISCV][GISel] Add helper to convert a LLT size to a RegisterBankInfo::ValueMapping* for FP. (#71123) Use this to simplify code.
-
Ellis Hoag authored
The `skipPGO()` function was added in https://reviews.llvm.org/D137184. Unfortunately, it also blocked functions from being annotated (PGOUse), which I believe will cause confusion to users if a function has a profile but it is not PGO'd. The docs for `noprofile` and `skipprofile` only claim to block instrumentation, not PGO optimization: https://llvm.org/docs/LangRef.html
-
Nick Desaulniers authored
When using the inline asm constraint string "rm" (or "g"), we generally would like the compiler to choose "r", but it is permitted to choose "m" if there's register pressure. This is distinct from "r" in which the register is not permitted to be spilled to the stack. The decision of which to use must be made at some point. Currently, the instruction selection frameworks (ISELs) make the choice, and the register allocators had better be able to handle the result. Steal a bit from Storage when using register operands to disambiguate between the two cases. Add helpers/getters/setters, and print in MIR when such a register is foldable. The getter will later be used by the register allocation frameworks (and asserted by the ISELs) while the setters will be used by the instruction selection frameworks. Link: https://github.com/llvm/llvm-project/issues/20571
-
Daniel Thornburgh authored
Running the LLDB test suite in a GUI-less macOS environment (say, ssh) requires that the debugged tasks be signed with the get-task-allow entitlement.
-
Philip Reames authored
zext nneg was recently added to the IR in #67982. This patch teaches SimplifyIndVars to prefer zext nneg over *both* sext and plain zext, when a local SCEV query indicates the source is non-negative. The choice to prefer zext nneg over sext looks slightly aggressive here, but probably isn't so much in practice. For cases where we'd "remember" the range fact, instcombine would convert the sext into a zext nneg anyways. The only cases where this produces a different result overall are when SCEV knows a non-local fact, and it doesn't get materialized into the IR. Those are exactly the cases where using zext nneg are most useful. We do run the risk of e.g. a missing combine - since we haven't updated most of them yet - but that seems like a manageable risk. Note that there are much deeper algorithmic changes we could make to this code to exploit zext nneg, but this seemed like a reasonable and low risk starting point.
-
Min-Yih Hsu authored
DAGCombiner, as well as InstCombine, tend to canonicalize GE/LE into GT/LT, namely: ``` X >= C --> X > (C - 1) ``` Which sometime generates off-by-one constants that could have been CSE'd with surrounding constants. Instead of changing such canonicalization, this patch tries to swap those branch conditions post-isel, in the hope of resurfacing more constant CSE opportunities. More specifically, it performs the following optimization: For two constants C0 and C1 from ``` li Y, C0 li Z, C1 ``` To remove redundnat `li Y, C0`, 1. if C1 = C0 + 1 we can turn: (a) blt Y, X -> bge X, Z (b) bge Y, X -> blt X, Z 2. if C1 = C0 - 1 we can turn: (a) blt X, Y -> bge Z, X (b) bge X, Y -> blt Z, X This optimization will be done by PeepholeOptimizer through RISCVInstrInfo::optimizeCondBranch.
-
- Nov 03, 2023
-
-
Philip Reames authored
Update to modern output to reduce spurious deltas in upcoming change.
-
Philip Reames authored
As usual, making it easier for an upcoming test delta to be seen. Note that several of these are examples of extremely bad testing practice. Checking internal debug output (for no real purpose), and checking the result of a fully O2 + llc run instead of reducing the specific problematic pass.
-
Piotr Zegar authored
Improved modernize-make-shared check to support std::shared_ptr implementations that inherit the reset method from a base class. In GCC that class is called __shared_ptr. Fixes #64481
-
Paul Walker authored
[LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. The patch adds the follow ASM constraints: Uci => w8-w11/x8-x11 Ucj => w12-w15/x12-x15 These constraints are required for SME load/store instructions where a reduced set of GPRs are used to specify ZA array vectors. NOTE: GCC has agreed to use the same constraint syntax. -
Ben Langmuir authored
The system linker merges __objc_imageinfo flags values to select a compatible set of flags using the minimum swift version and only erroring on incompatible ABIs. Match that behaviour in the orc macho platform. One wrinkle is that the JIT can add new objects after the dylib is running code. In that case we only check for known incompatible flags and ignore the swift version. It's too late to change the flags at that point and swift version is unlikely to change runtime behaviour in practice.
-
Hassnaa Hamdi authored
This patch adds the feature flags of SME_F8F16 and SME_F8F32, and the assembly/disassembly for the following instructions of SME2: * SME: - FMLAL, FMLALL - FVDOT, FVDOTT - FVDOTB - FMOPA That is according to this documentation: https://developer.arm.com/documentation/ddi0602/2023-09 Co-authored-by:Caroline Concatto <caroline.concatto@arm.com>
-
Nikita Popov authored
update_analyze_test_checks.py will now insert check lines for empty lines, which means that all the existing test coverage will have a spurious change to check for the newline after "Predicates:". I don't think we actually want to have that newline, so drop it before it gets into more test coverage.
-
Nikita Popov authored
Fixes #71183.
-
David Spickett authored
Uses of (void) remain where they are for purposes other than an assert variable.
-
Nikita Popov authored
-
Chuanqi Xu authored
Previously, the boolean values will occupy spaces that can contain integers. It wastes the spaces especially if the boolean values are serialized consecutively. The patch tries to pack such consecutive boolean values (and enum values) so that we can save more spaces and so the times. Before the patch, we need 4.478s (in my machine) to build the std module (https://libcxx.llvm.org/Modules.html) with 28712 bytes for size of the BMI. After the patch, the time becomes to 4.374s and the size becomes to 27388 bytes for the size of the BMI. This is intended to be a NFC patch. This patch doesn't optimize all such cases. We can do it later after we have consensus on this.
-
Nikita Popov authored
Now that zext constant expressions are no longer supported, ZExtInst should be used instead.
-
Jessica Del authored
Add intrinsics to generate `s_wqm_b32` and `s_wqm_b64`. Support VGPR arguments by inserting a `v_readfirstlane`.
-
Louis Dionne authored
This Lit feature is not defined anywhere anymore and that platform is not on our radar for support, so this is basically dead code.
-
Konstantin Varlamov authored
Add a new test mode that enables the hardened mode in combination with ABI-breaking changes (only bounded iterators currently) and reenable the bounded iterator tests for `span` and `string_view`.
-
Florian Hahn authored
Test cases inspired by https://github.com/llvm/llvm-project/issues/63126.
-
Nikita Popov authored
We already handle the more general case of zero index GEPs above, so we don't need to also handle GEPs with null based and zero indices. (Strictly speaking, this code could handle the special case of an inrange gep with null base and zero indices, but that has no practical relevance.)
-
Nikita Popov authored
This code excludes vector/scalar and FP bitcasts. All other integer/pointer bitcasts are no-op bitcasts and will be removed entirely.
-
Nikita Popov authored
This is already handled in evaluateICmpRelation().
-
Paul Walker authored
Also removes a duplicate pattern.
-
Nikita Popov authored
If a pointer isn't a constant expression, global or block address, it's not guaranteed to be a null pointer. It can also be a no_cfi or dso_local_equivalent constant.
-
Nikita Popov authored
Clarify that most of this only works on pointer icmps, and remove the unnecessary isSigned parameter, as well as the ConstantInt fallback. Also perform complexity sorting upfront, so we don't need to deal with swapped cases in the individual branches.
-
Paul Walker authored
-
Christian Ulmann authored
This commit removes the no longer required type pointer helpers from the LLVM dialect conversion utils. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
-
Momchil Velikov authored
This patch adds reinterpret builtins as proposed here: https://github.com/ARM-software/acle/pull/275. The builtins take the form: sv<dst>x<N>_t svreinterpret_<dst>_<src>_x<N>(sv<src>x<N>_t op) where - <src> and <dst> designate the source and the destination type, respectively, all pairs chosen from {s8, u8, s16, u8, s32, u32, s64, u64, bf16, f16, f32, f64} - <N> designated the number of tuple elements, 2, 3 or 4 A short (overloaded) for is also provided, where the destination type is explicitly designated and the source type is deduced from the parameter type. These take the form sv<dst>x<N>_t svreinterpret_<dst>(sv<src>x<N>_t op) For example: svuin16x2_t svreinterpret_u16_s32_x2(svint32x2_t op); svuin16x2_t svreinterpret_u16(svint32x2_t op);
-
Neale Ferguson authored
* openmp/README.rst - Add s390x to those platforms supported * openmp/libomptarget/plugins-nextgen/CMakeLists.txt - Add s390x subdirectory * openmp/libomptarget/plugins-nextgen/s390x/CMakeLists.txt - Add s390x definitions * openmp/runtime/CMakeLists.txt - Add s390x to those platforms supported * openmp/runtime/cmake/LibompGetArchitecture.cmake - Define s390x ARCHITECTURE * openmp/runtime/cmake/LibompMicroTests.cmake - Add dependencies for System z (aka s390x) * openmp/runtime/cmake/LibompUtils.cmake - Add S390X to the mix * openmp/runtime/cmake/config-ix.cmake - Add s390x as a supported LIPOMP_ARCH * openmp/runtime/src/kmp_affinity.h - Define __NR_sched_[get|set]addinity for s390x * openmp/runtime/src/kmp_config.h.cmake - Define CACHE_LINE for s390x * openmp/runtime/src/kmp_os.h - Add KMP_ARCH_S390X to support checks * openmp/runtime/src/kmp_platform.h - Define KMP_ARCH_S390X * openmp/runtime/src/kmp_runtime.cpp - Generate code when KMP_ARCH_S390X is defined * openmp/runtime/src/kmp_tasking.cpp - Generate code when KMP_ARCH_S390X is defined * openmp/runtime/src/thirdparty/ittnotify/ittnotify_config.h - Define ITT_ARCH_S390X * openmp/runtime/src/z_Linux_asm.S - Instantiate __kmp_invoke_microtask for s390x * openmp/runtime/src/z_Linux_util.cpp - Generate code when KMP_ARCH_S390X is defined * openmp/runtime/test/ompt/callback.h - Define print_possible_return_addresses for s390x * openmp/runtime/tools/lib/Platform.pm - Return s390x as platform and host architecture * openmp/runtime/tools/lib/Uname.pm - Set hardware platform value for s390x
-
Nikita Popov authored
This only handles the case where the bitcast result is an integer or pointer, and the input is not FP. This means that the input can only be a vector. However, converting a comparison of the whole vector into an element-wise comparison is generally not correct. I assume that this code was originally intended to handle the case where a pointer bitcast is compared to a null pointer, which is no longer relevant with opaque pointers. Given the complete lack of test coverage, and the risk of miscompiles if this code actually did something, I'm opting to remove it entirely.
-
Nikita Popov authored
The bitcast will be folded away in this case, no need to handle it explicitly.
-
Nikita Popov authored
This is folding an icmp, so fptrunc, fpext, uitofp, sitofp cannot appear here at all. Also drop the explicit checks for trunc, fptoui, fptosi, which can appear, but are just some random subset of opcodes that are not handled by this code.
-