Commit Graph

414377 Commits

Author SHA1 Message Date
Craig Topper e305b1de7e [RISCV] Pre-process integer ISD::SPLAT_VECTOR to RISCISD::VMV_V_X_VL before isel.
This allows us to remove some isel patterns that exist for both
operations. Saving nearly 3000 bytes from the isel table.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D119197
2022-02-09 08:10:21 -08:00
Mark de Wever d9d2ebbfcb [libc++][nfc] Use TEST_HAS_NO_WIDE_CHARACTERS.
This avoids using an libc++ internal macro in our tests.

Reviewed By: #libc, Quuxplusone

Differential Revision: https://reviews.llvm.org/D119263
2022-02-09 17:10:12 +01:00
Craig Topper 60745fb16f [VP] llvm.vp.fneg intrinsic and LangRef
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D119262
2022-02-09 07:54:36 -08:00
Mircea Trofin 62a775f1ea [nfc][mlgo] Make error message macro
`llvm_unreachable` is itself a macro, so using a constant for its
message renders that constant unused in non-debug builds.
2022-02-09 07:27:21 -08:00
Pavel Labath 9611282c64 [lldb] Stabilize threaded windows lldb-server tests
The tests enabled in 9e699595 are not passing reliably -- sometimes they
report seeing fewer threads than expected.

Based on my (limited) research, this is not a lldb bug, but simply a
consequence of the operating system reporting their presence
asynchronously -- they're reported when they are scheduled to run (or
something similar), and not at the time of the CreateThread call.

To fix this, I add some additional synchronization to the test inferior,
which makes sure that the created thread is alive before continuing to
do other things.
2022-02-09 16:18:27 +01:00
Pavel Labath 96000f5c2b [lldb] Simplify SBCommandInterpreter::SourceInitFileInHomeDirectory
just have it delegate to the new overload.
2022-02-09 16:18:27 +01:00
Alexey Bataev 370ea1a199 [SLP][NFC]Fix comment, NFC. 2022-02-09 07:14:14 -08:00
Sven van Haastregt a464444b28 [OpenCL][Docs] Update OpenCL 3.0 status info
Update the table to reflect recently committed work.
2022-02-09 15:12:49 +00:00
Chris Bieneman 1652c4f2fe [NFC] Fixing test requirements I broke
I broke these in 7a0cbe11fb, thanks @ikudrin for catching it!
2022-02-09 09:11:34 -06:00
Louis Dionne f13dff68d1 [libc++] Try to fix the quoting of -isystem on Windows bots 2022-02-09 10:08:12 -05:00
Simon Pilgrim 6d68ece61f [X86] Refresh funnel/rotate AVX512 VBMI tests
Assume that if VBMI2 is enabled then VBMI is as well - correctly shows the fallback and widening code that real world targets will actually see
2022-02-09 15:04:40 +00:00
Sander de Smalen bcbad75a7c [AArch64][SVE] NFC: Add test file for predicate vector reductions.
This adds some tests for vector reductions which can and should
be implemented with ptest as opposed to promoted ANDV/ORV reduction.
2022-02-09 15:00:08 +00:00
Sander de Smalen 381767a274 [AArch64] NFC: Autogen check lines for sve-setcc.ll 2022-02-09 14:32:50 +00:00
Sander de Smalen ec46232517 [DAGCombiner] Fold `ty1 extract_vector(ty2 splat(V)) -> ty1 splat(V)`
This seems like an obvious fold, which leads to a few improvements.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D118920
2022-02-09 14:30:01 +00:00
Alexander Belyaev c962038914 [mlir][nfc] Expose linalg tiling helpers.
Differential Revision: https://reviews.llvm.org/D119330
2022-02-09 15:26:06 +01:00
Valentin Clement fd0417a3cf
[flang] Add type conversion for !fir.box<none>
`none` is used in `fir.box` type to specify a polymorphic type.
This patch add the conversion from `!fir.box<none>` to LLVM.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D119325

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
2022-02-09 15:13:47 +01:00
Aaron Ballman 25098736c1 Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the fifth batch of tests being updated (there are a significant
number of other tests left to be updated).

Note, the behavior of -ast-print is broken. It prints functions with a
prototype (void) as if they have no prototype () in C. Some tests need
to disable strict prototype checking when recompiling the results of an
-ast-print invocation.
2022-02-09 09:11:49 -05:00
Jonathan Peyton 6be7c21b57 [OpenMP][libomp] Replace accidental VLA with KMP_ALLOCA
MSVC does not support variable length arrays. Replace with KMP_ALLOCA
which is already used in the same file for stack-allocated variables.
2022-02-09 08:09:27 -06:00
Louis Dionne 6f17768e11 [runtimes] Remove support for standalone builds
Standalone build have been deprecated for some time now, so this
commit removes support for those builds entirely from libc++, libc++abi
and libunwind.

This, along with the removal of other legacy ways to build, will allow
for major build system simplifications.

Differential Revision: https://reviews.llvm.org/D119255
2022-02-09 08:55:31 -05:00
Louis Dionne eceb40183c [libc++] Avoid -Wmacro-redefined in libc++ headers in the legacy test config 2022-02-09 08:38:06 -05:00
serge-sans-paille 57f7c7d90e Add missing MC includes in bolt/
Changes needed after ef736a1c39 that removes some implicit
dependencies from MrCV headers.
2022-02-09 08:28:34 -05:00
Nikita Popov ea93ca60ef [Bitcode] Fix size check for DIImportedEntity record
This was using && instead of ||.
2022-02-09 14:23:30 +01:00
Nikita Popov 72248712e5 [Bitcode] Check minimum size of constant GEP record
Checking this early, because we may end up reading up to two
records before the operands.
2022-02-09 14:23:30 +01:00
Muhammad Omair Javaid 73a961b9cc [LLDB] Port toolchain-msvc.test for Arm/AArch4 Windows
This patch updates toolchain-msvc.test to cater for Arm64 windows platform.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D117676
2022-02-09 17:40:39 +05:00
Tong Zhang 2fe315162e [X86] TCRETURNmi fix for 32bit platform
This fix is similar to 3cf3ffce240e("Fix the TCRETURNmi64 bug differently.")

after allocating register for index+base, we will only have one register left

This bug affects linux kernel compilation for x86 target. Error happens when compiling kmod_si476x_core.

clang complains:
    error: ran out of registers during register allocation

The full command is:

clang -Wp,-MMD,drivers/mfd/.si476x-cmd.o.d  -nostdinc -isystem /opt/toolchain/main/lib/clang/14.0.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Qunused-arguments -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -no-integrated-as --prefix=/usr/bin/ -Werror=unknown-warning-option -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mstack-alignment=4 -march=atom -mtune=atom -mtune=generic -Wa,-mtune=generic32 -ffreestanding -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=1024 -fno-stack-protector -Wno-format-invalid-specifier -Wno-gnu -mno-global-merge -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -falign-functions=32 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-pointer-to-enum-cast -Wno-tautological-constant-out-of-range-compare     -DKBUILD_MODFILE='"drivers/mfd/si476x-core"' -DKBUILD_BASENAME='"si476x_cmd"' -DKBUILD_MODNAME='"si476x_core"' -D__KBUILD_MODNAME=kmod_si476x_core -c -o drivers/mfd/si476x-cmd.o drivers/mfd/si476x-cmd.c

-------------

LLVM cannot compile the following code for x86 32bit target, the reason is tail call(TCRETURNmi) is using 2 registers for index+base and we want to use more than one registers for passing function args and that is impossible.
This fix is similar to 3cf3ffce240e("Fix the TCRETURNmi64 bug differently.").
We will only use tail call when it is using <=1 registers for passing args.

```
struct BIG_PARM {
	int ver;
};

static struct {
	int (*foo)  (struct BIG_PARM* a, void *b);
	int (*bar)  (struct BIG_PARM* a);
	int (*zoo0) (void);
	int (*zoo1) (void);
	int (*zoo2) (void);
	int (*zoo3) (void);
	int (*zoo4) (void);
} vtable[] = {
	[0] = {
		.foo = (int (*)(struct BIG_PARM* a, void *b))0xdeadbeef,
	},
};

int something(struct BIG_PARM *a, void* b) {
	return vtable[a->ver].foo(a,b);
}

```

```
$ clang -std=gnu89 -m32 -mregparm=3 -mtune=generic -fno-strict-overflow -O2 -c t0.c -o t0.c.o
error: ran out of registers during register allocation
1 error generated.
```

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D118312
2022-02-09 20:34:04 +08:00
Tim Northover 8366e182d5 Revert "X86: gate all vmovsh instructions on FP16 support."
This reverts commit 3fc40b6e66.

It was pushed unintentionally.
2022-02-09 12:33:23 +00:00
Tim Northover 00e372137c AArch64: do not use xzr for ldxp -> stxp dataflow.
If the result of a cmpxchg is unused, regalloc chooses `xzr` for the defs of
CMP_SWAP_128*. However, on the failure path this gets expanded to a LDXP ->
STXP to store the original value (to ensure no tearing occurred). This
unintentionally nulls out half of the value.

So instead use GPR64common for these defs, so regalloc has to choose a real
one.
2022-02-09 12:29:16 +00:00
Tim Northover 3fc40b6e66 X86: gate all vmovsh instructions on FP16 support.
Previously the `let Predicates = ...` line only applied to the rr version, and
so VMOVSH was being emitted whenever HasAVX512 (the default) applied. This is
not right.
2022-02-09 12:29:16 +00:00
Jay Foad db28a45617 [AMDGPU] Remove irrelevant comments on V_BFE_I32 instructions
These comments explain the encoding of the immediate operand of S_BFE_*
which is not relevant for V_BFE_I32.
2022-02-09 12:06:29 +00:00
Matthias Springer 585a8a321c [mlir][bufferize] OpOperands can have multiple aliasing OpResults
This makes getAliasingOpResult symmetric to getAliasingOpOperand. The previous implementation was confusing for users and implemented in such a way only because there are currently no bufferizable ops that have multiple aliasing OpResults.

Differential Revision: https://reviews.llvm.org/D119259
2022-02-09 20:58:45 +09:00
Matthias Springer 22a1973dbe [mlir][linalg][bufferize] Print results of FuncOp read/write analysis
Print more information with test-analysis-only.

Differential Revision: https://reviews.llvm.org/D119118
2022-02-09 20:52:38 +09:00
OCHyams 00b2a9c9da [cross-project-tests] Make GDB version string parsing more robust
Follow up to D118468 (5257efdc5b).

When built from source, gdb's version string looks like this:

    GNU gdb (GDB) 9.2
    ...

But for installed versions it looks different. E.g.

    GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
    ...

Use a regex rather than str.parition in the version string parsing in order to
handle this case too.
2022-02-09 11:45:39 +00:00
Pavel Labath 29caa8583f [lldb] Restore original meaning to test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt
D119167 changed the meaning of that test by removing the use of the
interrupt packet. I did not notice this because the interrupting
happened in a shared utility function.

This patch restores the original meaning of the test, but (almost)
avoids sleeps by using process stdout to synchronize. Sadly, this means
the test stays disabled on windows, as it does not implement output
forwarding.
2022-02-09 12:34:55 +01:00
Simon Pilgrim 4883145a8f [clang] Fix sphinx "start-string without end-string" warning
This looks to introduced in D110869
2022-02-09 11:31:24 +00:00
Simon Pilgrim 2e099c9e60 [clang] Remove duplicate doc index for ClangLinkerWrapper
This looks to be a merge error from D118815
2022-02-09 11:21:36 +00:00
Lian Wang af2cd94555 [RISCV][NFC] Remove useless code
Reviewed By: craig.topper, asb

Differential Revision: https://reviews.llvm.org/D119317
2022-02-09 19:17:25 +08:00
Florian Hahn 8aa122081f
[LV] Pass step to emitTransformedIndex (NFC).
Move out the induction step creation from emitTransformedIndex to the
callers. In some places (e.g. widenIntOrFpInduction) the step is already
created. Passing the step in ensures the steps are kept in sync.
2022-02-09 11:12:45 +00:00
Pavel Labath 9e6995957a [lldb] Adjust windows xfails for D119167
A couple of additional tests pass with that patch. One new test fails
(because it's not testing a slightly different thing). I'll update it
later to restore the original meaning (I don't want to revert as the net
effect is still very positive), but for now this gets the bot green.
2022-02-09 12:04:13 +01:00
OCHyams 5257efdc5b [cross-project-tests] XFAIL llgdb-tests when gdb can't read clang's DWARF
Tests in the `cross-project-tests/debuginfo-tests/llgdb-tests` directory run
gdb on non-darwin platforms. gdb versions less than 10.1 cannot parse the DWARF
v5 emitted by clang, and DWARF v5 is now the default, so these tests fail on
Linux with gdb versions less than 10.1. This patch lets us XFAIL the tests
under these conditions.

Add `gdb-clang-incompatibility` to the `available_features` in
`cross-project-tests/lit.cfg.py` when clang's default DWARF version is 5 or
greater and the gdb (if found) version is less than 10.1.

Discourse discussion:
https://llvm.discourse.group/t/gdb-10-1-cant-read-clangs-dwarf-v5/6035

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D118468
2022-02-09 10:53:35 +00:00
Kirill Bobyrev e3ba831937
[clang] Fix the tooling build after D119130
New StandardLibrary.cpp depends on Clang AST, add the dependency to
CMakeLists.txt

Broken builbot: https://lab.llvm.org/buildbot/#/builders/57/builds/14892
2022-02-09 11:52:03 +01:00
Sven van Haastregt fe690587be [OpenCL] Fix atomic_fetch_add/sub with half type
An error in the tablegen description affects the declarations
provided by `-fdeclare-opencl-builtins` for `atomic_fetch_add` and
`atomic_fetch_sub`.

The atomic argument should be an atomic_half, not an atomic_float.
2022-02-09 10:47:45 +00:00
Benjamin Kramer 356705f94f [bazel] Sync llvm-config.h.cmake after a1862d78eb 2022-02-09 11:28:25 +01:00
Benjamin Kramer 079d847a9a [bazel] Port 46a6f5a 2022-02-09 11:28:24 +01:00
Valentin Clement 0b626df1bc
[flang][NFC] Reorder conversions
During upstreaming the alphabetical order was not respected.
2022-02-09 11:27:23 +01:00
Sheng 01f19cd296 [NFC] test commit
Empty test commit, check commit access
2022-02-09 18:22:01 +08:00
Haojian Wu f1984b1433 [pseudo] Implement LRGraph
LRGraph is the key component of the clang pseudo parser, it is a
deterministic handle-finding finite-state machine, which is used to
generated the LR parsing table.

Separate from https://reviews.llvm.org/D118196.

Differential Revision: https://reviews.llvm.org/D119172
2022-02-09 11:20:07 +01:00
Matthias Springer f30ec8f627 [mlir][linalg][bufferize][NFC] Allow passing custom BufferizationOptions to pass
Differential Revision: https://reviews.llvm.org/D118891
2022-02-09 19:15:31 +09:00
serge-sans-paille ef736a1c39 Cleanup LLVMMC headers
There's a few relevant forward declarations in there that may require downstream
adding explicit includes:

llvm/MC/MCContext.h no longer includes llvm/BinaryFormat/ELF.h, llvm/MC/MCSubtargetInfo.h, llvm/MC/MCTargetOptions.h
llvm/MC/MCObjectStreamer.h no longer include llvm/MC/MCAssembler.h
llvm/MC/MCAssembler.h no longer includes llvm/MC/MCFixup.h, llvm/MC/MCFragment.h

Counting preprocessed lines required to rebuild llvm-project on my setup:
before: 1052436830
after:  1049293745

Which is significant and backs up the change in addition to the usual benefits of
decreasing coupling between headers and compilation units.

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D119244
2022-02-09 11:09:17 +01:00
serge-sans-paille 33986970a4 Prepare for LLVMMC headers cleanup
Be more explicit about which headers should be included in MC files generated by
tblgen.

See also: https://reviews.llvm.org/D119244
2022-02-09 11:09:16 +01:00
Bill Wendling d295a53a92 [X86] Specify Undef for the registers we xor
Fixes expensive check failures from D110869.
2022-02-09 02:06:12 -08:00