- Nov 15, 2022
-
-
Serge Pavlov authored
Instruction G_IS_FPCLASS had an operand that represented floating-point semantics of its first operand. It allowed types that have the same length, like `bfloat16` and `half`, to be distinguished. Unfortunately, it is not sufficient, as other operation still cannot distinguish such types. Solution of this problem must be more general, so now this operand is removed. Differential Revision: https://reviews.llvm.org/D138004
-
gonglingqin authored
Only reserved registers can be read. Differential Revision: https://reviews.llvm.org/D137532
-
Med Ismail Bennani authored
Signed-off-by:Med Ismail Bennani <medismail.bennani@gmail.com>
-
Johannes Reifferscheid authored
-
zhanglimin authored
Defines enums for the LoongArch registers. Adds the register class implementation for LoongArch. Adds save and restore context functionality. This only supports 64 bits integer and float-point register implementation. Fix https://github.com/llvm/llvm-project/issues/55398 Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D137010
-
Craig Topper authored
We previously had a bug that our isel patterns weren't commutative, but that has been fixed for a while.
-
Michele Scandale authored
The conditions for which Clang emits the `unsafe-fp-math` function attribute has been modified as part of `84a9ec2f`. In the backend code generators `"unsafe-fp-math"="true"` enable floating point contraction for the whole function. The intent of the change in `84a9ec2f` was to prevent backend code generators performing contractions when that is not expected. However the change is inaccurate and incomplete because it allows `unsafe-fp-math` to be set also when only in-statement contraction is allowed. Consider the following example ``` float foo(float a, float b, float c) { float tmp = a * b; return tmp + c; } ``` and compile it with the command line ``` clang -fno-math-errno -funsafe-math-optimizations -ffp-contract=on \ -O2 -mavx512f -S -o - ``` The resulting assembly has a `vfmadd213ss` instruction which corresponds to a fused multiply-add. From the user perspective there shouldn't be any contraction because the multiplication and the addition are not in the same statement. The optimized IR is: ``` define float @test(float noundef %a, float noundef %b, float noundef %c) #0 { %mul = fmul reassoc nsz arcp afn float %b, %a %add = fadd reassoc nsz arcp afn float %mul, %c ret float %add } attributes #0 = { [...] "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" [...] "unsafe-fp-math"="true" } ``` The `"unsafe-fp-math"="true"` function attribute allows the backend code generator to perform `(fadd (fmul a, b), c) -> (fmadd a, b, c)`. In the current IR representation there is no way to determine the statement boundaries from the original source code. Because of this for in-statement only contraction the generated IR doesn't have instructions with the `contract` fast-math flag and `llvm.fmuladd` is being used to represent contractions opportunities that occur within a single statement. Therefore `"unsafe-fp-math"="true"` can only be emitted when contraction across statements is allowed. Moreover the change in `84a9ec2f` doesn't take into account that the floating point math function attributes can be refined during IR code generation of a function to handle the cases where the floating point math options are modified within a compound statement via pragmas (see `CGFPOptionsRAII`). For consistency `unsafe-fp-math` needs to be disabled if the contraction mode for any scope/operation is not `fast`. Similarly for consistency reason the initialization of `UnsafeFPMath` of in `TargetOptions` for the backend code generation should take into account the contraction mode as well. Reviewed By: zahiraam Differential Revision: https://reviews.llvm.org/D136786
-
Chuanqi Xu authored
-
Craig Topper authored
This adds a RISCVISD::ABSW to remember that we started with an i32 abs. Previously we used a DAG combine of (sext_inreg (abs)) to delay emitting a freeze from type legalization in order to make ComputeNumSignBits optimizations work on other promoted nodes. This new approach always uses negw+max even if the result doesn't need to be sign extended. This helps the RISCVSExtWRemoval pass if the sext.w is in another basic block.
-
Jonas Devlieghere authored
Fix a assertion in dsymutil coming from the Reproducer/FileCollector. When TMPDIR is empty, the root becomes a relative path, triggering an assertion when adding a relative path to the VFS mapping. This patch fixes the issue by resolving the relative path and also moves the assertion up to make it easier to diagnose these issues in the future. rdar://102170986 Differential revision: https://reviews.llvm.org/D137959
-
Chen Zheng authored
mflr is kind of expensive on Power version smaller than 10, so we should schedule the store for the mflr's def away from mflr. In epilogue, the expensive mtlr has no user for its def, so it doesn't matter that the load and the mtlr are back-to-back. Reviewed By: RolandF Differential Revision: https://reviews.llvm.org/D137423
-
River Riddle authored
This provides an optimization opportunity for clients that don't want/need to recurse attribute dictionaries.
-
Xiaodong Liu authored
When the range of the unconditional branch is overflow, the indirect branch way is used. The case when there is no scavenged register for indirect branch needs to spill register to stack. Reviewed By: SixWeining, wangleiat Differential Revision: https://reviews.llvm.org/D137821
-
Jakub Kuderski authored
Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D137978
-
Jakub Kuderski authored
This includes LIT tests over the generated ops and runtime tests. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D137965
-
TatWai Chong authored
Add a separate validation pass to check if TOSA operations match with the specification against given requirement. Perform profile type checking as the initial feature in the pass. This is an optional pass that can be enabled via command line. e.g. $mlir-opt --tosa-validate="profile=bi" for validating against the base inference profile. Description: TOSA defines a variety of operator behavior and requirements in the specification. It would be helpful to have a separate validation pass to keep TOSA operation input match with TOSA specification for given criteria, and also diminish the burden of dialect validation during compilation. TOSA supports three profiles of which two are for inference purposes. The main inference profile supports both integer and floating-point data types, but the base inference profile only supports integers. In this initial PR, validate the operations against a given profile of TOSA, so that validation would fail if a floating point tensor is present when the base inference profile is selected. Afterward, others checking will be added to the pass if needed. e.g. control flow operators and custom operators validation. The pass is expected to be able to run on any point of TOSA dialect conversion/transformation pipeline, and not depend on a particular pass run ahead. So that it is can be used to validate the initial tosa operations just converted from other dialects, the intermediate form, or the final tosa operations output. Change-Id: Ib58349c873c783056e89d2ab3b3312b8d2c61863 Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D137279
-
Roman Lebedev authored
-
Aart Bik authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D137981
-
Dmitry Vassiliev authored
Emit pragma nounroll for llvm.loop.unroll.count=1 (#pragma unroll 1). Reviewed By: tra Differential Revision: https://reviews.llvm.org/D137991
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137994
-
Stella Stamenova authored
Revert "[mlir][sparse] Macros to clean up StridedMemRefType in the SparseTensorRuntime" and "[mlir][sparse] move SparseTensorReader functions into the _mlir_ciface_ section" This reverts commits 6c22dad9 and 92bc3fb5. These broke the windows mlir buildbot.
-
Matt Arsenault authored
-
Fangrui Song authored
This reverts commit bf8381a8. There is a layering violation: LLVMAnalysis depends on LLVMCore, so LLVMCore should not include LLVMAnalysis header llvm/Analysis/ModuleSummaryAnalysis.h
-
Alexander Shaposhnikov authored
Enable using -module-summary with -S (similarly to what currently can be achieved with opt <input> -o - | llvm-dis). This is a recommit of ef9e6246. Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D137768
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137985
-
wren romano authored
Reviewed By: aartbik, Peiming Differential Revision: https://reviews.llvm.org/D137987
-
Philip Reames authored
-
Joseph Huber authored
The `LLVM_ENABLE_RUNTIMES' mode is commonly used to build runtimes that depend on an up-to-date version of clang. Currently, `libc` uses some internal variables that are not forwarded when building in this mode. This patch forwards the relevent arguments beginning with `LLVM_LIBC` to the build when built this way. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D137977
-
bixia1 authored
Reviewed By: aartbik, Peiming Differential Revision: https://reviews.llvm.org/D137964
-
wren romano authored
Depends On D137735 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137737
-
wren romano authored
In particular, this silences warnings from [-Wsign-compare]. Depends On D137681 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137735
-
wren romano authored
Systematically updates the SparseTensorRuntime to properly distinguish tensor-dimensions from storage-levels (and their associated ranks, shapes, sizes, indices, etc). With a few exceptions which are noted in the code, this ensures the runtime has all the **semantic** changes necessary to support non-permutations. (Whereas **operationally**, since we're still using `std::vector<uing64_t>` to represent the mappings, there's no way to pass in any interesting non-permutations. Changing the representation to `std::function` will be done in a separate differential.) Depends On D137680 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137681
-
Craig Topper authored
This instruction is a conditional move. It propagates sign bits from its inputs.
-
Alexander Shaposhnikov authored
This reverts commit ef9e6246 for further investigation offline. It appears to break the buildbot llvm-clang-x86_64-sie-ubuntu-fast.
-
Alexander Shaposhnikov authored
Enable using -module-summary with -S (similarly to what currently can be achieved with opt <input> -o - | llvm-dis). Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D137768
-
Jonas Devlieghere authored
This reverts commit 68efb477 because the test fails on some of the buildbots.
-
Xiang Li authored
Fix build and test error caused by https://github.com/llvm/llvm-project/commit/a2620e00ffa232a406de3a1d8634beeda86956fd# and https://github.com/llvm/llvm-project/commit/304f1d59ca41872c094def3aee0a8689df6aa398 Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D137815
-
Jonas Devlieghere authored
Fix a assertion in dsymutil coming from the Reproducer/FileCollector. When TMPDIR is empty, the root becomes a relative path, triggering an assertion when adding a relative path to the VFS mapping. This patch fixes the issue by resolving the relative path and also moves the assertion up to make it easier to diagnose these issues in the future. rdar://102170986 Differential revision: https://reviews.llvm.org/D137959
-
Andreas Hollandt authored
Reviewed By: tstellar Differential Revision: https://reviews.llvm.org/D137917
-
Nico Weber authored
Like D134013, but for COFF and Mach-O. Also expand the ELF test a bit. I at first didn't realize that `getValue()` for `-mllvm -foo=bar` would return `-foo=bar` instead of just `bar`, and so I wrote the test to check if we indeed get this wrong. We don't, but having the test for it seems nice, so I'm including it. Differential Revision: https://reviews.llvm.org/D137971
-