- Dec 13, 2022
-
-
esmeyi authored
Differential Revision: https://reviews.llvm.org/D139914
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Johannes Doerfert authored
This reverts commit c1c8cbbf. One of the tests seems to be flaky/non-deterministic.
-
Sameer Sahasrabuddhe authored
-
Alex Brachet authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
If we have inline asm with side effects we assume any function might be called. For non-side-effect asm we now assume no function is called.
-
Blue Gaston authored
-fsanitize-coverage=control-flow does not sign entries into basic blocks on arm64e. This test compares a local pointer to a function [signed] with the basic block pointer. Because the entry into the basic block is unsigned the addresses being compared are signed and unsigned, causing the path never to be taken. This is a "bandaid" to get this test passing. We strip the signed bits from the pointer to the local functions so that the comparisons pass. Filed radar: rdar://103042879 to note the behavior. context: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp#L1068 // blockaddress can not be used on function's entry block. if (&BB == &F.getEntryBlock()) CFs.push_back((Constant *)IRB.CreatePointerCast(&F, IntptrPtrTy)); else CFs.push_back((Constant *)IRB.CreatePointerCast(BlockAddress::get(&BB), IntptrPtrTy)); BlockAddress::get is responsible for signing the pointer. Because of: https://reviews.llvm.org/D133157 rdar://103042879 Differential Revision: https://reviews.llvm.org/D139661
-
Vasileios Porpodas authored
[IR][NFC] Adds Function::insertBasicBlockAt() to replace things like F->getBasicBlockList().insert() This is part of a series of patches that aim at making Function::getBasicBlockList() private. Differential Revision: https://reviews.llvm.org/D139906
-
Matt Arsenault authored
These are used for special arguments to intrinsics and don't make any sense to consider for poisonness. Fixes not pushing freeze through llvm.fptrunc.round. 92106641 made isGuaranteedNotToBeUndefOrPoison return false for metadata arguments, which doesn't entirely make sense. An alternate patch could switch that to true, and try to filter out adding some pointless noundefs on metadata arguments (I tried that, attributor breaks one case with a llvm.dbg.value in it).
-
Matt Arsenault authored
Probably could replace the switch by marking the intrinsic definitions with NoUndef<RetIndex>.
-
Matt Arsenault authored
-
wanglei authored
In order to be compatible with the form of the atomic instruction in GAS that accepts the fourth operand as 0 (i.e. `am* $rd, $rk, $rj, 0`), we need to treat `$rj, 0` as one operand, but only print `$rj`. For this, the number of result operands of inline assembly memory operand `ZB` constraint is modified to 2 (reg + 0). Restrictions on register usage in `am*` instructions have also been adjusted. When `$rd` is equal to `$r0`, the instruction must be considered legal, because of some special usage like `PseudoUNIMP`. Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D139303
-
Matt Arsenault authored
escape.ll needed a simple manual check line update. contract-storestrong.ll:test12 is kind of contrived now. The comment says it's for testing bitcasts of pointers, which don't really matter anymore. Leaves identity ptr to ptr bitcasts (which I thought were illegal).
-
Matt Arsenault authored
These were trying to check if there was not an llvm.objc call before a closing "}", which presumably was intended to match the end of the function. Really this was matching the closing } in "bitcast {}* %self to i8*", which can't be what anyone intended. This broke after converting the test to opaque pointer deleted this bitcast. There are in fact @llvm.obj calls remaining in the function, so this may indicate the transform this was intended to check is actually broken. In @"\01-[A z]" (great test name), the first retain call seems to move down to the printf. The second case, @"\01-[Top0 _getX]", has no change. Change the checks to what's produced and add FIXMES. Also change the } checks to match only at the start of the line for the function end. -
Matt Arsenault authored
-
Matt Arsenault authored
Copied from the existing llvm.amdgcn.class handling; eventually I will fold that to the generic intrinsic when legal. The tests should probably move into an instsimplify only test.
-
Matt Arsenault authored
As requested in D137811
-
Chuanqi Xu authored
Close https://github.com/llvm/llvm-project/issues/59221. The root cause for the problem is that we marked the parameter of the resume/destroy functions as noalias previously. But this is not true. See https://github.com/llvm/llvm-project/issues/59221 for the details. Long story short, for this C++ program (https://compiler-explorer.com/z/6qGcozG93), the optimized frame will be something like: ``` struct test_frame { void (*__resume_)(), // a function pointer points to the `test.resume` function, which can be imaged as the test() function in the example. .... struct a_frame { ... void **caller; // may points to test_frame at runtime. }; }; ``` And the function a and function test looks just like: ``` define i32 @a(ptr noalias %alloc_8) { %alloc_8_16 = getelementptr ptr, ptr %alloc_8, i64 16 store i32 42, ptr %alloc_8_16, align 8 %alloc_8_8 = getelementptr ptr, ptr %alloc_8, i64 8 %alloc = load ptr, ptr %alloc_8_8, align 8 %p = load ptr, ptr %alloc, align 8 %r = call i32 %p(ptr %alloc) ret i32 %r } define i32 @b(ptr %p) { entry: %alloc = alloca [128 x i8], align 8 %alloc_8 = getelementptr ptr, ptr %alloc, i64 8 %alloc_8_8 = getelementptr ptr, ptr %alloc_8, i64 8 store ptr %alloc, ptr %alloc_8_8, align 8 store ptr %p, ptr %alloc, align 8 %r = call i32 @a(ptr nonnull %alloc_8) ret i32 %r } ``` Here inside the function `a`, we can access the parameter `%alloc_8` by `%alloc` and we pass `%alloc` to an unknown function. So it breaks the assumption of `noalias` parameter. Note that although only CoroElide optimization can put a frame inside another frame directly, the following case is not valid too: ``` struct test_frame { .... void **a_frame; // may points to a_frame at runtime. }; struct a_frame { void **caller; // may points to test_frame at runtime. }; ``` Since the C++ language allows the programmer to get the address of coroutine frames, we can't assume the above case wouldn't happen in the source codes. So we can't set the parameter as noalias no matter if CoroElide applies or not. And for other languages, it may be safe if they don't allow the programmers to get the address of coroutine frames. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D139295
-
Vasileios Porpodas authored
This is part of a series of cleanup patches towards making BasicBlock::getInstList() private. Differential Revision: https://reviews.llvm.org/D139153
-
Richard Smith authored
-
Diego Caballero authored
This patch introduces the initial bits to support vector masking using the `vector.mask` operation. Vectorization changes should be NFC for non-masked cases. We can't test masked cases directly until we extend the Transform dialect to support masking. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D137690
-
Roman Lebedev authored
This matches the coverage with the Costmodel tests, adds stride 5/7/8, and improves AVX512 checks. I *think* i've compressed check prefixes as much as possible, but it's a bit hard to tell. But hey, at one no longer has to fight against FileCheck+UTC :).
-
Roman Lebedev authored
-
Richard Smith authored
to member naming a weak member to nullptr. This fixes a miscompile where constant evaluation would incorrectly determine that a weak member function pointer is never null. In passing, also improve the diagnostics for constant evaluation of some nearby cases.
-
Ting Wang authored
Add test case to show something can be improved. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D138881
-
wren romano authored
Since STEA isa Attribute, and that's just (a wrapper around) a pointer, the extra `const` and `&` aren't necessary for function arguments. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D139886
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D139489
-
Craig Topper authored
riscv64 sign extends signed and unsigned i32 arguments like Mips. Based on discussion here https://discourse.llvm.org/t/can-we-preserve-signext-return-attribute-when-converting-memcmp-to-bcmp/67126 I'll work on returns next. Differential Revision: https://reviews.llvm.org/D139893
-
Roman Lebedev authored
This matches the coverage with the Costmodel tests, adds stride 5/7/8, and improves AVX512 checks. I *think* i've compressed check prefixes as much as possible, but it's a bit hard to tell. But hey, at one no longer has to fight against FileCheck+UTC :).
-
Jordan Rupprecht authored
-
Vasileios Porpodas authored
Differential Revision: https://reviews.llvm.org/D138976
-
Dominic Chen authored
When the underlying vector becomes full, it resizes, remaps, and then copies over the old data. To avoid thes excess allocations, allow reservation from the backing vector. Differential Revision: https://reviews.llvm.org/D135119
-
Peter Rong authored
I think there are more attributes, flags we can add to `call`, functions declarations and global variables. Let's start with these two flags. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D139594
-
Peter Rong authored
Mutating CFG is hard as we have to maintain dominator relations. We avoid this problem by inserting a CFG into a splitted block. switch, ret, and br instructions are generated. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D139067
-
Terry Wilmarth authored
Code for serial parallel regions and teams construct have been moved out of __kmp_fork_call and into separate functions. This is to reduce the size of the __kmp_fork_call function, and aid in debugging. Differential Revision: https://reviews.llvm.org/D139116
-
Sanjay Patel authored
Any undef element in a vector would trigger the whole constant to be replaced with a canonical NaN. This propagates each element when possible. issue #59122
-
Sanjay Patel authored
issue #59122
-