- Aug 30, 2023
-
-
Mikhail Goncharov authored
for 92023b15
-
Ramkumar Ramachandra authored
The current tests in iv-select-cmp.ll are not representative of clang output of common real-world C programs, which are often written with i32 induction vars, as opposed to i64 induction vars. Hence, add five tests corresponding to the following programs: int test(int *a, int n) { int rdx = 331; for (int i = 0; i < n; i++) { if (a[i] > 3) rdx = i; } return rdx; } int test(int *a) { int rdx = 331; for (int i = 0; i < 20000; i++) { if (a[i] > 3) rdx = i; } return rdx; } int test(int *a, long n) { int rdx = 331; for (int i = 0; i < n; i++) { if (a[i] > 3) rdx = i; } return rdx; } int test(int *a, unsigned n) { int rdx = 331; for (int i = 0; i < n; i++) { if (a[i] > 3) rdx = i; } return rdx; } int test(int *a) { int rdx = 331; for (long i = INT_MIN - 1; i < UINT_MAX; i++) { if (a[i] > 3) rdx = i; } return rdx; } The first two can theoretically be vectorized without a runtime-check, while the third and fourth cannot. The fifth cannot be vectorized, even with a runtime-check. This issue was found while reviewing D150851. Differential Revision: https://reviews.llvm.org/D156124 -
Egor Zhdan authored
This upstreams a part of the C++ namespaces support in Clang API Notes. The complete patch was recently merged downstream in the Apple fork: https://github.com/apple/llvm-project/pull/7230. This patch only adds the parts of the namespace support that can be cleanly applied on top of the API Notes infrastructure that was upstreamed previously. Differential Revision: https://reviews.llvm.org/D159092
-
Joseph Huber authored
Summary: Static libraries have been supported since LLVM 15.0, this entry is misleading and should be removed.
-
Serge Pavlov authored
If llvm-symbolizer finds a malformed command, it echoes it to the standard output. New versions of binutils (starting from 2.39) allow to specify an address by a symbols. Implementation of this feature in llvm-symbolizer makes the current reaction on invalid input inappropriate. Almost any invalid command may be treated as a symbol name, so the right reaction should be "symbol not found" in such case. The exception are commands that are recognized but have incorrect syntax, like "FILE:FILE:". The utility must produce descriptive diagnostic for such input and route it to the stderr. This change implements the new reaction on invalid input and is a prerequisite for implementation of symbol lookup in llvm-symbolizer. Differential Revision: https://reviews.llvm.org/D157210
-
OverMighty authored
FMADD, FMSUB instructions perform better or the same compared to indexed FMLA, FMLS. For example, the Arm Cortex-A55 Software Optimization Guide lists "FP multiply accumulate" FMADD, FMSUB instructions with a throughput of 2 IPC, whereas it lists "ASIMD FP multiply accumulate, by element" FMLA, FMLS with a throughput of 1 IPC. The Arm Cortex-A77 Software Optimization Guide, however, does not separately list "by element" variants of the "ASIMD FP multiply accumulate" instructions, which are listed with the same throughput of 2 IPC as "FP multiply accumulate" instructions. Reviewed By: samtebbs, dzhidzhoev Differential Revision: https://reviews.llvm.org/D158008
-
Georgi Mirazchiyski authored
Protect from accidental passing of an invalid MCFixupKind value which can cause an out-of-bounds access in the array. Reviewed by: arsenm Differential Revision: https://reviews.llvm.org/D158725
-
Luke Lau authored
A rotate of 8 bits of an e16 vector in either direction is equivalent to a byteswap, i.e. vrev8. There is a generic combine on ISD::ROT{L,R} to canonicalize these rotations to byteswaps, but on fixed vectors they are legalized before they have the chance to be combined. This patch teaches the rotate vector_shuffle lowering to emit these rotations as byteswaps to match the scalable vector behaviour. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D158195 -
Luke Lau authored
Given a shuffle mask like <3, 0, 1, 2, 7, 4, 5, 6> for v8i8, we can reinterpret it as a shuffle of v2i32 where the two i32s are bit rotated, and lower it as a vror.vi (if legal with zvbb enabled). We also need to make sure that the larger element type is a valid SEW, hence the tests for zve32x. X86 already did this, so I've extracted the logic for it and put it inside ShuffleVectorSDNode so it could be reused by RISC-V. I originally tried to add this as a generic combine in DAGCombiner.cpp, but it ended up causing worse codegen on X86 and PPC. Reviewed By: reames, pengfei Differential Revision: https://reviews.llvm.org/D157417
-
Florian Hahn authored
This allows to add facts even if no corresponding ICmp instruction exists in the IR. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D158837
-
dingfei authored
SVal argument 'Cond' passed in is corrupted in release mode with exception handling enabled (result in an UndefinedSVal), or changing lambda capture inside the callee can workaround this. Known problematic VS Versions: - VS 2022 17.4.4 - VS 2022 17.5.4 - VS 2022 17.7.2 Verified working VS Version: - VS 2019 16.11.25 Fixes https://github.com/llvm/llvm-project/issues/62130 Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D159163
-
Dinar Temirbulatov authored
The legalizer could keep an original mask type of masked load combined with sign/zero extend, but we have to extend the mask to a type similar to our combined load otherwise instruction selection could not lower the load. Differential Revision: https://reviews.llvm.org/D158386
-
Daniil Kovalev authored
BLAKE3 implementation does not support using arm neon on big-endian hosts: see blake3_neon.c. Setting `BLAKE3_USE_NEON` to 1 by default for all AArch64 hosts broke builds for big endian hosts. This patch fixes the behavior by introducing an additional check against `__ARM_BIG_ENDIAN` before setting `BLAKE3_USE_NEON`. Differential Revision: https://reviews.llvm.org/D159156
-
Sergei Barannikov authored
[Parser] Parse string literal arguments of 'availability', 'external_source_symbol' and 'uuid' attributes as unevaluated This is a complementary to D156237. These attributes have custom parsing logic. Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D159024
-
Juan Manuel MARTINEZ CAAMAÑO authored
This patch deletes the unused `addDefaultFunctionDefinitionAttributes(llvm::Function);` function, while it still keeps `void addDefaultFunctionDefinitionAttributes(llvm::AttrBuilder &attrs);` which is being used. Differential Revision: https://reviews.llvm.org/D158990
-
Qiu Chaofan authored
Add TLS_IE relocation type to XCOFF writer, and emit code sequence for initial-exec TLS variables. Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D156292
-
Jim Lin authored
Remove unneeded `return false` from UseExcessPrecision and move `break` inside.
-
Yingwei Zheng authored
-
Markus Böck authored
This reverts commit b26bb30b.
-
Jingu Kang authored
As @efriedma's comment, the largest number of bits that can actually be set for a v8i8 is 11 (the number of bits set in 8*255) so we can change the bound. Additionally, v16i8 type is supported as v8i8. Differential Revision: https://reviews.llvm.org/D158613
-
Cullen Rhodes authored
The arm_sme.get_tile_id op returns a scalar integer but the arm_sme.zero op lowering incorrectly uses the element type, which could be floating-point. Reviewed By: awarzynski, benmxwl-arm Differential Revision: https://reviews.llvm.org/D159080
-
Hans Wennborg authored
The compiler should not warn on code such as: class [[maybe_unused]] MaybeUnusedClass {}; class C { MaybeUnusedClass c; }; Patch based on comments on the bug by Shafik and Aaron. Fixes #61334 Differential revision: https://reviews.llvm.org/D159083 -
Martin Braenne authored
`ReferenceValue` was removed in https://reviews.llvm.org/D155922. Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D159090
-
Jim Lin authored
`git clang-format` -> `git-clang-format`
-
Serge Pavlov authored
A check pattern in clang/test/SemaCXX/template-64605.cpp contains template specialization kind (the text "implicit_instantiation"). It does not need to be checked and can be safely removed. Presence of this text in the check pattern prevents from backporting some commits to the release branch: https://github.com/llvm/llvm-project/issues/64605. It has only recently been printed and the relevant commit is not present in the release/17.x branch.
-
Johannes Doerfert authored
GlobalValues are often interesting, especially if they have local linkage. We now track all uses of those and refine potential callees with it. Effectively, if an internal function cannot reach an indirect call site, it cannot be a potential callee, even if it has its address taken.
-
Johannes Doerfert authored
The Attributor user can now set the closed world flag (`AttributorConfig.IsClosedWorldModule` or `-attributor-assume-closed-world`) in order to specialize call edges based only on available callees. That means, we assume all functions are known and hence all potential callees must be declared/defined in the module. We will use this for GPUs and LTO cases, but for now the user has to set it via a flag.
-
Johannes Doerfert authored
The callback might require an AA, e.g., to ask other AAs for information in a way that will enfore dependences.
-
Johannes Doerfert authored
After https://reviews.llvm.org/D153655, LTOPostLink metadata is not a thing anymore.
-
Garvit Gupta authored
Before accessing "getOpcode" thorugh machine instruction, check if the iterator has reached the end of Machine basic block otherwise we will crash at the assertion `!NodePtr->isKnownSentinel()`. The above assertion is hit in "Prologue/Epilogue Insertion & Frame Finalization pass". Reviewed By: craig.topper, wangpc Differential Revision: https://reviews.llvm.org/D158256
-
dingfei authored
Use 'getAs' instead of 'castAs' Reviewed By: steakhal Fixes https://github.com/llvm/llvm-project/issues/62285 Differential Revision: https://reviews.llvm.org/D158953
-
Antonio Abbatangelo authored
[clang][X86] Update excessive register save diagnostic to more closely follow the interrupt attribute spec The original diagnostic does not cover all cases according to my reading of the spec. For the interrupt attribute, the spec indicates that if the compiler does not support saving SSE, MMX, or x87 then the function should be compiled with '-mgeneral-regs-only' (GCC requires this). Alternatively, calling functions with the `no_caller_saved_registers` attribute will not clobber state and can be done without disabling these features. The warning as implemented in upstream only detects the latter case but does not consider that disabling the above features also solves the issue of these register saves being undesirable due to inefficiency. For the no_caller_saved_registers attribute, the interrupt spec also indicates that in the absence of saving SSE, MMX and x87 state, these functions should be compiled with '-mgeneral-regs-only' (also required by GCC). It does not make any statements about calling other functions with the attribute, but by extension the result is the same as with the interrupt attribute (in clang, at least). This patch handles the remaining cases by adjusting the diagnostic to: 1. Not be shown if the function is compiled without the SSE, MMX or x87 features enabled (i.e. with '-mgeneral-regs-only') 2. Also be shown for functions with the 'no_caller_saved_registers' attribute 3. In addition to advising that the function should only call functions with the `no_caller_saved_registers` attribute, the text also suggests compiling with `-mgeneral-regs-only` as an alternative. The interrupt spec is available at https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5ed3cc7b66af4758f7849ed6f65f4365be8223be and was taken from the issue that resulted in this diagnostic being added (#26787) Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D159068
-
Vitaly Buka authored
-
Brad Smith authored
As has been done for other OS's. Move the header path management to the driver. Also I noticed with D89690 that the library paths were updated for GCC 8, but the C++ header path was not. So I also fixed that while here. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D158376
-
Brad Smith authored
Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D158132
-
Brad Smith authored
After this D108637 and with FreeBSD -current and now 14 dropping support for CloudABI I think it is time to consider deleting the CloudABI support. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D158920
-
Aiden Grossman authored
This patch updates a comment at the top of the structural hash implementation that was made invalid by 64da0be1. The class is now used for more than just validating pass return status and is now the sole implementation rather than being copied from somewhere.
-
Amir Aupov authored
-
khei4 authored
-
LLVM GN Syncbot authored
-