- Aug 25, 2021
-
-
Min-Yih Hsu authored
Since we're now supporting the (correct) assembly syntax for MOVEM since 47f52f98. The remaining MOVEM MC tests can not be migrated into test/MC/M68k.
-
Shilei Tian authored
Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D108648
-
Michael Jones authored
Fix the errors caused by having some numbers too large for a 32 bit number in the tests for windows. Also fix the base causing some type confusion. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D108653
-
Sanjay Patel authored
These are similar to the rotate pattern added with: dcf659e8 ...but we don't have guard ops on the shift amount, so we don't canonicalize to the intrinsic. declare void @llvm.assume(i1) define i32 @src(i32 %shamt, i32 %bitwidth) { ; subtract must be in range of bitwidth %lt = icmp ule i32 %bitwidth, 32 call void @llvm.assume(i1 %lt) %r = lshr i32 -1, %shamt %s = sub i32 %bitwidth, %shamt %l = shl i32 -1, %s %o = or i32 %r, %l ret i32 %o } define i32 @tgt(i32 %shamt, i32 %bitwidth) { ret i32 -1 } https://alive2.llvm.org/ce/z/aF7WHx
-
Sanjay Patel authored
-
Kirill Stoimenov authored
The implementation uses the int_asan_check_memaccess intrinsic to instrument the code. The intrinsic is replaced by a call to a function which performs the access check. The generated function names encode the input register name as a number using Reg - X86::NoRegister formula. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D107850
-
Thomas Johnson authored
[ARC] Add codegen for the readcyclecounter intrinsic along with disassembly for associated instructions Differential Revision: https://reviews.llvm.org/D108598
-
Michael Kruse authored
This fixes check-polly when using the -load mechanism, i.e. LLVM_POLLY_LINK_INTO_TOOLS=OFF.
-
Eli Friedman authored
In preparation for D108058.
-
Tyler Augustine authored
Introduces new Ops to represent 1. alias.scope metadata in LLVM, and 2. domains for these scopes. These correspond to the metadata described in https://llvm.org/docs/LangRef.html#noalias-and-alias-scope-metadata. Lists of scopes are modeled the same way as access groups - as an ArrayAttr on the Op (added in https://reviews.llvm.org/D97944). Lowering 'noalias' attributes on function parameters is already supported. However, lowering `noalias` metadata on individual Ops is not, which is added in this change. LLVM uses the same keyword for these, but this change introduces a separate attribute name 'noalias_scopes' to represent this distinct concept. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D107870
-
Louis Dionne authored
Based on https://github.com/NuxiNL/cloudlibc, it appears that the CloudABI project has been abandoned. This patch removes a bunch of CloudABI specific logic that had been added to support that platform. Note that some knobs like LIBCXX_ENABLE_STDIN and LIBCXX_ENABLE_STDOUT coud be useful in their own right, however those are currently broken. If we want to re-add such knobs in the future, we can do it like we've done it for localization & friends so that we can officially support that configuration. Differential Revision: https://reviews.llvm.org/D108637
-
Stanislav Mekhanoshin authored
Currently isReallyTriviallyReMaterializableGeneric() implementation prevents rematerialization on any virtual register use on the grounds that is not a trivial rematerialization and that we do not want to extend liveranges. It appears that LRE logic does not attempt to extend a liverange of a source register for rematerialization so that is not an issue. That is checked in the LiveRangeEdit::allUsesAvailableAt(). The only non-trivial aspect of it is accounting for tied-defs which normally represent a read-modify-write operation and not rematerializable. The test for a tied-def situation already exists in the /CodeGen/AMDGPU/remat-vop.mir, test_no_remat_v_cvt_f32_i32_sdwa_dst_unused_preserve. The change has affected ARM/Thumb, Mips, RISCV, and x86. For the targets where I more or less understand the asm it seems to reduce spilling (as expected) or be neutral. However, it needs a review by all targets' specialists. Differential Revision: https://reviews.llvm.org/D106408
-
Michael Jones authored
There were some copy paste errors as well as some oddities around how windows handles the difference between long and long long types. This change fixes those. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D108591
-
Jessica Paquette authored
1) Just mark this case as legal because it can just be a copy. 2) Ensure the copy in the existing code actually gets selected. Without doing this, we'll crash because the destination won't have a register class. This fell back 35 times in a build of clang with GISel for AArch64. Differential Revision: https://reviews.llvm.org/D108610
-
Michael Kruse authored
The use of `$<TARGET_FILE:clang>` was adapted too broadly from D101265. Fixes llvm.org/PR51579 Also see discussion in D108534. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D108640
-
Arthur Eubanks authored
-
Vitaly Buka authored
Set SA_SIGINFO only if we set sighandler, or we can set the flag, and return it as 'old' without actual sigaction set. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D108616
-
Andrei Elovikov authored
D108422 removed Basic/X86Target.def but didn't delete the entry in module.modulemap. Do it now. Hopefully it will fix the build.
-
Ben Langmuir authored
* Cannot use sizeof() on another union member * nullptr vs NULL * () vs (void) Incidentally, fix an incorrect comment about memory ownership on the argument to __orc_rt_CreateCWrapperFunctionResultFromOutOfBandError, which is copied, not moved.
-
Arthur Eubanks authored
-
Arthur Eubanks authored
This removes the data layout, target triple, source filename, and module identifier when possible. Reviewed By: swamulism Differential Revision: https://reviews.llvm.org/D108568
-
Benson Chu authored
This reverts commit 9a5f3888. The written test breaks some builds on Mach-O.
-
Rong Xu authored
The IRPGOFlag symbol (__llvm_profile_raw_version) is dropped when identified as non-prevailing for either regular or thin LTO during the mixed-LTO mode compilation. This happens in the module where IRPGOFlag is marked as non-prevailing. This variable is emitted in the final object from the prevailing module. This is still problematic because we currently query this symbol to coordinate some actions between PGOInstrumentation pass and InstrProfiling lowering pass, like whether to do value profiling, whether to do comdat renaming. This problem is bought up by YolandaCY in https://reviews.llvm.org/D107034 YolandCY reported unresolved symbol linker errors in CSPGO instrumentation build for chromium. This patch let LTO retain IRPGOFlag decl by adding it to CompilerUsed list and relax the check in isIRPGOFlagSet() when doing the InstrProfiling lowering. The test case in the patch is from D107034 <https://reviews.llvm.org/D107034>. Differential Revision: https://reviews.llvm.org/D108581
-
Michael Jones authored
llvm-libc is expected to be built with sanitizers and not use interceptors in the long run. For now though, we have a hybrid process, where functions implemented in llvm-libc are instrumented, and glibc fills and sanitizer interceptors fill in the rest. Current sanitizers have an invariant that the REAL(...) function called from inside of an interceptor is uninstrumented. A lot of interceptors call strlen() in order to figure out the size of the region to check/poison. Switch these callsites over to the internal, unsanitized implementation. Reviewed By: hctim, vitalybuka Differential Revision: https://reviews.llvm.org/D108316
-
peter klausler authored
BACKSPACE leaves "recordLength" set, which is fine for a later READ, but it causes a later WRITE to fail due to a misinterpretation of the knowledge of the record length as indication of a fixed-length record file (RECL=). Fix. Differential Revision: https://reviews.llvm.org/D108594
-
peter klausler authored
The index of an implied DO loop in a DATA statement or array constructor is defined by Fortran 2018 to have scope over its implied DO loop. This definition is unfortunate, because it requires the implied DO loop's bounds expressions to be in the scope of the index variable. Consequently, in code like integer, parameter :: j = 5 real, save :: a(5) = [(j, j=1, j)] the upper bound of the loop is a reference to the index variable, not the parameter in the enclosing scope. This patch limits the scope of the index variable to the "body" of the implied DO loop as one would naturally expect, with a warning. I would have preferred to make this a hard error, but most Fortran compilers treat this case as f18 now does. If the standard were to be fixed, the warning could be made optional. Differential Revision: https://reviews.llvm.org/D108595
-
Philip Reames authored
This reverts commit 914836b1. Further comments on review came up after initial approval. Reverting while addressing.
-
Andrei Elovikov authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D108422
-
Jessica Paquette authored
Reuse the selection code from the ld2 case. This is similar to how SDAG handles things in AArch64ISelDAGToDAG. (See SelectLoad) This fell back ~100 times while building clang with GISel enabled for AArch64. Factoring out the gross subreg copy part ought to make selecting the rest of this family fairly easy. Differential Revision: https://reviews.llvm.org/D108600
-
- Aug 24, 2021
-
-
Philip Reames authored
This reverts commit aec08e86. Several problems have been reported with malformed loopinfo after this change, see discussion on https://reviews.llvm.org/rGaec08e86004b.
-
Philip Reames authored
If we no an addrec doesn't self-wrap, the increment is strictly positive, and the start value is the smallest representable value, then we know that the corresponding wrap type can not occur. Differential Revision: https://reviews.llvm.org/D108601
-
Aart Bik authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D108636
-
Simon Pilgrim authored
We don't have any vXi8 shift instructions (other than on XOP which is handled separately), so replace the shl(x,1) -> add(x,x) fold with shl(x,1) -> add(freeze(x),freeze(x)) to avoid the undef issues identified in PR50468. Split off from D106675 as I'm still looking at whether we can fix the vXi16/i32/i64 issues with the D106679 alternative. Differential Revision: https://reviews.llvm.org/D108139
-
Aart Bik authored
I found myself typing this code several times at different places by now, so time to make this a general utility instead. Given a permutation, it returns the permuted position of the input, for example (i,j,k) -> (k,i,j) yields position 1 for input 0. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D108347
-
Simon Pilgrim authored
[DAG] LoadedSlice::canMergeExpensiveCrossRegisterBankCopy - replace getABITypeAlign with allowsMemoryAccess (PR45116) One of the cases identified in PR45116 - we don't need to limit load combines to ABI alignment, we can use allowsMemoryAccess - which tests using getABITypeAlign, but also checks if a target permits (fast) misaligned memory loads by checking allowsMisalignedMemoryAccesses as a fallback.
-
Whisperity authored
As identified by @RKSimon, there was a missing comma in the default value for the "ignored parameter type suffixes" array, resulting in bogus concatenation of two elements.
-
Kazu Hirata authored
The function was introduced without a use on Jun 3, 2020 in commit 2a6c8715. Note that the identical function is defined in InstCombineInternal.h without static, which is in use.
-
Benson Chu authored
Clang currently picks the second tentative definition when VarDecl::getActingDefinition is called. This can lead to attributes being dropped if they are attached to tentative definitions that appear after the second one. This is because VarDecl::getActingDefinition loops through VarDecl::redecls assuming that the last tentative definition is the last element in the iterator. However, it is the second element that would be the last tentative definition. This changeset modifies getActingDefinition to iterate through the declaration chain in reverse, so that it can immediately return when it encounters a tentative definition. Differential Revision: https://reviews.llvm.org/D99732
-
Simon Pilgrim authored
One of the cases identified in PR45116 - we don't need to limit load combines (in this case for fp->int load/store copies) to ABI alignment, we can use allowsMemoryAccess - which tests using getABITypeAlign, but also checks if a target permits (fast) misaligned memory loads by checking allowsMisalignedMemoryAccesses as a fallback. Differential Revision: https://reviews.llvm.org/D108318
-
Simon Pilgrim authored
One of the cases identified in PR45116 - we don't need to limit load combines (in this case for ISD::BUILD_PAIR) to ABI alignment, we can use allowsMemoryAccess - which tests using getABITypeAlign, but also checks if a target permits (fast) misaligned memory loads by checking allowsMisalignedMemoryAccesses as a fallback. This helps in particular for 32-bit X86 cases loading 64-bit size data, reducing codegen diffs vs x86_64. Differential Revision: https://reviews.llvm.org/D108307
-