- Feb 21, 2023
-
-
Nikita Popov authored
As described in PR54002, the "icmp of load from global" special case in CaptureTracking is incorrect, as is the InstSimplify code that makes use of it. This moves the special case from CaptureTracking into InstSimplify to limit its scope to the buggy transform only, and not affect other code using CaptureTracking as well.
-
Kazu Hirata authored
This patch precommits a test for: https://github.com/llvm/llvm-project/issues/60374
-
Jessica Del authored
These tests show inefficient behavior that will be optimized by a later change. By using Known Bits Analysis, we can avoid unnecessary multiplications or additions with 0.
-
Alexis Murzeau authored
Since 37e6a4f9, `void` and `unsigned char` were added to primitive types for hungarian notation. This commit adds them to the documentation. Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D144422
-
Serge Pavlov authored
If an enumeration represents a set of bit flags, using the macro LLVM_MARK_AS_BITMASK_ENUM can make operations with such enumeration more convenient. It however brings problems if the enumeration is non-scoped. As the macro adds an item LLVM_BITMASK_LARGEST_ENUMERATOR to the enumeration type, only one such type may be declared as bitmask. This problem could be solved by convertion of the enumeration to scoped, but it requires static_casts in new places and the convenience can be eliminated. This change introduces a new macro LLVM_DECLARE_ENUM_AS_BITMASK, which allows non-invasive convertion of an enumeration into bitmask. It provides specialization to trait classes, which previously were built based on presence of LLVM_BITMASK_LARGEST_ENUMERATOR in the enumeration. The macro must be specified in global or llvm namespace because the trait classes are declared in llvm namespace. Differential Revision: https://reviews.llvm.org/D144202
-
Konstantina Mitropoulou authored
Reviewed By: foad Differential Revision: https://reviews.llvm.org/D144312
-
Uday Bondhugula authored
Fix obvious bug in `addAffineParallelOpDomain` that would lead to incorrect domain constraints for any affine.parallel op with dimensionality greater than one. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D144349
-
Uday Bondhugula authored
Add replaceUsesWithIf on Operation along the lines of Value::replaceUsesWithIf. This had been missing on Operation and is convenient to replace multi-result operations' results conditionally. Reviewed By: lattner Differential Revision: https://reviews.llvm.org/D144348
-
eopXD authored
Signed-off-by:eop Chen <eop.chen@sifive.com>
-
esmeyi authored
Summary: Currently we lower MEMCPY/MEMMOVE/MEMSET/BZERO to the corresponding libc functions. And the libc functions call the millicode functions on AIX. We can lower these intrinsics directly to save one call layer. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D143997
-
Wang, Xin10 authored
For now X86InstrInfo.td has many definitions for some instrs and patterns which I think should not exist here, extract them and move to other files. It will be more clear to me that X86InstrInfo just define some X86 specific properties and would not include detailed instrs definition. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D144244
-
Kazu Hirata authored
This is for: https://github.com/llvm/llvm-project/issues/60854
-
Kazu Hirata authored
Without this patch: return X < 4 ? 3 : 2; return X < 9 ? 7 : 6; are compiled as: 31 c0 xor %eax,%eax 83 ff 04 cmp $0x4,%edi 0f 93 c0 setae %al 83 f0 03 xor $0x3,%eax 31 c0 xor %eax,%eax 83 ff 09 cmp $0x9,%edi 0f 92 c0 setb %al 83 c8 06 or $0x6,%eax respectively. With this patch, we generate: 31 c0 xor %eax,%eax 83 ff 04 cmp $0x4,%edi 83 d0 02 adc $0x2,%eax 31 c0 xor %eax,%eax 83 ff 04 cmp $0x4,%edi 83 d0 02 adc $0x2,%eax respectively, saving 3 bytes while reducing the tree height. This patch recognizes the equivalence of OR and ADD (if bits do not overlap) and delegates to combineAddOrSubToADCOrSBB for further processing. The same applies to the equivalence of XOR and SUB. Differential Revision: https://reviews.llvm.org/D143838
-
Luo, Yuanke authored
-
Simon Pilgrim authored
As noticed on D144128, we need better AVX512 coverage for GEP vectorization
-
Alexandre Ganea authored
This fixes the following warning on Windows with latest Clang: ``` [160/3057] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.obj In file included from C:/git/llvm-project/llvm/lib/Support/Signals.cpp:260: C:/git/llvm-project/llvm/lib/Support/Windows/Signals.inc(834,15): warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] if (RetCode == (0xE0000000 | EX_IOERR)) ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.``` -
Simon Pilgrim authored
As noticed on D144128, we need better AVX512 coverage for GEP vectorization
-
Brad Smith authored
Add a member function isPPC64ELFv2ABI() to determine what ABI is used on the 64-bit PowerPC big endian operating environment. Reviewed By: nemanjai, dim, pkubaj Differential Revision: https://reviews.llvm.org/D144321
-
Peter Cooper authored
Reviewed By: kubamracek, yln, wrotki, dvyukov Differential Revision: https://reviews.llvm.org/D143959
-
Luke Lau authored
This is a test for an upcoming patch that proposes to change the default LMUL used by the loop vectorizer from 1 to 2 Reviewed By: reames Differential Revision: https://reviews.llvm.org/D143722
-
Joseph Huber authored
Summary: For some reason, this variable was set after where it was used. Causing weird behaviour with including the standard headers. Fix it.
-
Sanjay Patel authored
The pair of div folds was just added with: 4966d8eb But as noted in the post-commit review, we don't actually need the no-remainder requirement for an unsigned division (still need the no-unsigned-wrap though): https://alive2.llvm.org/ce/z/qHjK3Q
-
Felipe de Azevedo Piovezan authored
The function `CGDebugInfo::EmitFunctionDecl` is supposed to create a declaration -- never a _definition_ -- of a subprogram. This is made evident by the fact that the SPFlags never have the "Declaration" bit set by that function. However, when `EmitFunctionDecl` calls `DIBuilder::createFunction`, it still tries to fill the "Declaration" argument by passing it the result of `getFunctionDeclaration(D)`. This will query an internal cache of previously created declarations and, for most code paths, we return nullptr; all is good. However, as reported in [0], there are pathological cases in which we attempt to recreate a declaration, so the cache query succeeds, resulting in a subprogram declaration whose declaration field points to another declaration. Through a series of RAUWs, the declaration field ends up pointing to the SP itself. Self-referential MDNodes can't be `unique`, which causes the verifier to fail (declarations must be `unique`). We can argue that the caller should check the cache first, but this is not a correctness issue (declarations are `unique` anyway). The bug is that `CGDebugInfo::EmitFunctionDecl` should always pass `nullptr` to the declaration argument of `DIBuilder::createFunction`, expressing the fact that declarations don't point to other declarations. AFAICT this is not something for which any reasonable meaning exists. This seems a lot like a copy-paste mistake that has survived for ~10 years, since other places in this file have the exact same call almost token-by-token. I've tested this by compiling LLVMSupport with and without the patch, O2 and O0, and comparing the dwarfdump of the lib. The dumps are identical modulo the attributes decl_file/producer/comp_dir. [0]: https://github.com/llvm/llvm-project/issues/59241 Differential Revision: https://reviews.llvm.org/D143921
-
Alexis Murzeau authored
Add `unsigned char` and `void` types to recognized PrimitiveTypes. Fixes: #60670 Depends on D144037 Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D144041
-
Alexis Murzeau authored
The previous way to test hungarian notation doesn't check CHECK-FIXES. This will allow readability-identifier-naming tests of Hungarian notation to keep the use of an external .clang-tidy file (not embedded within the .cpp test file) and properly check CHECK-FIXES. Also, it turns out the hungarian notation tests use the wrong .clang-tidy file, so fix that too to make these tests ok. This is a part of a fix for issue https://github.com/llvm/llvm-project/issues/60670. Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D144037
-
Sanjay Patel authored
The check line was not enabled until bfb1559f, and then it was excessive, so the test started failing.
-
Sanjay Patel authored
((X * C2) + C1) / C2 --> X + C1/C2 https://alive2.llvm.org/ce/z/P66io8 https://alive2.llvm.org/ce/z/vghegw This could be made more general -- the multiplier could be a multiple of the divisor -- but this is the pattern from issue #60754.
-
Sanjay Patel authored
issue #60754
-
Sanjay Patel authored
-
Tiwari Abhinav Ashok Kumar authored
Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D144412
-
Kazu Hirata authored
-
Ricardo Jesus authored
Tests in sve-saba.ll currently exhibit inefficient codegen. Differential Revision: https://reviews.llvm.org/D144399
-
- Feb 20, 2023
-
-
zhongyunde authored
Fix https://github.com/llvm/llvm-project/issues/60546 Reviewed By: nikic, efriedma, RKSimon, spatel Differential Revision: https://reviews.llvm.org/D143883
-
Nikita Popov authored
InstCombine currently performs a constant folding attempt as part of the main InstCombine loop, before visiting the instruction. However, each visit method will also attempt to simplify the instruction, which will in turn constant fold it. (Additionally, we also constant fold instructions before the main InstCombine loop and use a constant folding IR builder, so this is doubly redundant.) There is one place where InstCombine visit methods currently don't call into simplification, and that's casts. To be conservative, I've added an explicit constant folding call there (though it has no impact on tests). This makes for a mild compile-time improvement and in particular mitigates the compile-time regression from enabling load simplification in be88b581. Differential Revision: https://reviews.llvm.org/D144369
-
zhongyunde authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D144372
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D144389
-
Nikita Popov authored
foldAllocaCmp() checks whether the alloca is not captured (ignoring the icmp). Replace the manual implementation of escape analysis with CaptureTracking. The primary practical difference is that CaptureTracking handles nocapture arguments, while foldAllocaCmp() was using a hardcoded list. This is basically just the CaptureTracking refactoring from D120371 without the other changes.
-
Joseph Huber authored
This patch adjusts the way dependencies are handled in the packaed version of the GPU libc runtime. Previously the files were not getting updated properly in the install when they changed. Depends on D144214 Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D144280
-
Joseph Huber authored
This patch unifies the handling of generating the GPU build targets between the `add_entrypoint_library` and the `add_object_library` functions. The `_build_gpu_objects` function will create two targets. One contains a single object file with several GPU binaries embedded in it, a so-called fatbinary. The other is a direct compile of the supported target to be used internally only. This patch pulls out some of the properties logic so that we can handle both more easily. This patch also required adding an ovverride `NO_GPU_BUILD` for cases when we only want to build the source file as normal. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D144214
-
Ricardo Jesus authored
Differential Revision: https://reviews.llvm.org/D144376
-