- May 06, 2020
-
-
Sanjay Patel authored
This builds on the or-reduction bailout that was added with D67841. We still do not have IR-level load combining, although that could be a target-specific enhancement for -vector-combiner. The heuristic is narrowly defined to catch the motivating case from PR39538: https://bugs.llvm.org/show_bug.cgi?id=39538 ...while preserving existing functionality. That is, there's an unmodified test of pure load/zext/store that is not seen in this patch at llvm/test/Transforms/SLPVectorizer/X86/cast.ll. That's the reason for the logic difference to require the 'or' instructions. The chances that vectorization would actually help a memory-bound sequence like that seem small, but it looks nicer with: vpmovzxwd (%rsi), %xmm0 vmovdqu %xmm0, (%rdi) rather than: movzwl (%rsi), %eax movl %eax, (%rdi) ... In the motivating test, we avoid creating a vector mess that is unrecoverable in the backend, and SDAG forms the expected bswap instructions after load combining: movzbl (%rdi), %eax vmovd %eax, %xmm0 movzbl 1(%rdi), %eax vmovd %eax, %xmm1 movzbl 2(%rdi), %eax vpinsrb $4, 4(%rdi), %xmm0, %xmm0 vpinsrb $8, 8(%rdi), %xmm0, %xmm0 vpinsrb $12, 12(%rdi), %xmm0, %xmm0 vmovd %eax, %xmm2 movzbl 3(%rdi), %eax vpinsrb $1, 5(%rdi), %xmm1, %xmm1 vpinsrb $2, 9(%rdi), %xmm1, %xmm1 vpinsrb $3, 13(%rdi), %xmm1, %xmm1 vpslld $24, %xmm0, %xmm0 vpmovzxbd %xmm1, %xmm1 # xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero vpslld $16, %xmm1, %xmm1 vpor %xmm0, %xmm1, %xmm0 vpinsrb $1, 6(%rdi), %xmm2, %xmm1 vmovd %eax, %xmm2 vpinsrb $2, 10(%rdi), %xmm1, %xmm1 vpinsrb $3, 14(%rdi), %xmm1, %xmm1 vpinsrb $1, 7(%rdi), %xmm2, %xmm2 vpinsrb $2, 11(%rdi), %xmm2, %xmm2 vpmovzxbd %xmm1, %xmm1 # xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero vpinsrb $3, 15(%rdi), %xmm2, %xmm2 vpslld $8, %xmm1, %xmm1 vpmovzxbd %xmm2, %xmm2 # xmm2 = xmm2[0],zero,zero,zero,xmm2[1],zero,zero,zero,xmm2[2],zero,zero,zero,xmm2[3],zero,zero,zero vpor %xmm2, %xmm1, %xmm1 vpor %xmm1, %xmm0, %xmm0 vmovdqu %xmm0, (%rsi) movl (%rdi), %eax movl 4(%rdi), %ecx movl 8(%rdi), %edx movbel %eax, (%rsi) movbel %ecx, 4(%rsi) movl 12(%rdi), %ecx movbel %edx, 8(%rsi) movbel %ecx, 12(%rsi) Differential Revision: https://reviews.llvm.org/D78997
-
Pete Steinfeld authored
Summary: Most of these checks were already implemented, and I just added references to them to the code and tests. Also, much of this code was already reviewed in the old flang/f18 GitHub repository, but I didn't get to merge it before we switched repositories. I implemented the check for C747 to not allow coarray components in derived types that are of type C_PTR, C_FUNPTR, or type TEAM_TYPE. I implemented the check for C748 that requires a data component whose type has a coarray ultimate component to be a nonpointer, nonallocatable scalar and not be a coarray. I implemented the check for C750 that adds additional restrictions to the bounds expressions of a derived type component that's an array. These bounds expressions are sepcification expressions as defined in 10.1.11. There was already code in lib/Evaluate/check-expression.cpp to check semantics for specification expressions, but it did not check for the extra requirements of C750. C750 prohibits specification functions, the intrinsic functions ALLOCATED, ASSOCIATED, EXTENDS_TYPE_OF, PRESENT, and SAME_TYPE_AS. It also requires every specification inquiry reference to be a constant expression, and requires that the value of the bound not depend on the value of a variable. To implement these additional checks, I added code to the intrinsic proc table to get the intrinsic class of a procedure. I also added an enumeration to distinguish between specification expressions for derived type component bounds versus for type parameters. I then changed the code to pass an enumeration value to "CheckSpecificationExpr()" to indicate that the expression was a bounds expression and used this value to determine whether to emit an error message when violations of C750 are found. I changed the implementation of IsPureProcedure() to handle statement functions and changed some references in the code that tested for the PURE attribute to call IsPureProcedure(). I also fixed some unrelated tests that got new errors when I implemented these new checks. Reviewers: tskeith, DavidTruby, sscalpone Subscribers: jfb, llvm-commits Tags: #llvm, #flang Differential Revision: https://reviews.llvm.org/D79263
-
Francesco Petrogalli authored
Summary: This change fixes an aarch64-specific bug in the generation of the NDS and WDS values used to compute the signature of the vector functions out of OpenMP directives like `declare simd`. When the directive is used in conjunction with the `linear` clause, the size of the pointee must be used instead of the size of the pointer to compute NDS and WDS. The code-fix is strictly related to the behavior for `linear`, but given that the only way we have to test the NDS and WDS values is to check the resulting `<vlen>` token in the mangled name of the vector function, the tests have been extended to cover all the possible values of WDS and NDS as defined in the ABI at https://github.com/ARM-software/abi-aa/tree/master/vfabia64. Reviewers: ABataev, jdoerfert, andwar Reviewed By: jdoerfert Subscribers: yaxunl, kristof.beyls, guansong, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D78969
-
Stephen Neuendorffer authored
This attempts to ensure that out of tree usage remains stable. Differential Revision: https://reviews.llvm.org/D78656
-
Vedant Kumar authored
This is a speculative fix for a unit test failure on a Win/MSVC2017 bot (http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/16106/steps/test/logs/stdio).
-
Jinsong Ji authored
This patch adds ORE for MachinePipeliner, so that people can anaylyze their code using opt-viewer or other tools, then optimize the code to catch more piplining opportunities. Reviewed By: bcahoon Differential Revision: https://reviews.llvm.org/D79368
-
- May 05, 2020
-
-
Simon Pilgrim authored
getScalarizationOverhead is only ever called with vectors (and we already had a load of cast<VectorType> calls immediately inside the functions). Followup to D78357 Reviewed By: @samparker Differential Revision: https://reviews.llvm.org/D79341
-
Stephen Neuendorffer authored
This patch conditionally links with MC
-
Stephen Neuendorffer authored
This will prevent conflicts with libLLVM.so when using LLVM_LINK_LLVM_DYLIB=on. Differential Revision: https://reviews.llvm.org/D79370
-
Pengxuan Zheng authored
Summary: The RISC-V debug register was named dscratch in a previous draft of the RISC-V debug mode spec. The number of registers has been increased to 2 in the latest ratified version of the debug mode spec and the registers were named dscratch0 and dscratch1. We still support using the old register name "dscratch", but it would be disassembled as "dscratch0" with this change. Reviewers: apazos, asb, lenary, luismarques Reviewed By: asb Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, sameer.abuasal, evandro, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78764
-
Fangrui Song authored
This is the ELF part of D75949. GNU objcopy from binutils 2.35 onwards will support an empty non-SHT_NOBITS section as well https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=e052e2ba295a65b6ea80cbc3f90495beca299c42 Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D79339
-
Fangrui Song authored
The latter is more common and thus the preferred way to use CHECK lines.
-
Arthur Eubanks authored
Summary: This was added in https://reviews.llvm.org/D2449, but I'm not sure it's necessary since an inalloca value is never a Constant (should be an AllocaInst). Reviewers: hans, rnk Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79350
-
Jay Foad authored
We check that C is finite and strictly positive, but there's no need to check that it's normal too. exp2 should be just as accurate on denormals as pow is. Differential Revision: https://reviews.llvm.org/D79413
-
Fangrui Song authored
Size==0 triggers `assert(Size != 0)` in mapped_file_region::init. I plan to use an empty file in D79339 (llvm-objcopy --dump-section). According to POSIX, "If len is zero, mmap() shall fail and no mapping shall be established." Just specialize case Size=0 to use createInMemoryBuffer. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D79338
-
Jay Foad authored
-
David Green authored
LSR has some logic that tries to aggressively reuse registers in formula. This can lead to sub-optimal decision in complex loops where the backend it trying to use shouldFavorPostInc. This disables the re-use in those situations. Differential Revision: https://reviews.llvm.org/D79301
-
Jay Foad authored
VMEM soft clauses only contain VMEM and FLAT instructions. Teaching GCNHazardRecognizer::checkSoftClauseHazards that other kinds of instructions will naturally break the clause means there are far fewer cases where it has to insert an s_nop instruction to forcibly break the clause. Differential Revision: https://reviews.llvm.org/D79353
-
Yitzhak Mandelbaum authored
Summary: The new option allows the user to specify which file naming convention is used by the source code ('llvm' or 'google'). Reviewers: gribozavr2 Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79380 -
Sam Parker authored
Run the update script on a couple of tests.
-
Louis Dionne authored
This commit removes minor features of the test suite that I've never seen used and that are basically just a maintenance burden: - color_diagnostics: Diagnostics are colored by default when running from a terminal, and not colored otherwise. This is the right behavior. Being able to tweak this has minor value, and could be achieved by modifying the %{compile_flags} instead if absolutely needed. - ccache: This can be achieved by using a wrapper for the %{cxx} substitution. - _dump_macros_verbose is just a dead function now. -
Ehsan Toosi authored
This is a basic pass to convert Linalg.GenericOp which works on tensors to use buffers instead. Differential Revision: https://reviews.llvm.org/D78996
-
Jay Foad authored
I don't think there's any good reason not to do this transformation when the pow has multiple uses. Differential Revision: https://reviews.llvm.org/D79407
-
Louis Dionne authored
Otherwise, we can't test other standard libraries.
-
Matt Arsenault authored
I'm not sure what the conventions are for this documentation. The format seems limiting. I don't see how to refer to other flags, or mark flags as deprecated. The rst I believe these generate seems to be in source, and out of date.
-
Louis Dionne authored
-
Raphael Isemann authored
This reverts commit 8baa0b94. This broke the LLDB Green Dragon bot where htonl is getting miscompiled on macOS 10.14 and 10.15 SDKs, causing networking tests to fail as IP addressed were being inverted (e.g., 127.0.0.1 became 1.0.0.127 with an enabled modules build). Reverting until this is fixed.
-
Jonathan Coe authored
Reviewers: krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: cfe-commits Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D79414
-
Sebastian Neubauer authored
Marking a section as ALLOC tells the ELF loader to load the section into memory. As we do not want to load the notes into VRAM, the flag should not be there. On AMDHSA, .note is still marked as ALLOC, apparently this is currently needed for OpenCL (see https://reviews.llvm.org/D74995). Differential Revision: https://reviews.llvm.org/D76278
-
Sander de Smalen authored
Reviewed By: efriedma Tags: #llvm Differential Revision: https://reviews.llvm.org/D79352
-
David Green authored
A PREDICATE_CAST(PREDICATE_CAST(X)) can be converted to a PREDICATE_CAST(X) as the operation can convert between any forms of predicates (v4i1/v8i1/v16i1/i32). Unfortunately I got the type wrong on one of the rarer converts, which would lead to invalid nodes during isel. This fixes it up to use the correct type. Differential Revision: https://reviews.llvm.org/D79402
-
Sander de Smalen authored
The reinterpret builtins are generated separately because they need the cross product of all types, 121 functions in total, which is inconvenient to specify in the arm_sve.td file. Reviewers: SjoerdMeijer, efriedma, ctetreau, rengolin Reviewed By: efriedma Tags: #clang Differential Revision: https://reviews.llvm.org/D78756
-
Jean-Michel Gorius authored
Update to follow the changes introduced in 5469f434 and documented in 93f7e525.
-
Simon Pilgrim authored
[InstCombine] Fold or(zext(bswap(x)),shl(zext(bswap(y)),bw/2)) -> bswap(or(zext(x),shl(zext(y), bw/2)) This adds a general combine that can be used to fold: or(zext(OP(x)), shl(zext(OP(y)),bw/2)) --> OP(or(zext(x), shl(zext(y),bw/2))) Allowing us to widen 'concat-able' style or+zext patterns - I've just set this up for BSWAP but we could use this for other similar ops (BITREVERSE for instance). We already do something similar for bitop(bswap(x),bswap(y)) --> bswap(bitop(x,y)) Fixes PR45715 Reviewed By: @lebedev.ri Differential Revision: https://reviews.llvm.org/D79041
-
Alexander Belyaev authored
Summary: This fixes shared lib build. Differential Revision: https://reviews.llvm.org/D79403
-
Simon Pilgrim authored
[X86][AVX] combineVectorSignBitsTruncation - avoid complex vXi64->vXi32 PACKSS truncations (PR45794) Unless we're truncating an 'all-bits' result, using PACKSS for vXi64->vXi32 truncation causes problems with later combines as ComputeNumSignBits struggles to see through BITCASTs to smaller types. If we don't use PACKSS in these cases then we fallback to shuffles which are usually just as good.
-
Simon Pilgrim authored
-
Kadir Cetinkaya authored
Summary: This is only used by documentlink and go-to-definition. We are pushing range detection logic from Inclusion creation to users. This would make using stale preambles easier. For document links we make use of the spelledtokens stored in tokenbuffers to figure out file name range. For go-to-def, we keep storing the line number we've seen the include directive. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79315
-
James Henderson authored
The --output-target documentation has slightly rotted, as the default is no longer purely based on the input file format, but also the value of --input-target. This patch updates the documentation to make this explicit. Reviewed by: MaskRay, alexshap Differential Revision: https://reviews.llvm.org/D79318
-
Nico Weber authored
-