- Jul 22, 2022
-
-
Michael Buch authored
-
Haojian Wu authored
-
Sam McCall authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Tarun Prabhu authored
Lower F08 maskl and maskr intrinsics. Differential Revision: https://reviews.llvm.org/D129296
-
Tarun Prabhu authored
Lower F08 shift (shiftl, shiftr, shifta) and combined shift (dshiftl, dshiftr) intrinsics. The combined shift intrinsics are implemented using the definitions of shiftl and shiftr as described by the standard. For non-conformant arguments to the shift intrinsics, the implementation tries to replicate the behavior of other compilers if most of the other behave consistently. Differential Revision: https://reviews.llvm.org/D129316
-
Tarun Prabhu authored
Test compile-time folding of F08 maskl and maskr intrinsics. Differential Revision: https://reviews.llvm.org/D129663
-
Tarun Prabhu authored
Test compile-time folding of F08 shift (shiftl, shiftr, shifta) and combined shift (dshiftl, dshiftr) intrinsics. Differential Revision: https://reviews.llvm.org/D129696
-
Tarun Prabhu authored
Lower F08 bit population count intrinsics popcnt, poppar, leadz and trailz. popcnt, leadz and trailz are implemented using the corresponding MLIR math intrinsics. poppar is implemented in terms of popcnt. Differential Revision: https://reviews.llvm.org/D129584
-
Johannes Doerfert authored
If a function is non-recursive we only performed intra-procedural reasoning for reachability (via AA::isPotentiallyReachable). However, if it is re-entrant that doesn't mean we can't reach. Instead of this problematic logic in the reachability reasoning we utilize logic in AAPointerInfo. If a location is for sure written by a function it can be re-entrant or recursive we know only intra-procedural reasoning is sufficient.
-
Max Kazantsev authored
The existing code doesn't expect dummy values (undef, poison, null-derived constants etc) as arguments of these intrinsics. However, they can be there in unreached code. Currently we fail trying to find base for them. Handle these cases separately. Return null as base for them to be consistent with the handling in the main algorithm in findBaseDefiningValue. Differential Revision: https://reviews.llvm.org/D129561 Reviewed By: apilipenko
-
Uday Bondhugula authored
Add affine.if canonicalization to compose affine.apply ops into its set and operands. This eliminates affine.apply ops feeding into affine.if ops. Differential Revision: https://reviews.llvm.org/D130242
-
Johannes Doerfert authored
If we have a dominating must-write access we do not need to know the initial value of some object to perform reasoning about the potential values. The dominating must-write has overwritten the initial value.
-
Johannes Doerfert authored
These were forgotten when D118680 was applied. Similar to D125937. Differential Revision: https://reviews.llvm.org/D129516
-
Johannes Doerfert authored
The namespaces were missing causing the symbols to have "C" mangling. To avoid this in the future we qualify the names now fully.
-
Johannes Doerfert authored
-
Fangrui Song authored
-
Fangrui Song authored
lowerGlobalAddress added by D128427 can be used for PIC. The actual condition is that the global value needs to be dso_local (a dso_preemptable one needs GOT indirection). load-store.ll has UB due to out-of-bounds load/store. Fix the UB in the variable test and add an array test. Note: NOPIC array index is currently wrong. Reviewed By: wangleiat Differential Revision: https://reviews.llvm.org/D129977
-
Fangrui Song authored
-
Chenbing Zheng authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D130220
-
Fangrui Song authored
-
Fangrui Song authored
-
Volodymyr Sapsai authored
Diagnostic for `-Wauto-import` shouldn't be a warning because it doesn't represent a potential problem in code that should be fixed. And the emitted fix-it is likely to trigger `-Watimport-in-framework-header` which makes it challenging to have a warning-free codebase. But it is still useful to see how include directives are translated into modular imports and which module a header belongs to, that's why keep it as a remark. Keep `-Wauto-import` for now to allow a gradual migration for codebases using `-Wno-auto-import`, e.g., `-Weverything -Wno-auto-import`. rdar://79594287 Differential Revision: https://reviews.llvm.org/D130138
-
Slava Gurevich authored
Using invalidated vector iterator is at best a UB and could crash depending on STL implementation. Fixing via minimal changes to preserve the existing code style. Coverity warning 1454828 (scan.coverity.com) Differential Revision: https://reviews.llvm.org/D130312
-
Phoebe Wang authored
Truncation from double to half is not always identical to truncating to float first and then to half. https://godbolt.org/z/56s9517hd On the other hand, expanding to float and then to double is always identical to expanding to double directly. https://godbolt.org/z/Ye8vbYPnY Reviewed By: RKSimon, skan Differential Revision: https://reviews.llvm.org/D130151
-
Ryan Prichard authored
Correct the logic used to set `ATOMIC_*_LOCK_FREE` preprocessor macros not to rely on the ABI alignment of types. Instead, just assume all those types are aligned correctly by default since clang uses safe alignment for `_Atomic` types even if the underlying types are aligned to a lower boundary by default. For example, the `long long` and `double` types on x86 are aligned to 32-bit boundary by default. However, `_Atomic long long` and `_Atomic double` are aligned to 64-bit boundary, therefore satisfying the requirements of lock-free atomic operations. This fixes PR #19355 by correcting the value of `__GCC_ATOMIC_LLONG_LOCK_FREE` on x86, and therefore also fixing the assumption made in libc++ tests. This also fixes PR #30581 by applying a consistent logic between the functions used to implement both interfaces. Reviewed By: hfinkel, efriedma Differential Revision: https://reviews.llvm.org/D28213
-
Ryan Prichard authored
The default host CPU for an i386 triple is typically at least an i586, which has cmpxchg8b (Clang feature, "cx8"). Therefore, `__CLANG_ATOMIC_LLONG_LOCK_FREE` is 2 on the host, but the value should be 1 for the device. Also, grep for `__CLANG_ATOMIC_*` instead of `__GCC_ATOMIC_*`. The CLANG macros are always emitted, but the GCC macros are omitted for the *-windows-msvc targets. The `__GCC_HAVE_SYNC_COMPARE_AND_SWAP` macro always has GCC in its name, not CLANG, however. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D127465
-
Ilia Diachkov authored
The patch adds SPIRVPrepareFunctions pass, which modifies function signatures containing aggregate arguments and/or return values before IR translation. Information about the original signatures is stored in metadata. It is used during call lowering to restore correct SPIR-V types of function arguments and return values. This pass also substitutes some llvm intrinsic calls to function calls, generating the necessary functions in the module, as the SPIRV translator does. The patch also includes changes in other modules, fixing errors and enabling many SPIR-V features that were omitted earlier. And 15 LIT tests are also added to demonstrate the new functionality. Differential Revision: https://reviews.llvm.org/D129730 Co-authored-by:
Aleksandr Bezzubikov <zuban32s@gmail.com> Co-authored-by:
Michal Paszkowski <michal.paszkowski@outlook.com> Co-authored-by:
Andrey Tretyakov <andrey1.tretyakov@intel.com> Co-authored-by:
Konrad Trifunovic <konrad.trifunovic@intel.com>
-
Nick Desaulniers authored
-
Philip Reames authored
This code confuses LV's "Uniform" and LVL/LAI's "Uniform". Despite the common name, these are different. * LVs notion means that only the first lane *of each unrolled part* is required. That is, lanes within a single unroll factor are considered uniform. This allows e.g. widenable memory ops to be considered uses of uniform computations. * LVL and LAI's notion refers to all lanes across all unrollings. IsUniformMem is in turn defined in terms of LAI's notion. Thus a UniformMemOpmeans is a memory operation with a loop invariant address. This means the same address is accessed in every iteration. The tweaked piece of code was trying to match a uniform mem op (i.e. fully loop invariant address), but instead checked for LV's notion of uniformity. In theory, this meant with UF > 1, we could speculate a load which wasn't safe to execute. This ends up being mostly silent in current code as it is nearly impossible to create the case where this difference is visible. The closest I've come in the test case from 54cb87, but even then, the incorrect result is only visible in the vplan debug output; before this change we sink the unsafely speculated load back into the user's predicate blocks before emitting IR. Both before and after IR are correct so the differences aren't "interesting". The other test changes are uninteresting. They're cases where LV's uniform analysis is slightly weaker than SCEV isLoopInvariant.
-
Philip Reames authored
This a reproducer for bug in predicated instruction handling. The final result code is correct, but the reasoning by which we get there isn't.
-
Craig Topper authored
We can always fold zext.b since it is just andi. The others require Zba/Zbb. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D130302
-
Alexander Shaposhnikov authored
Relax the check to allow evaluation of atomic loads (but still skip volatile loads). Test plan: 1/ ninja check-llvm check-clang 2/ Bootstrapped LLVM/Clang pass tests Differential revision: https://reviews.llvm.org/D130211
-
LLVM GN Syncbot authored
-
Augusto Noronha authored
This reverts commit 23cf42e7.
-
LLVM GN Syncbot authored
-
Daniel Thornburgh authored
-