Kazu Hirata [Fri, 6 May 2022 21:26:12 +0000 (14:26 -0700)]
[AArch64] Add llvm/test/CodeGen/AArch64/i256-math.ll
This patch adds a test case for i256 additions and subtractions. I'm
leaving out multiplications for now, which would result in very long
sequences.
Differential Revision: https://reviews.llvm.org/D125125
LLVM GN Syncbot [Fri, 6 May 2022 21:16:49 +0000 (21:16 +0000)]
[gn build] Port
9924d8d66ae1
Konstantin Varlamov [Fri, 6 May 2022 20:33:33 +0000 (13:33 -0700)]
[libc++][ranges] Implement `views::take`.
The view itself has been implemented previously -- this patch only adds
the ability to pipe it.
Also implements [P1739](https://wg21.link/p1739) (partially) and [LWG3407](https://wg21.link/lwg3407).
Differential Revision: https://reviews.llvm.org/D123600
Sam McCall [Fri, 6 May 2022 21:06:19 +0000 (23:06 +0200)]
Fix check-clang-tools target after
7cc8377f2c572a919ecb
This change was intended to add the tests check-clang and check-clang-pseudo,
but afterwards it was *only* running those tests.
(This was because unlike add_lit_testsuite, add_lit_testsuite*s* does not
get included in umbrella suites).
Petr Hosek [Mon, 28 Mar 2022 21:12:23 +0000 (14:12 -0700)]
[CMake][libcxx] Use target_include_directories for libc++ headers
This is the idiomatic way to handle include directories in CMake.
Differential Revision: https://reviews.llvm.org/D122614
Peter S. Housel [Thu, 2 Dec 2021 07:11:49 +0000 (23:11 -0800)]
[ORC-RT][ORC] Handle dynamic unwind registration for libunwind
This changes the ELFNix platform Orc runtime to use, when available,
the __unw_add_dynamic_eh_frame_section interface provided by libunwind
for registering .eh_frame sections loaded by JITLink. When libunwind
is not being used for unwinding, the ELFNix platform detects this and
defaults to the __register_frame interface provided by libgcc_s.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D114961
Joseph Huber [Thu, 5 May 2022 22:09:55 +0000 (18:09 -0400)]
[OpenMP] Try to Infer target triples using the offloading architecture
Currently we require the `-fopenmp-targets=` option to specify the
triple to use for the offloading toolchains, and the `-Xopenmp-target=`
option to specify architectures to a specific toolchain. The changes
made in D124721 allowed us to use `--offload-arch=` to specify multiple
target architectures. However, this can become combersome with many
different architectures. This patch introduces functinality that
attempts to deduce the target triple and architectures from the
offloading action. Currently we will deduce known GPU architectures when
only `-fopenmp` is specified.
This required a bit of a hack to cache the deduced architectures,
without this we would've just thrown an error when we tried to look up
the architecture again when generating the job. Normally we require the
user to manually specify the toolchain arguments, but here they would
confict unless we overrode them.
Depends on: D124721
Reviewed By: saiislam
Differential Revision: https://reviews.llvm.org/D125050
Joseph Huber [Sat, 30 Apr 2022 22:46:58 +0000 (18:46 -0400)]
[OpenMP] Allow compiling multiple target architectures with OpenMP
This patch adds support for OpenMP to use the `--offload-arch` and
`--no-offload-arch` options. Traditionally, OpenMP has only supported
compiling for a single architecture via the `-Xopenmp-target` option.
Now we can pass in a bound architecture and use that if given, otherwise
we default to the value of the `-march` option as before.
Note that this only applies the basic support, the OpenMP target runtime
does not yet know how to choose between multiple architectures.
Additionally other parts of the offloading toolchain (e.g. LTO) require
the `-march` option, these should be worked out later.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D124721
River Riddle [Thu, 21 Apr 2022 04:39:22 +0000 (21:39 -0700)]
[mlir] Remove special case parsing/printing of `func` operations
This was leftover from when the standard dialect was destroyed, and
when FuncOp moved to the func dialect. Now that these transitions
have settled a bit we can drop these.
Most updates were handled using a simple regex: replace `^( *)func` with `$1func.func`
Differential Revision: https://reviews.llvm.org/D124146
Sanjay Patel [Fri, 6 May 2022 19:48:41 +0000 (15:48 -0400)]
[InstCombine] canonicalize fneg after shuffle
For the unary shuffle pattern, this is opposite to what we try
to do with binops, but it seems better to keep it consistent
with the motivating binary shuffle pattern. On that, it is
clearly better on the usual no-extra uses case.
There is a chance that this will pull an fneg away from some
other binop and cause a regression in codegen, but that should
be invertible in the backend. The transform is birectional:
https://alive2.llvm.org/ce/z/kKaKCU
https://alive2.llvm.org/ce/z/3Desfw
Fixes #45631
Sanjay Patel [Fri, 6 May 2022 19:23:48 +0000 (15:23 -0400)]
[InstCombine] add tests for shuffle with fneg operand(s); NFC
issue #45631
Nico Weber [Fri, 6 May 2022 20:24:51 +0000 (16:24 -0400)]
Revert "Automatically generates several X86/sse tests cases. NFC"
This reverts commit
324d696c154aad42b2580d2f225a677c04fe0ab4.
Broke check-llvm on Windows, see e.g.
https://lab.llvm.org/buildbot/#/builders/216/builds/4005 and
comment on https://reviews.llvm.org/rG324d696c154aad42b2580d2f225a677c04fe0ab4
Petr Hosek [Tue, 16 Nov 2021 20:54:11 +0000 (12:54 -0800)]
[Driver] Pass --fix-cortex-a53-843419 automatically on Fuchsia
When targeting cortex-a53, set this linker flag rather than relying
on the toolchain users to do it in their build.
Differential Revision: https://reviews.llvm.org/D114023
Mehdi Amini [Fri, 6 May 2022 20:20:03 +0000 (20:20 +0000)]
Fix build with shared libs: add missing CMake dep to MLIR sparse pipeline
Mehdi Amini [Fri, 6 May 2022 00:00:14 +0000 (00:00 +0000)]
Apply clang-tidy fixes for bugprone-copy-constructor-init in TestPassManager.cpp (NFC)
Mehdi Amini [Thu, 5 May 2022 23:22:38 +0000 (23:22 +0000)]
Apply clang-tidy fixes for readability-identifier-naming in SparseTensorUtils.cpp (NFC)
Mehdi Amini [Thu, 5 May 2022 23:10:19 +0000 (23:10 +0000)]
Apply clang-tidy fixes for llvm-include-order in Merger.cpp (NFC)
Philip Reames [Fri, 6 May 2022 20:10:05 +0000 (13:10 -0700)]
[riscv] Use early return to reduce nesting for InsertVSETVLI [nfc]
Philip Reames [Fri, 6 May 2022 19:53:34 +0000 (12:53 -0700)]
[riscv] Add early return to InsertVSETLI fixed point step [nfc]
If the income state hasn't changed, and the step function is fixed by assumption, then the output state can't have changed.
In the current algorithm, this is a very minor win and mostly allows adding tracing output without being horrible verbose.
Philip Reames [Fri, 6 May 2022 19:50:24 +0000 (12:50 -0700)]
[riscv] Add some minimal tracing output to InsertVSETVLI
Only available with -debug. Main purpose is simplifying an upcoming change, and providing tools for debugging problems.
David Green [Fri, 6 May 2022 20:03:22 +0000 (21:03 +0100)]
Revert "[DAGCombine] Make combineShuffleOfBitcast LittleEndian specific"
This reverts commit
891c3cf99e100e8871aff9a0747c887a5d0a8b0f as it turns
out that the error was not caused by this commit, the error caming
from D124526 instead.
Nico Weber [Fri, 6 May 2022 19:54:29 +0000 (15:54 -0400)]
[gn build] (semi-manually) port
7e63a0d479dd
Shivam [Fri, 6 May 2022 19:50:45 +0000 (01:20 +0530)]
Update ReleaseNotes.rst
Shivam [Fri, 6 May 2022 19:49:46 +0000 (01:19 +0530)]
update the doc for the static analyzer checker
Shivam [Fri, 6 May 2022 19:46:22 +0000 (01:16 +0530)]
Added the brief discription about the new CSA checker.
Louis Dionne [Tue, 1 Mar 2022 14:17:57 +0000 (09:17 -0500)]
[runtimes] Always configure libc++abi before libc++
That makes it possible to reuse libc++abi targets from the libc++
configuration, which is necessary to allow major CMake simplifications.
As a fly-by fix, we also unify how compiler-rt ordering is handled so
it matches how libc++ and libc++abi are handled (compiler-rt always
ends up first).
Differential Revision: https://reviews.llvm.org/D120719
Mehdi Amini [Fri, 6 May 2022 19:38:49 +0000 (19:38 +0000)]
Enable the use of ThreadPoolTaskGroup in MLIR threading helper to enable nested parallelism
The LLVM ThreadPool recently got the addition of the concept of
ThreadPoolTaskGroup: this is a way to "partition" the threadpool
into a group of tasks and enable nested parallelism through this
grouping at every level of nesting.
We make use of this feature in MLIR threading abstraction to fix a long
lasting TODO and enable nested parallelism.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D124902
Mehdi Amini [Thu, 5 May 2022 23:09:44 +0000 (23:09 +0000)]
Apply clang-tidy fixes for llvm-else-after-return in Merger.cpp (NFC)
Mehdi Amini [Thu, 5 May 2022 23:02:38 +0000 (23:02 +0000)]
Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpenMPDialect.cpp (NFC)
Yitzhak Mandelbaum [Fri, 6 May 2022 19:23:15 +0000 (19:23 +0000)]
[clang-tidy][NFC] Fix doc typo for bugprone-unchecked-optional-access
Michael Jones [Thu, 7 Apr 2022 21:22:48 +0000 (14:22 -0700)]
[libc][NFC] add index mode to printf parser
This patch is a followup to the previous patch which implemented the
main printf parsing logic as well as sequential mode. This patch adds
index mode.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D123424
Yitzhak Mandelbaum [Sun, 6 Mar 2022 19:01:46 +0000 (19:01 +0000)]
[clang-tidy] New check for safe usage of `std::optional` and like types.
This check verifies the safety of access to `std::optional` and related
types (including `absl::optional`). It is based on a corresponding Clang
Dataflow Analysis, which does most of the work. This check merely runs it and
converts its findings into diagnostics.
Differential Revision: https://reviews.llvm.org/D121120
python3kgae [Thu, 5 May 2022 06:15:40 +0000 (23:15 -0700)]
[HLSL] add -fcgl option flag.
fcgl option will make compilation stop after clang codeGen and output the llvm ir.
It is added to check clang codeGen output for HLSL.
It will be translated into -S -emit-llvm and -disable-llvm-passes.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D124983
Michael Jones [Thu, 5 May 2022 23:40:28 +0000 (16:40 -0700)]
[libc] Update windows entrypoint list
The entrypoint list for windows hasn't been updated in a while, this
adds all of the entrypoints that are working for windows now.
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D125058
Sam McCall [Fri, 6 May 2022 16:24:48 +0000 (18:24 +0200)]
[clangd] Speed up a slow sleeping testcase.
This testcase runs slowly due to 3.2s of sleeps = 2 + 1 + 0.2s.
After this patch it has 0.55s only.
Reduced by:
- observed that the last test was bogus: we were sleeping until the queue was
idle, effectively just a second copy of the first test. This avoids 1s sleep.
- when waiting for debounce, sleep only until test passes, not for enough
time to be safe (in practice was 2x debounce time, now 1x debounce time)
- scaling delays down by a factor of 2 (note: factor of 10 caused bot failures)
Differential Revision: https://reviews.llvm.org/D125103
Kazu Hirata [Fri, 6 May 2022 18:04:17 +0000 (11:04 -0700)]
[AArch64] Fix sub with carry
13403a70e45b2d22878ba59fc211f8dba3a8deba introduced a bug where we
generate the outgoing carry inverted, which in turn breaks the
lowering of @llvm.usub.sat.i128, returning the normal difference on
saturation and zero otherwise.
Note that AArch64 has peculiar semantics where the subtraction
instructions generate borrow inverted. The problem is that we mix the
two forms of semantics -- the normal carry and inverted carry -- in
the area of extended precision subtractions. Specifically, we have
three problems:
- lowerADDSUBCARRY takes the non-inverted incoming carry from a
subtraction and feeds it to SBCS without inverting it first.
- lowerADDSUBCARRY makes available the outgoing carry from SBCS
without inverting it.
- foldOverflowCheck folds:
(SBC{S} l r (CMP (CSET LO carry) 1)) => (SBC{S} l r carry)
When the incoming carry flag is set, CSET LO results in zero. CMP
in turn generates a borrow, *clearing* the carry flag. Instead, we
should fold:
(SBC{S} l r (CMP 0 (CSET LO carry))) => (SBC{S} l r carry)
When the incoming carry flag is set, CSET LO results in zero. CMP
does not generate a borrow, *setting* the carry flag.
IIUC, we should use the normal (that is, non-inverted) semantics for
carry everywhere.
This patch fixes the three problems above.
This patch does not add any new testcases because we have a plenty of
them covering the instruction in question. In particular,
@u128_saturating_sub is identical to the testcase in the motivating
issue.
Fixes: #55253
Differential Revision: https://reviews.llvm.org/D124976
David Green [Fri, 6 May 2022 17:42:44 +0000 (18:42 +0100)]
[DAGCombine] Make combineShuffleOfBitcast LittleEndian specific
Something is going wrong with the BigEndian PowerPC bot. It is hard to
tell what is wrong from here, but attempt to fix it by disabling the
combineShuffleOfBitcast combine for bigendian.
Aart Bik [Fri, 6 May 2022 16:47:59 +0000 (09:47 -0700)]
[mlir][sparse] integration test for zero preserving math op
Also fixes omission in lowering math ops that require lib support
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D125104
Philip Reames [Thu, 5 May 2022 19:50:47 +0000 (12:50 -0700)]
[riscv] Add strict asserts for VSETVLI insertion algorithm to help catch bugs
This assertion should hold for any reasonable data flow algorithm, but is known not to in several cases today. I'd like to go ahead and land this off-by-default, so that we can collaborate on fixes and have a common definition of success.
Differential: https://reviews.llvm.org/D125035
David Green [Fri, 6 May 2022 17:23:36 +0000 (18:23 +0100)]
[AArch64] Add extra reverse costs.
This adds some extra costs for reverse shuffles under AArch64, filling
in the i16/f16/i8 gaps in the cost model.
Differential Revision: https://reviews.llvm.org/D124786
Florian Hahn [Fri, 6 May 2022 16:59:22 +0000 (17:59 +0100)]
[InstCombine] Add tests for combining AArch64 neon min/max intrinsics.
Louis Dionne [Fri, 6 May 2022 16:41:07 +0000 (12:41 -0400)]
[libc++][NFC] Fix formatting that was incorrectly changed by D124695
Martin Sebor [Fri, 6 May 2022 16:34:13 +0000 (10:34 -0600)]
[SimplifyLibcalls] Tests for libcall folding of subobjects [NFC]
Add tests exercising the future enancement of folding library function
calls with arguments involving subobjects such as elements of arrays
or struct members.
Craig Topper [Fri, 6 May 2022 16:39:39 +0000 (09:39 -0700)]
[SelectionDAG] Improve asserts in SelectionDAG::getSelect.
The VT passed in must match the type of LHS and RHS.
Previously we only checked that the vectorness matched.
Nathan James [Fri, 6 May 2022 16:30:30 +0000 (17:30 +0100)]
[clang-tidy][NFC] Add createChecks method that also checks for LangaugeOptions
This method won't add a check if it isn't supported in the Contexts current LanguageOptions.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D124320
Craig Topper [Fri, 6 May 2022 07:04:43 +0000 (00:04 -0700)]
[SelectionDAG] Clear promoted bits before UREM on shift amount in PromoteIntRes_FunnelShift.
Otherwise we have garbage in the upper bits that can affect the
results of the UREM.
Fixes PR55296.
Differential Revision: https://reviews.llvm.org/D125076
Amaury Séchet [Fri, 6 May 2022 15:54:31 +0000 (15:54 +0000)]
Automatically generates several X86/sse tests cases. NFC
Amaury Séchet [Fri, 6 May 2022 15:44:50 +0000 (15:44 +0000)]
Automatically generate CodeGen/X86/sse-align-*.ll test cases. NFC
Daniil Dudkin [Fri, 6 May 2022 15:18:33 +0000 (18:18 +0300)]
[flang] Fix internal error with DATA-statement style initializers
The code below causes flang to crash with an exception.
After fixing the crash flang with an internal error "no symbol found for 'bar'"
This change fixes all the issues.
program name
implicit none
integer, parameter :: bar = 1
integer foo(bar) /bar*2/
end program name
Reviewed By: kiranchandramohan, klausler
Differential Revision: https://reviews.llvm.org/D124914
Joseph Huber [Fri, 6 May 2022 13:37:08 +0000 (09:37 -0400)]
[OpenMP] Add basic support for properly handling static libraries
Currently we handle static libraries like any other object in the
linker wrapper. However, this does not preserve the sematnics that
dictate static libraries should be lazily loaded as the symbols are
needed. This allows us to ignore linking in architectures that are not
used by the main application being compiled. This patch adds the basic
support for detecting if a file came from a static library, and only
including it in the link job if it's used by other object files.
This patch only adds the basic support, to be more correct we should
check the symbols and only inclue the library if the link job contains
symbols that are needed. Ideally we could just put this on the linker
itself, but nvlink doesn't seem to support `.a` files.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D125092
Sam McCall [Fri, 6 May 2022 15:18:39 +0000 (17:18 +0200)]
Revert "[clangd] Speed up an unfortunate timer-based test."
This reverts commit
076dd0a763fd803897b0f806e0e350a27d2c087c.
http://45.33.8.238/macm1/34776/step_9.txt
Louis Dionne [Fri, 6 May 2022 15:18:01 +0000 (11:18 -0400)]
[libc++][NFC] Add release note for constexpr std::string
Nikita Popov [Fri, 6 May 2022 14:48:02 +0000 (16:48 +0200)]
[InstCombine] Fold icmp of select with implied condition
When threading the icmp over the select, check whether the
condition can be folded when taking into account the select
condition.
Nikita Popov [Fri, 6 May 2022 14:59:57 +0000 (16:59 +0200)]
[InstCombine] Add icmp of select with implied condition tests (NFC)
Sam McCall [Fri, 6 May 2022 15:09:02 +0000 (17:09 +0200)]
Sam McCall [Fri, 6 May 2022 15:05:47 +0000 (17:05 +0200)]
[Frontend] Fix broken createInvocation test due to bad merge
Louis Dionne [Fri, 6 May 2022 15:02:17 +0000 (11:02 -0400)]
[libc++][NFC] Move swap_noexcept test to .compile.pass.cpp
Louis Dionne [Fri, 6 May 2022 14:49:14 +0000 (10:49 -0400)]
[libc++][NFC] Slight refactoring of some std::vector tests
Fangrui Song [Fri, 6 May 2022 14:49:42 +0000 (07:49 -0700)]
[ELF] Change (NOLOAD) type mismatch to use SHT_NOBITS instead of SHT_PROGBITS
Placing a non-SHT_NOBITS input section in an output section specified with
(NOLOAD) is fishy but used by some projects. D118840 changed the output type to
SHT_PROGBITS, but using the specified type seems to make more sense and improve
GNU ld compatibility: `(NOLOAD)` seems to change the output section type
regardless of input.
I think we should keep the current type mismatch warning as it does indicate an
error-prone usage.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D125074
Simon Pilgrim [Fri, 6 May 2022 14:39:05 +0000 (15:39 +0100)]
[MC][X86] Add vcmpps disassembler tests for Issue #41491
We were missing coverage for vcmpps imm, vreg, vreg, mreg {mreg} patterns
Simon Pilgrim [Fri, 6 May 2022 14:17:00 +0000 (15:17 +0100)]
[DAG] visitREM - merge buildOptimizedSREM into if(). NFCI.
Sam McCall [Fri, 6 May 2022 14:34:06 +0000 (16:34 +0200)]
[clangd] Eliminate direct usage of isAvailable() matcher. NFC
This prepares to replace the implementation of EXPECT_[UN]AVAILABLE with
something more efficient.
Sam McCall [Fri, 6 May 2022 14:29:10 +0000 (16:29 +0200)]
[clangd] Speed up an unfortunate timer-based test.
Sam McCall [Fri, 6 May 2022 14:21:23 +0000 (16:21 +0200)]
Fix lifetime of DiagnosticsEngine in diagtool.
Sam McCall [Thu, 5 May 2022 14:17:47 +0000 (16:17 +0200)]
[clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC
(Followup from
40c13720a4b977d4347bbde53c52a4d0703823c2)
Differential Revision: https://reviews.llvm.org/D125012
PeixinQiao [Fri, 6 May 2022 14:19:20 +0000 (22:19 +0800)]
[flang] Add one semantic check for masked array assignment
As Fortran 2018 states, in each where-assignment-stmt, the mask-expr and
the variable being defined shall be arrays of the same shape. The
previous check does not consider checking if it is an array.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D125022
PeixinQiao [Fri, 6 May 2022 14:14:51 +0000 (22:14 +0800)]
[flang] Support external procedure passed as actual argument with implicit character type
As Fortran 2018 15.5.2.9 point 2, the actual argument and dummy argument
have the same type and type parameters and an external function with
assumed character length may be associated with a dummy argument with
explicit character length. As Fortran 2018 15.5.2.9 point 7, if an
external procedure is used as an actual argument, it can be explicitly
declared to have the EXTERNAL attribute. This supports the external
procedure passed as actual argument with implicit character type, either
explicit character length or assumed character length.
Reviewed By: Jean Perier, klausler
Differential Revision: https://reviews.llvm.org/D124345
Kadir Cetinkaya [Fri, 6 May 2022 12:32:04 +0000 (14:32 +0200)]
[clangd] Add parsing for IgnoreHeaders config option
PeixinQiao [Fri, 6 May 2022 14:10:13 +0000 (22:10 +0800)]
[flang] Fix AllocaOp/AllocMemOp type conversion
For arrays without a constant interior or arrays of character with
dynamic length arrays, the data types are converted to a pointer to the
element type, so the scale size of the constant extents needs to be
counted. The previous AllocaOp conversion does not consider the arrays
of character with dynamic length arrays, and the previous AllocMemOp
conversion does not consider arrays without a constant interior. This
fixes them and refactors the code so that it can be shared. Also add
the test cases.
Reviewed By: Jean Perier
Differential Revision: https://reviews.llvm.org/D124766
Nikita Popov [Fri, 6 May 2022 13:07:01 +0000 (15:07 +0200)]
[InstCombine] Fold icmp of select with non-constant operand
Try to push an icmp into a select even if the icmp operand isn't
constant - perform a generic SimplifyICmpInst instead.
This doesn't appear to impact compile-time much, and forming
logical and/or is generally profitable, as we have very good
support for them.
Nikita Popov [Fri, 6 May 2022 13:59:01 +0000 (15:59 +0200)]
[InstCombine] Add additional icmp of select tests (NFC)
LLVM GN Syncbot [Fri, 6 May 2022 13:54:41 +0000 (13:54 +0000)]
[gn build] Port
586efd52b93f
LLVM GN Syncbot [Fri, 6 May 2022 13:54:40 +0000 (13:54 +0000)]
[gn build] Port
37ba1b9d1ac7
Nico Weber [Fri, 6 May 2022 13:52:58 +0000 (09:52 -0400)]
Revert "[HWASan] Allow to linkify symbolizer output."
This reverts commit
4af9392e13a212fe295dc33455bc591b2dc8f859.
The new test fails on several machines (including some bots),
see https://reviews.llvm.org/D124950
Nico Weber [Fri, 6 May 2022 13:52:32 +0000 (09:52 -0400)]
Revert "[HWASan] Clean up hwasan_symbolize."
This reverts commit
6ca1df61d29c1c46d8d6f51a1091a7651c8b1ab1.
Prerequisite for reverting
4af9392e13a212fe295dc.
Louis Dionne [Mon, 11 Apr 2022 14:42:45 +0000 (10:42 -0400)]
[libc++][P0943] Add stdatomic.h header.
* https://wg21.link/P0943
* https://eel.is/c++draft/stdatomic.h.syn
This is a re-application of
5d1c1a24, which was reverted in
987c7f407
because it broke the LLDB build.
Co-authored-by: Marek Kurdej <marek.kurdej@gmail.com>
Differential Revision: https://reviews.llvm.org/D97044
Sam McCall [Fri, 6 May 2022 13:50:33 +0000 (15:50 +0200)]
[Support] Fix asan AllocatorTest after
ba0d50ad7ec66
We were counting the number of bytes allocated, but under asan there's
extra redzone bytes by default. Disable this.
Simon Pilgrim [Fri, 6 May 2022 13:49:27 +0000 (14:49 +0100)]
[SLP][X86] Add test coverage for Issue #51088
Simon Pilgrim [Fri, 6 May 2022 13:34:39 +0000 (14:34 +0100)]
[clang][X86] Rename some intrinsics tests to use the *-builtins.c naming convention
Ben Shi [Fri, 6 May 2022 07:21:19 +0000 (07:21 +0000)]
[compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3
Reviewed By: aykevl, dylanmckay
Differential Revision: https://reviews.llvm.org/D125077
Max Kazantsev [Fri, 6 May 2022 13:42:30 +0000 (20:42 +0700)]
[RS4GC] Add support for 'freeze' instruction to findBaseDefiningValue
Because this instruction is a noop, we can simply go through it in
search of the base.
Nico Weber [Fri, 6 May 2022 12:33:16 +0000 (08:33 -0400)]
[gn build] try to (manually) port
9ef451d1fdaa9a1 (hwasan_symbolize)
needed by check-hwasan as of
4af9392e13a212
Max Kazantsev [Fri, 6 May 2022 13:31:04 +0000 (20:31 +0700)]
[NFC] Fix typo in assert message
Yitzhak Mandelbaum [Fri, 6 May 2022 12:56:44 +0000 (12:56 +0000)]
[clang][dataflow][NFC] Clarify guarantees on returned vector size for `runDataflowAnalysis`.
Adjusts the comment to specify that the output vector's size matches the number of CFG blocks.
Differential Revision: https://reviews.llvm.org/D125091
Nikita Popov [Thu, 5 May 2022 13:47:34 +0000 (15:47 +0200)]
[MLIR] Fix build with make
https://reviews.llvm.org/D124075 causes MLIR to no longer build
when using make rather than ninja, due to a tablegen-generated
header being used before it is created.
It seems that this is related to the use of LLVM_ENABLE_OBJLIB when
using add_tablgen with a non-Ninja/Xcode generator. In that case an
intermediate objlib target is generated.
This patch fixes the issue by a) declaring dependencies in
add_tablegen for mlir-pdll and b) making sure those dependencies
are added to the objlib target.
Differential Revision: https://reviews.llvm.org/D125010
Aaron Ballman [Fri, 6 May 2022 12:47:19 +0000 (08:47 -0400)]
Fix underlining length; NFC
Nikita Popov [Fri, 6 May 2022 12:46:12 +0000 (14:46 +0200)]
[InstCombine] Extract icmp of select transform (NFC)
To make it either to extend to the case where the other operand
is not a constant.
Simon Pilgrim [Fri, 6 May 2022 12:29:40 +0000 (13:29 +0100)]
[CostModel][X86] Relax fcmp costs on SSE41 targets or later
Only pre-SSE41 targets double-pump the fp comparison ops
Fraser Cormack [Thu, 5 May 2022 10:06:41 +0000 (11:06 +0100)]
[InstCombine] Fix scalable-vector bitwise select matching
D113035 enhanced the matching of bitwise selects from vector types. This
change unfortunately introduced crashes as it tries to cast scalable
vector types to integers.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D124997
Simon Pilgrim [Fri, 6 May 2022 12:07:26 +0000 (13:07 +0100)]
[CostModel][X86] Adjust 128-bit select costs to account for slow BLENDV op
Based off the script from D103695 - Jaguar, Bulldozer, Silvermont (et al) and Haswell all have slow BLENDV ops, so adjust the worse case cost values
Kiran Chandramohan [Fri, 6 May 2022 11:45:18 +0000 (11:45 +0000)]
[Flang][OpenMP] Initial lowering of the OpenMP worksharing loop
The OpenMP worksharing loop operation in the dialect is a proper loop
operation and not a container of a loop. So we have to lower the
parse-tree OpenMP loop construct and the do-loop inside the construct
to a omp.wsloop operation and there should not be a fir.do_loop inside
it. This is achieved by skipping fir.do_loop creation and calling genFIR
for the nested evaluations in the lowering of the do construct.
Note: Handling of more clauses, parallel do, storage of loop index variable etc will come in separate patches.
Part of the upstreaming effort to move LLVM Flang from fir-dev branch of
https://github.com/flang-compiler/f18-llvm-project to the LLVM Project.
Reviewed By: peixin
Differential Revision: https://reviews.llvm.org/D125024
Co-authored-by: Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com>
Co-authored-by: Shraiysh Vaishay <Shraiysh.Vaishay@amd.com>
Fraser Cormack [Fri, 6 May 2022 11:14:09 +0000 (12:14 +0100)]
[RISCV] Add an extra vsetvli insertion test
This test starts failing with the changes in D125021.
Nikolas Klauser [Wed, 4 May 2022 12:19:09 +0000 (14:19 +0200)]
[libc++] Implement ranges::is_partitioned
Reviewed By: var-const, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D124440
Simon Pilgrim [Fri, 6 May 2022 10:41:45 +0000 (11:41 +0100)]
[CostModel][X86] Adjust pre-SSE41 fp scalar select costs to account for vector ops
Based off the script from D103695, we now mainly use BLENDV or OR(AND,ANDN) to select scalar float/double ops
Sam McCall [Wed, 16 Mar 2022 18:46:28 +0000 (19:46 +0100)]
Generalize "check-all" umbrella targets, use for check-clang-tools
The mechanism behind "check-all" is recording params of add_lit_testsuite()
calls in global variables LLVM_LIT_*, and then creating an extra suite with
their union at the end.
This avoids composing the check-* targets directly, which doesn't work well.
We generalize this by allowing multiple families of variables LLVM_{name}_LIT_*:
umbrella_lit_testsuite_begin(check-foo)
... test suites here will be added to LLVM_FOO_LIT_* variables ...
umbrella_lit_testsuite_end(check-foo)
(This also moves some implementation muck out of {llvm,clang}/CMakeLists.txt
This patch also changes check-clang-tools to use be an umbrella test target,
which means the clangd and clang-pseudo tests are included in it, along with the
the other testsuites that already are (like check-clang-extra-clang-tidy).
Differential Revision: https://reviews.llvm.org/D121838
Simon Pilgrim [Fri, 6 May 2022 10:27:37 +0000 (11:27 +0100)]
[CostModel][X86] Adjust 256-bit select costs to account for slow BLENDV op
Based off the script from D103695, on AVX1, Jaguar/Bulldozer both have low throughput for ymm select patterns (BLENDV + OR(AND,ANDN))), and even on AVX2 Haswell still struggles with BLENDV ops
Simon Pilgrim [Fri, 6 May 2022 10:21:44 +0000 (11:21 +0100)]
[SLP][X86] Regenerate ssat tests to remove defunct AVX1/AVX2 checks
Sam McCall [Wed, 6 Apr 2022 19:29:59 +0000 (21:29 +0200)]
[pseudo] Strip directives from a token stream
This includes only the taken branch of conditional sections.
The API allows for producing a stream for a particular PP branch, which
will be used later for the secondary GLR parses of not-taken branches.
Differential Revision: https://reviews.llvm.org/D123243
Balazs Benics [Fri, 6 May 2022 10:13:51 +0000 (12:13 +0200)]
Revert "[analyzer] Canonicalize SymIntExpr so the RHS is positive when possible"
It seems like multiple users are affected by a crash introduced by this
commit, thus I'm reverting it for the time being.
Read more about the found reproducers at Phabricator.
Differential Revision: https://reviews.llvm.org/D124658
This reverts commit
f0d6cb4a5cf5723d7ddab2c7dab74f2f62116a6d.
David Spickett [Thu, 21 Apr 2022 14:09:56 +0000 (14:09 +0000)]
[libcxx] Reject month 0 in get_date/__get_month
[libcxx] Reject month 0 in get_date/__get_month
This fixes #47663.
Months in dates should be >= 1 and <= 12.
We parse up to two digits then minus one, because
we want to store this as "months since January"
(0-11).
However we didn't check that the result of that
was not -1. For example if you had (MM/DD/YYYY)
00/21/2022.
Added tests for:
* Failing if month is 0
* Failing if month is 13
* Allowing a leading zero in month e.g. "01"
Note that libc++ and libstdc++ return different
values on parsing failure, and MSVC STL returns
end of stream instead.
Handle the first two by checking for defines, MSVC STL
expects these tests to fail for other reasons already:
https://github.com/microsoft/STL/blob/main/tests/libcxx/expected_results.txt#L372
so not handling that case here.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D124175