- Jan 21, 2022
-
-
Matt Arsenault authored
Emit an error if the return value is used on subtargets that do not support them. Previously we were falling back to the DAG on selection failure, where it would emit this error and then fail again.
-
Nikolas Klauser authored
Adopt LWG3645, which fixes the value categories of basic_string::resize_and_overwrite https://timsong-cpp.github.io/lwg-issues/3645 Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D116815
-
Roman Lebedev authored
-
Sam Clegg authored
Differential Revision: https://reviews.llvm.org/D117739
-
Nadav Rotem authored
This diff optimizes the sequence icmp-ugt(ashr,C_1) C_2. InstCombine already implements this optimization for sgt, and this patch adds support ugt. This patch adds the check for UGT. @craig.topper came up with the idea and proof: define i1 @src(i8 %x, i8 %y, i8 %c) { %cp1 = add i8 %c, 1 %i = shl i8 %cp1, %y %i.2 = ashr i8 %i, %y %cmp = icmp eq i8 %cp1, %i.2 ;Assume: C + 1 == (((C + 1) << y) >> y) call void @llvm.assume(i1 %cmp) ; uncomment for the sgt case %j = shl i8 %cp1, %y %j.2 = sub i8 %j, 1 %cmp2 = icmp ne i8 %j.2, 127 ;Assume (((c + 1 ) << y) - 1) != 127 call void @llvm.assume(i1 %cmp2) %s = ashr i8 %x, %y %r = icmp sgt i8 %s, %c ret i1 %r } define i1 @tgt(i8 %x, i8 %y, i8 %c) { %cp1 = add i8 %c, 1 %j = shl i8 %cp1, %y %j.2 = sub i8 %j, 1 %r = icmp sgt i8 %x, %j.2 ret i1 %r } declare void @llvm.assume(i1) This change is related to the optimizations in D117252. Differential Revision: https://reviews.llvm.org/D117365 -
Valentin Clement authored
kStridePosInDim is a duplicate of kDimStridePos and is not used. Just remove it. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D117784
-
Fraser Cormack authored
This patch adds a variety of tests checking that we can match vector/scalar instructions against masked VP intrinsics when the splat is on the LHS. At this stage, we can't, despite us having ostensibly-commutable ISel patterns for them. The use of V0 as the mask operand interferes with the auto-generated ISel table.
-
Matt Arsenault authored
This code is not structured to handle the legacy buffer intrinsics and was miscompiling them.
-
Matt Arsenault authored
The struct/raw forms for the buffer atomics now work as expected. However, we're incorrectly handling the legacy form (which we probably shouldn't handle at all). We also are not diagnosing the use of the return value on gfx908. These will be addressed separately.
-
Matt Arsenault authored
This was inheriting the mesa behavior, and as far as I know nobody is using opencl kernels with amdpal. The isMesaKernel check was irrelevant because this property needs to be held for all functions.
-
Random06457 authored
When compiling with dwarf info, the mfix4300 flag introduced in https://reviews.llvm.org/D116238 can miss some occurrences of the vr4300 mulmul bug if a debug instruction happens to be between two `muls` instructions. This change skips debug instructions in order to fix the mulmul bug detection. Fixes https://github.com/llvm/llvm-project/issues/53094 Differential Revision: https://reviews.llvm.org/D117615
-
Lucas Prates authored
The GlobalISel combiner currently uses sign extension when manipulating the LHS constant when combining a sequence of the following sequence of machine instructions into a single constant: ``` %0:_(s32) = G_CONSTANT i32 <CONSTANT> %1:_(p0) = G_INTTOPTR %0:_(s32) %2:_(s64) = G_CONSTANT i64 <CONSTANT> %3:_(p0) = G_PTR_ADD %1:_, %2:_(s64) ``` This causes an issue when the bit width of the first contant and the target pointer size are different, as G_INTTOPTR has no sign extension semantics. This patch fixes this by capture an arbitrary precision in when matching the constant, allowing the matching function to correctly zero extend it. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D116941
-
Sjoerd Meijer authored
-
Philip Reames authored
-
Philip Reames authored
-
Sander de Smalen authored
This was intended to be fixed by D98856, but that only seemed to have the desired behaviour when compiling to assembly using `-S`, not when compiling into an object file or executable. Given that this was not the intention of D98856, this patch fixes the behaviour.
-
Adrian Prantl authored
-
Adrian Prantl authored
-
Philip Reames authored
-
Michael Kruse authored
When a Builder methods accepts multiple InsertPoints, when both point to the same position, inserting instructions at one position will "move" the other after the inserted position since the InsertPoint is pegged to the instruction following the intended InsertPoint. For instance, when creating a parallel region at Loc and passing the same position as AllocaIP, creating instructions at Loc will "move" the AllocIP behind the Loc position. To avoid this ambiguity, add an assertion checking this condition and fix the unittests. In case of AllocaIP, an alternative solution could be to implicitly split BasicBlock at InsertPoint, using the first as AllocaIP, the second for inserting the instructions themselves. However, this solution is specific to AllocaIP since AllocaIP will always have to be first. Hence, this is an argument to generally handling ambiguous InsertPoints as API sage error. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D117226
-
Nico Weber authored
-
- Jan 20, 2022
-
-
Nikita Popov authored
-
Mubashar Ahmad authored
Test fixed for the unaligned access warning.
-
Nikita Popov authored
-
Simon Pilgrim authored
AVX512 doesn't provide a ADDSUB instruction, but if we've built this from a build vector of scalar fsub/fadd elements we can still lower to blend(fsub,fadd)
-
Mircea Trofin authored
The tensorflow AOT compiler can cross-target, but it can't run on (for example) arm64. We added earlier support where the AOT-ed header and object would be built on a separate builder and then passed at build time to a build host where the AOT compiler can't run, but clang can be otherwise built. To simplify such scenarios given we now support more than one AOT-able case (regalloc and inliner), we make the AOT scenario centered on whether files are generated, case by case (this includes the "passed from a different builder" scenario). This means we shouldn't need an 'umbrella' LLVM_HAVE_TF_AOT, in favor of case by case control. A builder can opt out of an AOT case by passing that case's model path as `none`. Note that the overrides still take precedence. This patch controls conditional compilation with case-specific flags, which can be enabled locally, for the component where those are available. We still keep an overall flag for some tests. The 'development/training' mode is unchanged, because there the model is passed from the command line and interpreted. Differential Revision: https://reviews.llvm.org/D117752
-
Nikita Popov authored
Instead of constructing DebugVariables and looking up the order in the comparison function, compute the order upfront and then sort a vector of (order, instr). This improves compile-time by -0.4% geomean on CTMark ReleaseLTO-g. Differential Revision: https://reviews.llvm.org/D117575
-
Simon Pilgrim authored
This was supposed to ensure we're not generating 512-bit ADDSUB nodes, but cut+paste typos meant we weren't generating a full 512-bit pattern
-
eopXD authored
According to v-spec v1.0, `zve-32x` is the new minimum extension to include to have vector instructions. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D112613
-
Jan Svoboda authored
The creation of in-memory VFS nodes happens in a single function that deduces what kind of node to create from the arguments. This leads to complicated if-then-else logic that's difficult to cleanly extend. This patch abstracts away in-memory node creation via a type-erased factory function that's passed instead. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D117648
-
Jan Svoboda authored
This patch virtualizes the `getStatus` function on `InMemoryNode` in LLVM VFS. Currently, this is implemented via top-level function `getNodeStatus` that tries to cast `InMemoryNode *` into each subtype. Virtual functions seem to be the simpler solution here. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D117649
-
Stephan Herhut authored
When computing the new type of a collapse_shape operation, we need to at least take into account whether the type has an identity layout, in which case we can easily support dynamic strides. Otherwise, the canonicalizer creates invalid IR. Longer term, both the verifier and the canoncializer need to be extended to support the general case. Differential Revision: https://reviews.llvm.org/D117772
-
Stanislav Gatev authored
This is part of the implementation of the dataflow analysis framework. See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev. Reviewed-by: xazax.hun Differential Revision: https://reviews.llvm.org/D117754
-
Valentin Clement authored
Noticed during the upstreaming process.
-
Mubashar Ahmad authored
Added warning for potential cases of unaligned access when option -mno-unaligned-access has been specified Differential Revision: https://reviews.llvm.org/D116221
-
Nikita Popov authored
-
Florian Hahn authored
When adding new attributes, existing attributes are dropped. While this appears to be a longstanding issue, this was highlighted by D105169 which dropped a lot of attributes due to adding the new noundef attribute. Ahmed Bougacha (@ab) tracked down the issue and provided the fix in CGCall.cpp. I bundled it up and updated the tests.
-
Simon Tatham authored
The Armv8-R.64 architecture defines numbered MPU region registers with indices 1-15, not 0-15. So there's no such register as PRBAR0_EL2 or PRLAR0_EL1 (for example). The encodings that they would occupy are used for the unnumbered PRBAR_ELn and PRLAR_ELn registers. Reviewed By: labrinea Differential Revision: https://reviews.llvm.org/D117755
-
Simon Tatham authored
This is the counterpart to llvm/test/MC/AArch64/armv8r-sysreg.s, checking all the same encodings when fed to the disassembler.
-
Abinav Puthan Purayil authored
GlobalISelEmitter was skipping these patterns when its predicates were checked. This patch should allow us to select d16_hi stores in GlobalISel. Differential Revision: https://reviews.llvm.org/D117762
-