Commit Graph

430088 Commits

Author SHA1 Message Date
Alexander Timofeev 65abc3a869 [AMDGPU] Fix for the test failure caused by the 2e29b0138c
Fixing the idiv-licm.ll test failure

Differential Revision: https://reviews.llvm.org/D129819
2022-07-15 01:38:03 +02:00
Arjun P d6fbe1394f [MLIR][Presburger] MPInt: use /// for top-level comment, not // (NFC) 2022-07-15 00:30:02 +01:00
Fangrui Song b8e4d1b490 [test] Remove zlib-gnu tests 2022-07-14 16:28:57 -07:00
jeff 8a12f20ef7 [AMDGPU] Update the mechanism used to check for cycles and add eges in power-sched mutation 2022-07-14 16:24:13 -07:00
Fangrui Song 141c9d7759 [llvm-dwp] Add SHF_COMPRESSED support and remove .zdebug support
clang 14 removed -gz=zlib-gnu and ld.lld/llvm-objcopy removed .zdebug support
recently. llvm-dwp currently doesn't support SHF_COMPRESSED. Add support and
remove .zdebug support.

Simplify llvm::object::Decompressor which has no .zdebug user now.

While here, add tests for ELF32LE, ELF32BE, and ELF64BE.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D129728
2022-07-14 16:19:32 -07:00
Craig Topper dcfc1fd26f [SelectionDAG][RISCV][AMDGPU][ARM] Improve SimplifyDemandedBits for SHL with variable shift amount.
If we have a variable shift amount and the demanded mask has leading
zeros, we can propagate those leading zeros to not demand those bits
from operand 0. This can allow zero_extend/sign_extend to become
any_extend. This pattern can occur due to C integer promotion rules.

This transform is already done by InstCombineSimplifyDemanded.cpp where
sign_extend can be turned into zero_extend for example.

Reviewed By: spatel, foad

Differential Revision: https://reviews.llvm.org/D121833
2022-07-14 16:10:14 -07:00
Craig Topper 450f0bd17b [RISCV] Add additional tests for D121833. NFC 2022-07-14 16:10:14 -07:00
Shafik Yaghmour 80dec2ecff [Clang] Modify CXXMethodDecl::isMoveAssignmentOperator() to look through type sugar
AcceptedPublic

Currently CXXMethodDecl::isMoveAssignmentOperator() does not look though type
sugar and so if the parameter is a type alias it will not be able to detect
that the method is a move assignment operator. This PR fixes that and adds a set
of tests that covers that we correctly detect special member functions when
defaulting or deleting them.

This fixes: https://github.com/llvm/llvm-project/issues/56456

Differential Revision: https://reviews.llvm.org/D129591
2022-07-14 16:09:52 -07:00
Craig Topper 9913ea490a [RISCV] Make TuneSiFive7 depend on TuneNoDefaultUnroll instead of listing it for every SiFive7 CPU 2022-07-14 15:57:30 -07:00
David Blaikie 61891748f5 Remove testing for zlib-gnu llvm-mc support in the absence of zlib 2022-07-14 22:55:47 +00:00
Manish Gupta 713d3de5fb [mlir][NVGPU] Verifier for nvgpu.ldmatrix
* Adds verifiers for `nvgpu.ldmatrix` op
* Adds tests to `mlir/test/Dialect/NVGPU/invalid.mlir`

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D129669
2022-07-14 22:46:38 +00:00
David Blaikie d63ec445ca Remove zlibgnu support in llvm-mc
The feature's been removed from most other tools in LLVM at this point.
2022-07-14 22:38:59 +00:00
owenca 6ab7307177 [clang-format] Fix invalid-code-generation by RemoveBracesLLVM
When removing an r_brace that is the first token of an annotated line, if the
line above ends with a line comment, clang-format generates invalid code by
merging the tokens after the r_brace into the line comment.

Fixes #56488.

Differential Revision: https://reviews.llvm.org/D129742
2022-07-14 15:19:57 -07:00
Nikolas Klauser 5492b71db3 [libc++] Update RangesAlgorithms.csv 2022-07-15 00:18:31 +02:00
Aart Bik f30822d29c [mlir][sparse][bufferization] fix a few memory leaks
Fixed some new memory leaks after migration to new
bufferization. One is expected, the other may need
some more careful analysis.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D129805
2022-07-14 15:05:12 -07:00
Alexander Timofeev 2e29b0138c [AMDGPU] Lowering VGPR to SGPR copies to v_readfirstlane_b32 if profitable.
Since the divergence-driven instruction selection has been enabled for AMDGPU,
 all the uniform instructions are expected to be selected to SALU form, except those not having one.
 VGPR to SGPR copies appear in MIR to connect values producers and consumers. This change implements an algorithm
 that evolves a reasonable tradeoff between the profit achieved from keeping the uniform instructions in SALU form
 and overhead introduced by the data transfer between the VGPRs and SGPRs.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D128252
2022-07-14 23:59:02 +02:00
Tom Stellard 5b0788fef8 Remove left over merge marker from 4b1e3d1937 2022-07-14 14:51:44 -07:00
Tom Stellard 4b1e3d1937 [gold] Ignore bitcode from sections inside object files
-fembed-bitcode will put bitcode into special sections within object
files, but this is not meant to be used by LTO, so the gold plugin
should ignore it.

https://github.com/llvm/llvm-project/issues/47216

Reviewed By: tejohnson, MaskRay

Differential Revision: https://reviews.llvm.org/D116995
2022-07-14 14:46:15 -07:00
Katherine Rasmussen ebf3dbbe15 Revert "[flang] Add co_sum to the list of intrinsics and update test"
This reverts commit d2460d9008.

Reverting this commit because after pushing to main it caused
unexpected test failures.
2022-07-14 14:44:34 -07:00
Siva Chandra 98fdabecf5 [libc] Enable a few stdlib and time functions on aarch64. 2022-07-14 14:37:50 -07:00
isuckatcs b032e3ff61 [analyzer] Evaluate construction of non-POD type arrays
Introducing the support for evaluating the constructor
of every element in an array. The idea is to record the
index of the current array member being constructed and
create a loop during the analysis. We looping over the
same CXXConstructExpr as many times as many elements
the array has.

Differential Revision: https://reviews.llvm.org/D127973
2022-07-14 23:30:21 +02:00
Petr Hosek 2da550140a [compiler-rt][CMake] Use linker semantics for unwinder and C++ library
Try the shared library first, and if it doesn't exist fallback onto
the static one. When the static library is requested, skip the shared
library.

Differential Revision: https://reviews.llvm.org/D129470
2022-07-14 21:12:36 +00:00
Alexandre Ganea 17a4427e82 [LLD][COFF] On Windows, fix the date formatting in the 'incremental' test.
On my system the date formatting is a bit different from what the test used to
support. I'm using:

  Windows 11 version 21H2, build 22000.795 using the English(Canada) region.
  ls from BusyBox 1.36
  VS 2022 17.2.5
  WinSDK 10.0.22000
2022-07-14 17:10:09 -04:00
Aart Bik 67564841cb [mlir][sparse][bufferization] initialize reduction variable
After recent bufferization improvement, this test
started failing due to missed zero initialization.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D129800
2022-07-14 13:58:23 -07:00
Jez Ng 7dbfc4fc06 [clang] Document -femit-compact-unwind option in the User’s Manual
Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D129772
2022-07-14 16:50:36 -04:00
Katherine Rasmussen d2460d9008 [flang] Add co_sum to the list of intrinsics and update test
Add the collective subroutine, co_sum, to the list of intrinsics.
In accordance with 16.9.50 and 16.9.137, add a check for and an
error if coindexed objects are being passed to certain arguments
in co_sum and in move_alloc. Add a semantics test to check that
this error is successfully caught in calls to move_alloc. Remove
the XFAIL directive, update the ERROR directives and add both
standard-conforming and non-standard conforming calls to the
semantics test for co_sum.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D114134
2022-07-14 13:49:38 -07:00
Fangrui Song 889c6f3996 [ELF][test] Fix a typo in aarch64-ifunc-bti.s to actually test what was intended
Thanks to Alex Brachet for spotting it in D110217.
2022-07-14 13:46:38 -07:00
Krzysztof Drewniak bc61cc9a2d [mlir][AMDGPU] Add lds_barrier op
The lds_barrier op allows workgroups to wait at a barrier for
operations to/from their local data store (LDS) to complete without
incurring the performance penalties of a full memory fence.

Reviewed By: nirvedhmeshram

Differential Revision: https://reviews.llvm.org/D129522
2022-07-14 20:45:26 +00:00
Siva Chandra 75a628925e [libc] Enable few stdio functions on aarch64. 2022-07-14 13:40:48 -07:00
Jeff Niu b7f93c2809 [mlir] (NFC) run clang-format on all files 2022-07-14 13:32:13 -07:00
Siva Chandra edee61b55c [libc] Enable few pthread and threads functions on aarch64. 2022-07-14 13:25:21 -07:00
Siva Chandra Reddy 8dc42802f7 [libc] Add implementations of pthread_equal and pthread_self.
Reviewed By: michaelrj, lntue

Differential Revision: https://reviews.llvm.org/D129729
2022-07-14 20:12:35 +00:00
Fabian Parzefall d55dfeaf32 [BOLT] Replace uses of layout with basic block list
As we are moving towards support for multiple fragments, loops that
iterate over all basic blocks of a function, but do not depend on the
order of basic blocks in the final layout, should iterate over binary
functions directly, rather than the layout.

Eventually, all loops using the layout list should either iterate over
the function, or be aware of multiple layouts. This patch replaces
references to binary function's block layout with the binary function
itself where only little code changes are necessary.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D129585
2022-07-14 13:07:05 -07:00
Hui Xie 3151b95dad [libc++][ranges] implement `std::ranges::set_union`
[libc++][ranges] implement `std::ranges::set_union`

Differential Revision: https://reviews.llvm.org/D129657
2022-07-14 21:05:30 +01:00
Philip Reames f267584863 [CVP] Add coverage for missing mul/shl nowrap variants 2022-07-14 13:00:55 -07:00
LLVM GN Syncbot 426d7bc130 [gn build] Port a83004f4ff 2022-07-14 19:46:00 +00:00
Vitaly Buka a629ec2f47 [test] Fix D129789 for 32bit platforms 2022-07-14 12:44:15 -07:00
David Tenty a83004f4ff [libcxx][AIX][z/OS] Remove headers included via `_IBMCPP__`
D127650 removed support for non-clang-based XL compilers, but left some
of the headers used only by this compiler and included under the
__IBMCPP__ macro. This change cleans this up by deleting these headers.

Reviewed By: hubert.reinterpretcast, fanbo-meng

Differential Revision: https://reviews.llvm.org/D129491
2022-07-14 15:41:46 -04:00
Louis Dionne 340b48b267 [libc++] Add missing UNSUPPORTED annotations to experimental tests that use RTTI 2022-07-14 15:12:20 -04:00
Petr Hosek 1f3f4833ea [libcxxabi][CMake] Set --unwindlib=none when using LLVM libunwind
We already link libunwind explicitly so avoid trying to link toolchain's
default libunwind which may be missing. This matches what we already do
for libcxx.

Differential Revision: https://reviews.llvm.org/D129469
2022-07-14 18:59:40 +00:00
Ellis Hoag af58684f27 [InstrProf] Add options to profile function groups
Add two options, `-fprofile-function-groups=N` and `-fprofile-selected-function-group=i` used to partition functions into `N` groups and only instrument the functions in group `i`. Similar options were added to xray in https://reviews.llvm.org/D87953 and the goal is the same; to reduce instrumented size overhead by spreading the overhead across multiple builds. Raw profiles from different groups can be added like normal using the `llvm-profdata merge` command.

Reviewed By: ianlevesque

Differential Revision: https://reviews.llvm.org/D129594
2022-07-14 11:41:30 -07:00
Nick Desaulniers 140bfdca60 [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns
Follow up fix to
commit 2240d72f15 ("[X86] initial -mfunction-return=thunk-extern
support")
https://reviews.llvm.org/D129572

@nathanchance reported that -mfunction-return=thunk-extern was failing
to annotate the asan and tsan contructors.
https://lore.kernel.org/llvm/Ys7pLq+tQk5xEa%2FB@dev-arch.thelio-3990X/

I then noticed the same occurring for gcov synthetic functions.

Similar to
commit 2786e67 ("[IR][sanitizer] Add module flag "frame-pointer" and set
it for cc1 -mframe-pointer={non-leaf,all}")
define a new module level MetaData, "fn_ret_thunk_extern", then when set
adds the fn_ret_thunk_extern IR Fn Attr to synthetically created
Functions.

Fixes https://github.com/llvm/llvm-project/issues/56514

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D129709
2022-07-14 11:25:24 -07:00
Sanjay Patel 2c648f7d58 [PhaseOrdering][SystemZ] add test for combining/unrolling; NFC
As discussed in D128123, this test is based on an example
that ends up with codegen regressions if sub is converted
to xor.
2022-07-14 14:23:01 -04:00
Sanjay Patel 03e0497800 [InstCombine] add/edit tests for masked sub from constant; NFC 2022-07-14 14:23:00 -04:00
Vitaly Buka a2e01bdcc2 [test][CodeGen] Don't miss lifetime markers in lifetime tests
Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D129789
2022-07-14 11:14:07 -07:00
Amara Emerson d4f84df0a0 [GlobalISel] Change widenScalar of G_FCONSTANT to mutate into G_CONSTANT.
Widening a G_FCONSTANT by extending and then generating G_FPTRUNC doesn't produce
the same result all the time. Instead, we can just transform it to a G_CONSTANT
of the same bit pattern and truncate using a plain G_TRUNC instead.

Fixes https://github.com/llvm/llvm-project/issues/56454

Differential Revision: https://reviews.llvm.org/D129743
2022-07-14 11:05:10 -07:00
Nikolas Klauser 0a92e0728c [libc++] Use __unwrap_iter_impl for both unwrapping and rewrapping
Reviewed By: ldionne, #libc

Spies: arichardson, sstefan1, libcxx-commits

Differential Revision: https://reviews.llvm.org/D129039
2022-07-14 20:01:19 +02:00
Mitch Phillips 041d4012e4 Revert "Rewording "static_assert" diagnostics"
This reverts commit b7e77ff25f.

Reason: Broke sanitizer builds bots + libcxx. 'static assertion
expression is not an integral constant expression'. More details
available in the Phabricator review: https://reviews.llvm.org/D129048
2022-07-14 10:59:20 -07:00
Philip Reames c0df6bc949 [RISCV][LSR] Add coverage for ICmpZero with scaled vscale values
Follow up to 3bc09c7da5 - remove a fixme I forgot to remove, and add test cases showing remaining work.

Note that scaled vscales show up in vectorized code from a couple of sources:
* Element types smaller than vector block size (i.e. everything under i64)
* Unrolling
* LMUL > 1

The largest scaling we can currently have is 256 (e8 in every possible vector register).  More practically useful scales are in the 2-16 range.
2022-07-14 10:55:31 -07:00
Stella Stamenova c3a28e8a99 Revert "[lldb] Add support for using integral const static data members in the expression evaluator"
This reverts commit 486787210d.

This broke the windows lldb bot: https://lab.llvm.org/buildbot/#/builders/83/builds/21186
2022-07-14 10:47:01 -07:00