- Mar 24, 2023
-
-
Stefan Gränitz authored
-
Sven van Haastregt authored
-
Kadir Cetinkaya authored
Fixes https://github.com/llvm/llvm-project/issues/61652 Differential Revision: https://reviews.llvm.org/D146732
-
Karl-Johan Karlsson authored
When compiling compiler-rt with -fsanitize=undefined and running testcases you end up with the following warning: UBSan:/repo/uabkaka/llvm-project/compiler-rt/lib/builtins/int_mulo_impl.inc:24:23: signed integer overflow: -1 * -2147483648 cannot be represented in type 'si_int' (aka 'long') This can be avoided by doing the multiplication in a matching unsigned variant of the type. This was found in an out of tree target. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D146623
-
Ben Shi authored
The 'LPM' instruction has three forms: ------------------------ | form | feature | | ---------- | --------| | LPM | hasLPM | | LPM Rd, Z | hasLPMX | | LPM Rd, Z+ | hasLPMX | ------------------------ The second form is always selected in ISelDAGToDAG, even on devices without FeatureLPMX. This patch emits "LPM + MOV" on devices with only FeatureLPM. Reviewed By: jacquesguan Differential Revision: https://reviews.llvm.org/D141246
-
David Sherwood authored
Quite a few vectoriser tests were using a trip count of 1024, which meant: 1. For fixed-length VFs we would never actually tail-fold, e.g. see Transforms/LoopVectorize/RISCV/uniform-load-store.ll. This is because we can prove at compile-time there will never be a scalar tail. 2. As of D146199 the same optimisation mentioned above will also apply to scalable VFs too. I've changed all such trip counts to be 1025 instead. Differential Revision: https://reviews.llvm.org/D146219
-
Akshay Khadse authored
Fixes some usages of the "auto" keyword to avoid creation of copies. Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D146694
-
mydeveloperday authored
Regenerate the style documentation, requires some minor sphinx changes to avoid warnings Reviewed By: klimek Differential Revision: https://reviews.llvm.org/D146704
-
Stefan Gränitz authored
This first version lays the foundations for AArch32 support in JITLink. ELFLinkGraphBuilder_aarch32 processes REL-type relocations and populates LinkGraphs from ELF object files for both big- and little-endian systems. The ArmCfg member controls subarchitecture-specific details throughout the linking process (i.e. it's passed to ELFJITLinker_aarch32). Relocation types follow the ABI documentation's division into classes: Data (endian-sensitive), Arm (32-bit little-endian) and Thumb (2x 16-bit little-endian, "Thumb32" in the docs). The implementation of instruction encoding/decoding for relocation resolution is implemented symmetrically and is testable in isolation (see AArch32 category in JITLinkTests). Callable Thumb functions are marked with a ThumbSymbol target-flag and stored in the LinkGraph with their real addresses. The thumb-bit is added back in when the owning JITDylib requests the address for such a symbol. The StubsManager can generate (absolute) Thumb-state stubs for branch range extensions on v7+ targets. Proper GOT/PLT handling is not yet implemented. This patch is based on the backend implementation in ez-clang and has just enough functionality to model the infrastructure and link a Thumb function `main()` that calls `printf()` to dump "Hello Arm!" on Armv7a. It was tested on Raspberry Pi with 32-bit Raspbian OS. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D144083
-
Luke Lau authored
Reviewed By: reames Differential Revision: https://reviews.llvm.org/D146710
-
Andrzej Warzynski authored
This patch extends the `createConst` method so that it can generate constant vectors (it can already generate scalars). This change is required to be able to apply the converter for `arith.floordivsi` (i.e. `FloorDivSIOpConverter`) to vectors. While `arith.floordivsi` is my main motivation for this change, this patch should also allow other Arith ops to be converted in vector cases. In my example, the Linalg vectorizer updates `arith.floordivsi` to operate on vectors and hence the need for this change. Differential Revision: https://reviews.llvm.org/D146741
-
luxufan authored
-
Max Kazantsev authored
-
Martin Storsjö authored
When LLVM_NATIVE_TOOL_DIR was introduced in d3da9067 / D131052, it consisted of refactoring a couple cases of manual logic for tools in clang-tools-extra/clang-tidy, clang-tools-extra/pseudo/include and mlir/tools/mlir-linalg-ods-gen. The former two had the same consistent behaviour while the latter was slightly different, so the refactoring would end up slightly adjusting one or the other. The difference was that the clang-tools-extra tools respected the external variable for setting the tool name, regardless of the LLVM_USE_HOST_TOOLS variable, while mlir-linalg-ods-gen tool only checked its external variable if LLVM_USE_HOST_TOOLS was set. LLVM_USE_HOST_TOOLS is supposed to be enabled automatically whenever cross compiling, so this shouldn't have been an issue. In https://github.com/llvm/llvm-project/issues/60784, it seems like some users do cross compile LLVM, without CMake knowi...
-
Johannes de Fine Licht authored
This revealed a test case that wasn't hitting the intended branch because the inlinees had no function definition. Depends on D146628 Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D146633
-
Martin Storsjö authored
This test somewhat unconventionally assembles both aarch64 and x86 object files. This fixes test failures in build configurations with the aarch64 target enabled but x86 target disabled.
-
luxufan authored
-
Dmitry Chernenkov authored
This reverts commit 25557aa3.
-
Tobias Gysi authored
The revision switches the remaining LLVM dialect tests to use opaque pointers. Selected tests are copied to a postfixed test file for the time being. A number of tests disappear once we fully switch to opaque pointers. In particular, all tests that check verify a pointer element type matches another type as well as tests of recursive types. Part of https://discourse.llvm.org/t/rfc-switching-the-llvm-dialect-and-dialect-lowerings-to-opaque-pointers/68179 Reviewed By: Dinistro, zero9178 Differential Revision: https://reviews.llvm.org/D146726
-
Carlos Galvez authored
[clang-tidy][NFC] Improve naming convention in google-readability-avoid-underscore-in-googletest-name According to the Google docs, the convention is TEST(TestSuiteName, TestName). Apply that convention to the source code, test and documentation of the check. Differential Revision: https://reviews.llvm.org/D146713
-
Michael Platings authored
The new algorithm is: 1. Find all multilibs with flags that are a subset of the requested flags. 2. If more than one multilib matches, choose the last. In addition a new selection mechanism is permitted via an overload of MultilibSet::select() for which multiple multilibs are returned. This allows layering multilibs on top of each other. Since multilibs are now ordered within a list, they no longer need a Priority field. The new algorithm is different to the old algorithm, but in practise the old algorithm was always used in such a way that the effect is the same. The old algorithm was to find the set intersection of the requested flags (with the first character of each removed) with each multilib's flags (ditto), and for that intersection check whether the first character matched. However, ignoring the first characters, the requested flags were always a superset of all the multilibs flags. Therefore the new algorithm can be used as a drop-in replacement. The exception is Fuchsia, which needs adjusting slightly to set both fexceptions and fno-exceptions flags. Differential Revision: https://reviews.llvm.org/D142905
-
Kazu Hirata authored
This patch precommits a test for: https://github.com/llvm/llvm-project/issues/61365
-
Dave Lee authored
-
Xiang1 Zhang authored
Reviewed By: Luo yuanke Differential Revision: https://reviews.llvm.org/D146683
-
Kazu Hirata authored
This patch adds tests for umax(x, 1u). This patch fixes: https://github.com/llvm/llvm-project/issues/60233 It turns out that commit 86b4d864 on Feb 8, 2023 already performs the instcombine transformation proposed in the issue, so the issue requires no change on the codegen side.
-
Xiaodong Liu authored
Keep `EnableLoopDataPrefetch` option off for now because we need a few more TTIs and ISels. This patch is inspired by http://reviews.llvm.org/D17943. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D146600
-
Jun Zhang authored
Alive2: https://alive2.llvm.org/ce/z/dxxD7B Fixes: https://github.com/llvm/llvm-project/issues/60690 Signed-off-by:
Jun Zhang <jun@junz.org> Differential Revision: https://reviews.llvm.org/D146637
-
Jun Zhang authored
Differential Revision: https://reviews.llvm.org/D146636 Signed-off-by:
Jun Zhang <jun@junz.org>
-
XinWang10 authored
In this file, most of the line don't have trailing spaces, but some of them have. To keep consistent, remove the trailing spaces. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D146697
-
Kazu Hirata authored
Without this patch, std::bit_ceil<uint32_t> is compiled as: %dec = add i32 %x, -1 %lz = tail call i32 @llvm.ctlz.i32(i32 %dec, i1 false) %sub = sub i32 32, %lz %res = shl i32 1, %sub %ugt = icmp ugt i32 %x, 1 %sel = select i1 %ugt, i32 %res, i32 1 With this patch, we generate: %dec = add i32 %x, -1 %ctlz = tail call i32 @llvm.ctlz.i32(i32 %dec, i1 false) %sub = sub nsw i32 0, %ctlz %and = and i32 %1, 31 %sel = shl nuw i32 1, %and ret i32 %sel https://alive2.llvm.org/ce/z/pwezvF This patch recognizes the specific pattern from std::bit_ceil in libc++ and libstdc++ and drops the conditional move. In addition to the LLVM IR generated for std::bit_ceil(X), this patch recognizes variants like: std::bit_ceil(X - 1) std::bit_ceil(X + 1) std::bit_ceil(X + 2) std::bit_ceil(-X) std::bit_ceil(~X) This patch fixes: https://github.com/llvm/llvm-project/issues/60802 Differential Revision: https://reviews.llvm.org/D145299
-
Kazu Hirata authored
-
Rahul Joshi authored
Differential Revision: https://reviews.llvm.org/D146769
-
Arthur Eubanks authored
By making the 64 bit integer literals unsigned. Otherwise some of them are unexpectedly sign extended (and the compiler rightly diagnosed this with warnings) Initially added in D80506. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D146667
-
LiaoChunyu authored
On targets without ADDCARRY or ADDE, we need to emit a separate SETCC to determine carry from the low half to the high half. The high half is calculated by a series of ADDs. When RHSLo and RHSHi are -1, without this patch, we get: Hi = (add (add LHSHi,(setult Lo, LHSLo), -1) Where as with the patch we get: Hi = (sub LHSHi, (seteq LHSLo, 0)) Only RHSLo is -1 we can instead do (setne Lo, 0). Similar to gcc: https://godbolt.org/z/M83f6rz39 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D146635
-
Quinn Dawkins authored
Following up on the comments in https://reviews.llvm.org/D144108 this patch refactors the im2col conversion patterns for `linalg.conv_2d_nhwc_hwcf` and `linalg.conv_2d_nchw_fchw` convolutions to use gather semantics for the im2col packing `linalg.generic`. Follow up work can include a similar pattern for depthwise convolutions and a generalization of the patterns here to work with any `LinalgOp` as well. Differential Revision: https://reviews.llvm.org/D144678
-
Bruno Cardoso Lopes authored
Plumbing from the language level to the assume intrinsics with separate_storage operand bundles. Patch by David Goldblatt (davidtgoldblatt) Differential Revision: https://reviews.llvm.org/D136515
-
Fangrui Song authored
-
Fangrui Song authored
They have been obsoleted for a long time and D146565 recently removed Clang support.
-
Fangrui Song authored
[Driver][test] Remove remnant mips*-linux-android tests after 805f51f9
-
Heejin Ahn authored
Misc. cleanups for `WebAssemblyDebugValueManager`. - Use `Register` for registers - Simpler for loop iteration - Rename a variable - Reorder methods - Reduce `SmallVector` size for `DBG_VALUE`s to 1; one def usually have a single `DBG_VALUE` attached to it in most cases - Add a few more lines of comments Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D146743
-