- Sep 13, 2022
-
-
Simon Pilgrim authored
We should be able to efficiently use the vector version for scalar bitreverse, like we do for XOP.
-
Simon Pilgrim authored
-
Alexander Kornienko authored
This reverts commit d200db38, which causes a clang crash. See https://reviews.llvm.org/D111283#3785755 Test case for convenience: ``` template <typename T> using P = int T::*; template <typename T, typename... A> void j(P<T>, T, A...); template <typename T> void j(P<T>, T); struct S { int b; }; void g(P<S> k, S s) { j(k, s); } ```
-
David Spickett authored
This extends 4658366d to add a note explaining why the register is reserved. note: x13 is clobbered by asynchronous signals when using Arm64EC. I've added testing for w/x registers and v/q/s/d and h floating point registers. llvm will accept, but silently do nothing with, b registers. So they are not tested here (clang rejects them so at least for C you're safe anyway). Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D133701
-
Jay Foad authored
-
Pavel Samolysov authored
Some uses of std::make_pair and the std::pair's first/second members in the ScheduleDAGInstrs.[cpp|h] files were replaced with using of the vector's emplace_back along with structure bindings from C++17.
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D133608
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D133606
-
Sven van Haastregt authored
Ensure any uses of `image2d_depth_t` and `image2d_array_depth_t` are guarded behind the `cl_khr_depth_images` extension in `OpenCLBuiltins.td`. Fix a few missing guards in `opencl-c.h`.
-
jacquesguan authored
Reviewed By: reames Differential Revision: https://reviews.llvm.org/D133005
-
Sylvestre Ledru authored
Causing: https://github.com/llvm/llvm-project/issues/57709 This reverts commit ab56719a.
-
Jean Perier authored
CompareToBlankPadding was doing signed compare on architecture where `char` is signed. This caused `'abc'//char(128) > 'abc'` to evaluate to false at runtime instead of true. Differential Revision: https://reviews.llvm.org/D133693
-
Timm Bäder authored
Add is a template parameter, so we can use constexpr if here.
-
Timm Bäder authored
Make stackRef() const as well and use that.
-
Timm Bäder authored
Make localRef() const and use that.
-
Timm Bäder authored
-
Timm Bäder authored
No need to include the full Pointer.h here.
-
Timm Bäder authored
References are implemented through pointers, so we need a second deref when encountering a DeclRefExpr of a reference type. Differential Revision: https://reviews.llvm.org/D132997
-
Haojian Wu authored
-
Nikita Popov authored
This call is expensive, so don't perform it for zero indices. Also rename the variable to use Alloc rather than Alloca, this doesn't have anything to do with allocas in particular.
-
Florian Hahn authored
This is to reduce the diff in follow-up changes.
-
David Green authored
This attempts to stop the type promotion pass transforming where it is not profitable, by not marking PhiNodes as ToPromote and being more aggressive about pulling extends out of loops. Differential Revision: https://reviews.llvm.org/D133203
-
Martin Storsjö authored
Set the EmulatedTLS option based on `Triple::hasDefaultEmulatedTLS()` if the user didn't specify it; set `ExplicitEmulatedTLS` to true in `llvm::TargetOptions` and set `EmulatedTLS` to Clang's opinion of what the default or preference is. This avoids any risk of deviance between the two. This affects one check of `getCodeGenOpts().EmulatedTLS` in `shouldAssumeDSOLocal` in CodeGenModule, but as that check only is done for `TT.isWindowsGNUEnvironment()`, and `hasDefaultEmulatedTLS()` returns false for such environments it doesn't make any current testable difference - thus NFC. Some mingw distributions carry a downstream patch, that enables emulated TLS by default for mingw targets in `hasDefaultEmulatedTLS()` - and for such cases, this patch does make a difference and fixes the detection of emulated TLS, if it is implicitly enabled. Differential Revision: https://reviews.llvm.org/D132916
-
Matthias Gehre authored
-
jacquesguan authored
This patch refators the polynomial Approx test. Now we pass the constant as function argument to avoid constant folder. Link: https://github.com/llvm/llvm-project/issues/57613 Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D133562
-
Balazs Benics authored
By this change the `exploded-graph-rewriter` will display the class kind of the expression of the environment entry. It makes easier to decide if the given entry corresponds to the lvalue or to the rvalue of some expression. It turns out the rewriter already had support for visualizing it, but probably was never actually used? Reviewed By: martong Differential Revision: https://reviews.llvm.org/D132109
-
Zi Xuan Wu (Zeson) authored
Some select node Pattern with register cmp instruction should be guarded by iHas2E3.
-
Balazs Benics authored
`LazyCompoundVals` should only appear as `default` bindings in the store. This fixes the second case in this patch-stack. Depends on: D132142 Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D132143
-
Balazs Benics authored
It turns out that in certain cases `SymbolRegions` are wrapped by `ElementRegions`; in others, it's not. This discrepancy can cause the analyzer not to recognize if the two regions are actually referring to the same entity, which then can lead to unreachable paths discovered. Consider this example: ```lang=C++ struct Node { int* ptr; }; void with_structs(Node* n1) { Node c = *n1; // copy Node* n2 = &c; clang_analyzer_dump(*n1); // lazy... clang_analyzer_dump(*n2); // lazy... clang_analyzer_dump(n1->ptr); // rval(n1->ptr): reg_$2<int * SymRegion{reg_$0<struct Node * n1>}.ptr> clang_analyzer_dump(n2->ptr); // rval(n2->ptr): reg_$1<int * Element{SymRegion{reg_$0<struct Node * n1>},0 S64b,struct Node}.ptr> clang_analyzer_eval(n1->ptr != n2->ptr); // UNKNOWN, bad! (void)(*n1); (void)(*n2); } ``` The copy of `n1` will insert a new binding to the store; but for doing that it actually must create a `TypedValueRegion` which it could pass to the `LazyCompoundVal`. Since the memregion in question is a `SymbolicRegion` - which is untyped, it needs to first wrap it into an `ElementRegion` basically implementing this untyped -> typed conversion for the sake of passing it to the `LazyCompoundVal`. So, this is why we have `Element{SymRegion{.}, 0,struct Node}` for `n1`. The problem appears if the analyzer evaluates a read from the expression `n1->ptr`. The same logic won't apply for `SymbolRegionValues`, since they accept raw `SubRegions`, hence the `SymbolicRegion` won't be wrapped into an `ElementRegion` in that case. Later when we arrive at the equality comparison, we cannot prove that they are equal. For more details check the corresponding thread on discourse: https://discourse.llvm.org/t/are-symbolicregions-really-untyped/64406 --- In this patch, I'm eagerly wrapping each `SymbolicRegion` by an `ElementRegion`; basically canonicalizing to this form. It seems reasonable to do so since any object can be thought of as a single array of that object; so this should not make much of a difference. The tests also underpin this assumption, as only a few were broken by this change; and actually fixed a FIXME along the way. About the second example, which does the same copy operation - but on the heap - it will be fixed by the next patch. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D132142 -
Haojian Wu authored
-
jacquesguan authored
This patch adds cost model for vector compare and select instructions. For vector FP compare instruction, it only add the comparisions supported natively. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D132296
-
Max Kazantsev authored
Instruction being hoisted could have nuw/nsw flags inferred from the old context, and we cannot simply move it to the new location keeping them because we are going to introduce new uses to them that didn't exist before. Example in https://github.com/llvm/llvm-project/issues/57187 shows how this can produce branch by poison from initially well-defined program. This patch forcefully recomputes poison-generating flag in the new context. Differential Revision: https://reviews.llvm.org/D132022 Reviewed By: fhahn, nikic
-
Zhang Qing Shan authored
Extend the llvm-dwp to support searching the DWOs that from relative path for the case that build from remote building system(different comp_dir). Reviewd By: dblaikie Differential Revision: https://reviews.llvm.org/D133480
-
Chuanqi Xu authored
According to [dcl.inline]p7/note4, > In the global module, a function defined within a class definition is > implicitly inline. And the declarations in the header unit are attached to the global module fragment. So the function defined within a class definition in header units should be implicitly inline too. This fixes https://github.com/llvm/llvm-project/issues/57571.
-
Zhang Qing Shan authored
For now, we report nothing if the execution/dwo file is missing, which is confusing. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D133549
-
Ting Wang authored
Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D133543
-
Craig Topper authored
I believe the result for fp_to_uint_sat is incorrect for this case.
-
Jordan Rupprecht authored
While auxv keys are usually small, e.g. less than 50, they can sometimes be larger, especially on a downstream kernel where a custom auxv entry is intentionally high to avoid conflicting with the standard lower numbers. This test fails on a system with an auxv value bigger than 1000, but instead of putting this test at that value plus one, it looks like 2023 (i.e. `AT_SUN_CAP_HW2`) is another large one out there. Use 2500 as a limit to still have this be a reasonable "small" check but still allow all known auxv keys. Semi-related change: this test case prints the auxv dict at the trace level, but only _after_ the assertion fails, making it not print what the offending value is as the test case aborts. Move it earlier so we can see what the "unreasonable" auxv value is.
-
Yeting Kuo authored
The original code may have incorrect result if there is a masked instruction without policy operand to make us set its policy to TUMU. The patch adds an assertion to catch the instruction. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D133302
-
Fangrui Song authored
-