- Apr 27, 2023
-
-
Christian Ulmann authored
This commit moves the CFGMST.h file into the include directory. The implemented algorithm is can be helpful for downstream projects that want to use the PGO data in a non-standard way. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D149336
-
Nikita Popov authored
Make the phi non-trivial, so SCEV can't see through it.
-
skc7 authored
Legalize soffset of buffer instructions using waterfall loop. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D141030
-
Akash Banerjee authored
Cleanup how the IsBegin argument is passed and removed unnecessary variable.
-
Jingu Kang authored
-
ManuelJBrito authored
With this patch an undefined mask in a shufflevector will be printed as poison. This change is done to support the new shufflevector semantics for undefined mask elements. Differential Revision: https://reviews.llvm.org/D149210
-
Zhongyunde authored
If the condition value of SelectInst may be a poison or undef value, infer constant range at SelectInst use is incorrect, similar to D143883. Fixes https://github.com/llvm/llvm-project/issues/62401 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D149339
-
Erich Keane authored
This ended up being fixed separately by @rsmith in 1e43349e in a better/correct way. This patch adds the tests from the original, as though they are reasonably covered in his patch, explicit versions seem to have value here. Additionally, this adds a release note for 1e43349e.
-
Nikita Popov authored
SCEV expressions no longer try to preserve LCSSA form. SCEV construction will try to look through LCSSA phi nodes. As such, we also no longer need to limit this special-case fold.
-
Nikita Popov authored
Sometimes a phi can both be trivial and match the createNodeFromSelectLikePHI() fold. In that case it is generally more profitable to look through the phi node.
-
Haojian Wu authored
platforms It seems that on some platforms, the spelling include doesn't work. Make the test less strict on it.
-
OCHyams authored
Reviewed By: fdeazeve Differential Revision: https://reviews.llvm.org/D149335
-
Ilya Leoshkevich authored
Enable -fsanitize=kernel-memory support in Clang. The x86_64 ABI requires that shadow_origin_ptr_t must be returned via a register pair, and the s390x ABI requires that it must be returned via memory pointed to by a hidden parameter. Normally Clang takes care of the ABI, but the sanitizers run long after it, so unfortunately they have to duplicate the ABI logic. Therefore add a special case for SystemZ and manually emit the s390x-ABI-compliant calling sequences. Since it's only 2 architectures, do not create a VarArgHelper-like abstraction layer. The kernel functions are compiled with the "packed-stack" and "use-soft-float" attributes. For the "packed-stack" functions, it's not correct for copyRegSaveArea() to copy 160 bytes of shadow and origins, since the save area is dynamically sized. Things are greatly simplified by the fact that the vararg "use-soft-float" functions use precisely 56 bytes in order to save the argument registers to where va_arg() can find them. Make copyRegSaveArea() copy only 56 bytes in the "use-soft-float" case. The "packed-stack" && !"use-soft-float" case has no practical uses at the moment, so leave it for the future. Add tests. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D148596
-
Nikita Popov authored
-
Nikita Popov authored
We no longer try to preserve LCSSA form in SCEV representation: Nowadays, we look through LCSSA PHI nodes directly during SCEV construction. As such, this separate special case in getSCEVAtScope() is no longer needed.
-
Jie Fu authored
/data/llvm-project/mlir/unittests/Analysis/Presburger/UtilsTest.cpp:39:17: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] auto merge = [this](unsigned i, unsigned j) -> bool { return true; }; ^~~~ /data/llvm-project/mlir/unittests/Analysis/Presburger/UtilsTest.cpp:52:17: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] auto merge = [this](unsigned i, unsigned j) -> bool { return true; }; ^~~~ 2 errors generated. -
Timm Bäder authored
Function pointers can be compared for (in)equality but, but LE, GE, LT, and GT opcodes should emit an error and abort. Differential Revision: https://reviews.llvm.org/D149154
-
Haojian Wu authored
For each unused-include/missing-include diagnostic, we provide fix-all alternative to them. This patch also adds LSP ChangeAnnotation support. Differential Revision: https://reviews.llvm.org/D147684
-
Jay Foad authored
The only way known bits could help identify a known power of two is if it knows exactly which power of two it is, i.e. if it is a known constant. But in that case the value should have been simplified to a constant already. So save some compile time by not calling computeKnownBits. Differential Revision: https://reviews.llvm.org/D149325
-
Timm Bäder authored
This should fail when negating __INT_MIN__. Differential Revision: https://reviews.llvm.org/D148987
-
Mikhail Goncharov authored
-
Alexis Engelke authored
The code closely follows the X86 back-end. Applications that make heavy use of {i64, i64} returns to use two registers strongly benefit from the reduced number of SelectionDAG fallbacks. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D148346 -
Jie Fu authored
/Users/jiefu/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9794:12: error: implicit conversion turns string literal into bool: 'const char[25]' to 'bool' [-Werror,-Wstring-conversion] assert("It should not reach here"); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode13.1/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0) ~ ^ 1 error generated. -
Mariya Podchishchaeva authored
Before checking that template partial specialization is "reachable", ensure it exists. Fixes https://github.com/llvm/llvm-project/issues/61356 Reviewed By: shafik, erichkeane Differential Revision: https://reviews.llvm.org/D148330
-
Nikita Popov authored
We should be checking the current BO here, not the nested one. If the current BO has nowrap flags (and is UB on poison), then we'll fetch both operand SCEVs of that BO. We'll check the nested BO on the next iteration of the do/while loop.
-
Nikita Popov authored
These are not necessarily the same (e.g. or can become add) and this is what we're switching over in the first place.
-
Jie Fu authored
/data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9793:3: error: variable 'MaddOpc' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ /data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9854:25: note: uninitialized use occurs here Madd->setDesc(TII.get(MaddOpc)); ^~~~~~~ /data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9791:19: note: initialize the variable 'MaddOpc' to silence this warning unsigned MaddOpc; ^ = 0 /data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9793:3: error: variable 'AddOpc' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ /data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9862:46: note: uninitialized use occurs here BuildMI(*MF, MIMetadata(Root), TII.get(AddOpc), DstReg) ^~~~~~ /data/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9790:18: note: initialize the variable 'AddOpc' to silence this warning unsigned AddOpc; ^ = 0 2 errors generated. -
Mikhail Goncharov authored
Differential Revision: https://reviews.llvm.org/D149326
-
Nikita Popov authored
We can create expressions either for constant operand or i1 and/or. The implementation was inverting the latter check.
-
gilsaia authored
Added a simple normalize function to divisionrepr and added a simple unittest. Added a normalizediv call to divisionrepr's removeDuplicateDivs function, which now eliminates divs that are consistent after gcd's normalize Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D147381
-
Luo, Yuanke authored
"vpmaddwd + vpaddd" can be combined to vpdpwssd and the latency is reduced after combination. However when vpdpwssd is in a critical path the combination get less ILP. It happens when vpdpwssd is in a loop, the vpmaddwd can be executed in parallel in multi-iterations while vpdpwssd has data dependency for each iterations. If vpaddd is in a critical path while vpmaddwd is not, it is profitable to split vpdpwssd into "vpmaddwd + vpaddd". This patch is based on the machine combiner framework to acheive decision on "vpmaddwd + vpaddd" combination. The typical example code is as below. ``` __m256i foo(int cnt, __m256i c, __m256i b, __m256i *p) { for (int i = 0; i < cnt; ++i) { __m256i a = p[i]; __m256i m = _mm256_madd_epi16 (b, a); c = _mm256_add_epi32(m, c); } return c; } ``` Differential Revision: https://reviews.llvm.org/D148980 -
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D148509
-
Jay Foad authored
-
Alvin Wong authored
Windows heuristics try to detect old installer programs and run them as elevated. These heuristics include checking for certain substrings in file names, e.g. "patch", "update", "setup". When lit tries to run affected executables, it produces "[WinError 740] The requested operation requires elevation" instead. Several tests have been affected by this issue (see https://reviews.llvm.org/D137772, https://reviews.llvm.org/D148988, https://reviews.llvm.org/D149004). We should set this environment variable to disable this heuristic once and for all, instead of setting it in inidividual test suites. There should be no lit tests that legitimately want to run as elevated. Differential Revision: https://reviews.llvm.org/D149064
-
Lorenzo Chelini authored
In `bubbleUpPackOpThroughGenericOp`, we replaced the init operands with a new `tensor.empty` if the operation was a pure element-wise op. This behaviour is not wrong but not ideal because we "break" the original use-def-chain of the output operand by materializing a new `tensor.empty`. We should use `tensor.empty` as a destination *only* if the initial init operand was already a `tensor.empty`, as we do in `PushDownUnpack`. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D149250
-
Nicolai Hähnle authored
As the comment notes, the shader results in an INSERT_SUBREG with "undef" (dead) operand in the Endif block. The same can happen with REG_SEQUENCE. The register is considered dead from a liveness analysis perspective. The correct thing to do seems to be nothing: we keep the undef use of the register, the register allocator should still be able to take the liveness into account correctly. Differential Revision: https://reviews.llvm.org/D149161
-
Kito Cheng authored
Our downstream toolchain release got some issue is we set the default triple by creating symbolic link of clang like `riscv64-unknown-elf-clang`, and has lots of multi-lib config including rv32's config. However when we trying to set arch by a 32 bit CPU like generic-rv32 but got error message below: error: unsupported argument 'generic-rv32' to option '-mcpu=' `generic-rv32` is listed in the output of `-mcpu=help`, that might be confusing for user since help message say supported. So let clang driver also consider -mcpu option during computing the target triple to archvie that. Reviewed By: asb, craig.topper Differential Revision: https://reviews.llvm.org/D148124
-
Vitaly Buka authored
For primary use-case when !HWASAN_ALIASING_MODE the function is constant true and should be eliminated by optimizations. In case HWASAN_ALIASING_MODE all new calls to the functions were missing in the first place. We just not use this mode for anything but tests, so we didn't noticed. Addressing @thurston comment on D149293 Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D149305
-
Vitaly Buka authored
This applies only X86_64 where mask is 0x3F. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D149227
-