- Jul 24, 2023
-
-
Nikita Popov authored
Guard against the issue reported at https://reviews.llvm.org/rG086ee99564af#1230303.
-
Sandeep Kosuri authored
-
dingfei authored
ParmVarDecl of BlockDecl is unnecessarily dumped twice. Remove this duplication as other FunctionDecls. Fixes https://github.com/llvm/llvm-project/issues/64005 (#2) Differential Revision: https://reviews.llvm.org/D155985
-
Simon Pilgrim authored
[X86] combineConcatVectorOps - add concat(psadbw(x,y),psadbw(z,w)) -> psadbw(concat(x,z),concat(y,w)) handling
-
Simon Pilgrim authored
Also add some basic buildvector variants: build_vector(reduce_add(ctpop(x0)), reduce_add(ctpop(x1)), ...)
-
dingfei authored
BlockDecl should be invalidated because of its invalid ParmVarDecl. Fixes #1 of https://github.com/llvm/llvm-project/issues/64005 Differential Revision: https://reviews.llvm.org/D155984
-
Guray Ozen authored
This work improves how we compile the generated PTX code using the `ptxas` compiler. Currently, we rely on the driver's jit API to compile the PTX code. However, this approach has some limitations. It doesn't always produce the same binary output as the ptxas compiler, leading to potential inconsistencies in the generated Cubin files. This work introduces a significant improvement by directly utilizing the ptxas compiler for PTX compilation. By doing so, we can achieve more consistent and reliable results in generating cubin files. Key Benefits: - Using the Ptxas compiler directly ensures that the cubin files generated during the build process remain consistent with CUDA compilation using `nvcc` or `clang`. - Another advantage of this work is that it allows developers to experiment with different ptxas compilers without the need to change the compiler. Performance among ptxas compiler versions are vary, therefore, one can easily try different ptxas compilers. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D155563
-
dingfei authored
Invalidate BlockDecl with implicit return type, in case any of the return value exprs is invalid. Propagating the error info up by replacing BlockExpr with a RecoveryExpr. The idea of this fix is given by @hokein(Haojian Wu) Fix https://github.com/llvm/llvm-project/issues/63863. Differential Revision: https://reviews.llvm.org/D155396
-
pvanhout authored
D155821 should have fixed this.
-
Nikita Popov authored
The Mips MSA ABI requires that legal vector types are passed in scalar registers in packed representation. E.g. a type like v16i8 would be passed as two i64 registers. The implementation attempts to do the same for illegal vectors with non-power-of-two element counts or non-power-of-two element types. However, the SDAG argument lowering code doesn't support this, and it is not easy to extend it to support this (we would have to deal with situations like passing v7i18 as two i64 values). This patch instead opts to restrict the special argument lowering to only vectors with power-of-two elements and round element types. Everything else is lowered naively, that is by passing each element in promoted registers. Fixes https://github.com/llvm/llvm-project/issues/63608. Differential Revision: https://reviews.llvm.org/D154445
-
Jay Foad authored
This is to catch errors in an upcoming patch.
-
Dhruv Chawla authored
For load instructions, computeKnownBits only checks the range metadata. This check is already present in isKnownNonZero, so there is no need to fall through to computeKnownBits. This change gives a speed improvement of 0.12-0.18%: https://llvm-compile-time-tracker.com/compare.php?from=3c6ed559e5274307995586c1499a2c8e4e0276a0&to=78b462d8c4ae079638b728c6446da5999c4ee9f8&stat=instructions:u Differential Revision: https://reviews.llvm.org/D155958
-
Luke Lau authored
The +unaligned-scalar-mem and +unaligned-vector-mem features were added in D126085 and D149375 respectively to allow subtargets to indicate that they supported misaligned loads/stores with "sufficient" performance. This is separate from whether or not the target actually supports misaligned accesses, which could be determined from Zicclsm. This patch enables the Fast flag under the assumption that any subtarget that declares support for +unaligned-*-mem will want to opt into optimisations that take advantage of misaligned scalar accesses, such as store merging. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D150771
-
Tomasz Kamiński authored
This enables `cfg-temporary-dtors`, `cfg-rich-constructors`, and `cfg-implicit-dtors` (defaults for CSA) for CFGLifetime test, making int consistent with `cfg-scopes` test. Before the fixes implemented in https://reviews.llvm.org/D153273, this flags were incompatible. Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D155694
-
WANG Rui authored
This returns true for 8-bit and 16-bit loads, allowing ld.bu/ld.hu to be selected and avoiding unnecessary masks. Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D154819
-
WANG Rui authored
Implementing isZextFree will allow ld.bu or ld.hu to be selected rather than ld.b+mask and ld.h+mask. Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D154818
-
WANG Rui authored
This causes a trivial improvement in the legalicmpimm.ll test case. Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D154811
-
WANG Rui authored
Add tests for (X & -256) == 256 -> (X >> 8) == 1. Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: xen0n Differential Revision: https://reviews.llvm.org/D154810
-
Simon Pilgrim authored
-
Simon Pilgrim authored
[include_cleaner] IncludeSpeller.cpp - fix MSVC "not all control paths return a value" warning. NFC.
-
Simon Pilgrim authored
-
Alex Bradbury authored
I believe my previous patch, 17a58b3c introduced a warning here.
-
Alex Bradbury authored
As reported in <https://github.com/llvm/llvm-project/issues/58929>, Clang's handling of empty structs in the case of small structs that may be eligible to be passed using the hard FP calling convention doesn't match g++. In general, C++ record fields are never empty unless [[no_unique_address]] is used, but the RISC-V FP ABI overrides this. After this patch, fields of structs that contain empty records will be ignored, even in C++, when considering eligibility for the FP calling convention ('flattening'). See also the relevant psABI issue <https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/358> which seeks to clarify the documentation. Fixes https://github.com/llvm/llvm-project/issues/58929 Differential Revision: https://reviews.llvm.org/D142327
-
WANG Rui authored
This brings a trivial improvement in the and-add-lsr.ll test case. Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D154762
-
WANG Rui authored
Add tests for (and (add x, c1), (lshr y, c2)). Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D154809
-
Tomasz Kamiński authored
The `GenericTaintChecker` checker was crashing, when the taint was propagated to `AllocaRegion` region in following code: ``` int x; void* p = alloca(10); mempcy(p, &x, sizeof(x)); ``` This crash was caused by the fact that determining type of `AllocaRegion` returns a null `QualType`. This patch makes `AllocaRegion` expose its type as `void`, making them consistent with results of `malloc` or `new` that produce `SymRegion` with `void*` symbol. Reviewed By: steakhal, xazax.hun Differential Revision: https://reviews.llvm.org/D155847
-
WANG Rui authored
During the construction of SelectionDAG, there are no explicit canonicalization rules to adjust the order of operands for AND nodes. This may prevent the optimization in DAGCombiner::visitANDLike from being triggered. This patch canonicalizes the operands before matches, which can be observed to improve optimization on the RISC-V target architecture. Canonicalize: ``` and(x, add) -> and(add, x) ``` Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D154760
-
WANG Rui authored
Add tests for (and (add x, c1), (lshr y, c2)). Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D154808
-
Sander de Smalen authored
NEON `movi` is not valid in Streaming SVE mode, so use an `fmov` instruction instead for zero-initializing a FP value. Reviewed By: hassnaa-arm Differential Revision: https://reviews.llvm.org/D155432
-
Michael Platings authored
This reverts commit 8ac137ac. The code does not compile.
-
pvanhout authored
-
Sindhu Chittireddy authored
Differential Revision: https://reviews.llvm.org/D155776
-
Antonio Frighetto authored
Allow clang driver command-line recording when targeting MachO object files as well. Reviewed-by: sgraenitz Differential Revision: https://reviews.llvm.org/D155716
-
pvanhout authored
Builds on top of 6de2735c to fix remaining issues with iteration order in the MatchTable Combiner backend. See D155789 as well. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D155821
-
Yingwei Zheng authored
Fixes https://github.com/llvm/llvm-project/issues/63896 and https://github.com/rust-lang/rust/issues/113757. This patch adds facts implied by llvm.smin/smax/umin/umax intrinsics. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D155412
-
Piotr Zegar authored
Detects and suggests addressing issues with empty catch statements. Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D144748
-
Balazs Benics authored
We'll soon branch off, and start releasing clang-17. Here is a patch, adjusting the release notes for what we achieved since the last release. I used this command to inspect the interesting commits: ``` git log --oneline llvmorg-16.0.0..llvm/main \ clang/{lib/StaticAnalyzer,include/clang/StaticAnalyzer} | \ grep -v NFC | grep -v -i revert ``` This filters in CSA directories and filters out NFC and revert commits. Given that in the release-notes, we usually don't put links to commits, I'll remove them from this patch as well. I just put them there to make it easier to review for you. I tried to group the changes into meaningful chunks, and dropped some of the uninteresting commits. I've also dropped the commits that were backported to clang-16. Check out how it looks, and propose changes like usual. --- FYI the `ninja docs-clang-html` produces the html docs, including the `ReleaseNotes`. And the produced artifact will be at `build/tools/clang/docs/html/ReleaseNotes.html`. Differential Revision: https://reviews.llvm.org/D155445 -
Craig Topper authored
A couple of these tests show a need for computeKnownBits support for Zicond.
-
Kai Luo authored
According to the ELFv2 ABI > This relocation type is used to specify a function call where the TOC pointer is not initialized. It is similar to R_PPC64_REL24 in that it specifies a symbol to be resolved. If the symbol resolves to a function that requires a TOC pointer (as determined by st_other bits) then a link editor must arrange for the call to be via the global entry point of the called function. Any stub code must not rely on a valid TOC base address in r2. This patch fixes handling of `R_PPC64_REL24_NOTOC` by using the same stub code sequence as lld. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D155672
-
Yingwei Zheng authored
This patch adds some test cases from https://github.com/llvm/llvm-project/issues/63896. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D155853
-