Roman Lebedev [Thu, 22 Dec 2022 18:26:40 +0000 (21:26 +0300)]
[NFC][Codegen][X86] Add tests where we could improve `freeze` handling
Fangrui Song [Thu, 22 Dec 2022 20:51:20 +0000 (12:51 -0800)]
[Driver] Revert D139717 and add -Xparser/-Xcompiler instead
Some macOS projects use -Xparser even if it leads to a
-Wunused-command-line-argument warning. It doesn't justify adding a broad Joined
`-X` (IgnoredGCCCompat) as GCC doesn't really support these arbitrary `-X`
options.
Note: `-Xcompiler foo` is a GNU libtool option, not a driver option.
It is misused by some ChromeOS packages (but not by Gentoo).
Keep it for a while.
It seems that GCC < 4.6 reports g++: unrecognized option '-Xfoo' but exit with 0.
GCC >= 4.6 reports g++: error: unrecognized option '-Xfoo' and exits with 1.
It never supports -Xcompiler or -Xparser, so `IgnoredGCCCompat` is not justified.
Differential Revision: https://reviews.llvm.org/D140224
Aart Bik [Thu, 22 Dec 2022 20:10:03 +0000 (12:10 -0800)]
[mlir][sparse] move loop boundary method to codegenenv
Reviewed By: Peiming
Differential Revision: https://reviews.llvm.org/D140578
Fangrui Song [Thu, 22 Dec 2022 20:32:59 +0000 (12:32 -0800)]
Remove incorrectly implemented -mibt-seal
The option from D116070 does not work as intended and will not be needed when
hidden visibility is used. A function needs ENDBR if it may be reached
indirectly. If we make ThinLTO combine the address-taken property (close to
`!GV.use_empty() && !GV.hasAtLeastLocalUnnamedAddr()`), then the condition can
be expressed with:
`AddressTaken || (!F.hasLocalLinkage() && (VisibleToRegularObj || !F.hasHiddenVisibility()))`
The current `F.hasAddressTaken()` condition does not take into acount of
address-significance in another bitcode file or ELF relocatable file.
For the Linux kernel, it uses relocatable linking. lld/ELF uses a
conservative approach by setting all `VisibleToRegularObj` to true.
Using the non-relocatable semantics may under-estimate
`VisibleToRegularObj`. As @pcc mentioned on
https://github.com/ClangBuiltLinux/linux/issues/1737#issuecomment-
1343414686
, we probably need a symbol list to supply additional
`VisibleToRegularObj` symbols (not part of the relocatable LTO link).
Reviewed By: samitolvanen
Differential Revision: https://reviews.llvm.org/D140363
Roman Lebedev [Thu, 22 Dec 2022 19:55:28 +0000 (22:55 +0300)]
[DAGCombiner] `visitFREEZE()`: allow, and update, other uses of maybe-poison operand
Roman Lebedev [Thu, 22 Dec 2022 19:57:01 +0000 (22:57 +0300)]
[NFC][Codegen][X86] Add test for freeze with other uses of maybe-poison operand
Michael Jones [Thu, 22 Dec 2022 20:01:21 +0000 (12:01 -0800)]
[libc][obvious] fix errno for 32 bit long test
one of the tests in StrtolTest.h is intended to detect that 32 bit longs
are handled correctly, but it wasn't using the correct value for errno
causing failures.
Differential Revision: https://reviews.llvm.org/D140577
Kazu Hirata [Thu, 22 Dec 2022 20:01:35 +0000 (12:01 -0800)]
[lldb] Fix a warning
This patch fixes:
lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp:1378:16:
warning: control reaches end of non-void function [-Wreturn-type]
Fangrui Song [Thu, 22 Dec 2022 19:48:55 +0000 (11:48 -0800)]
Revert D138179 "MIPS: fix build from IR files, nan2008 and FpAbi"
This reverts commit
9739bb81aed490bfcbcbbac6970da8fb7232fd34.
It causes `.module is not permitted after generating code`
for Linux kernel's `ARCH=mips 32r1_defconfig` clang+GNU as build.
It's confirmed as a defect, but the proper fix needs time to sort out.
Jessica Paquette [Thu, 22 Dec 2022 19:44:13 +0000 (11:44 -0800)]
Fix indentation in LangRef.rst
Sphinx build was broken.
Matt Arsenault [Tue, 29 Nov 2022 19:12:56 +0000 (14:12 -0500)]
Support: Fix broken C++ marker
Kazu Hirata [Thu, 22 Dec 2022 19:40:19 +0000 (11:40 -0800)]
[mlir] Fix a warning
This patch fixes:
mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp:321:19: warning:
unused variable ‘block’ [-Wunused-variable]
Siva Chandra Reddy [Thu, 22 Dec 2022 00:36:59 +0000 (00:36 +0000)]
[libc] Handle allocation failures gracefully in FILE related API.
Few uses of free have not yet been replaced by the custom operator
delete yet. They will be done in a follow up patch.
Reviewed By: lntue, michaelrj
Differential Revision: https://reviews.llvm.org/D140526
Kazu Hirata [Thu, 22 Dec 2022 19:10:47 +0000 (11:10 -0800)]
[mlir] Fix warnings
This patch fixes:
third-party/unittest/googletest/include/gtest/gtest.h:1526:11:
error: comparison of integers of different signs: 'const unsigned
long' and 'const int' [-Werror,-Wsign-compare]
serge-sans-paille [Thu, 22 Dec 2022 09:48:37 +0000 (10:48 +0100)]
Properly support LLVM_ENABLE_LLD on Windows
Currently, setting -DLLVM_ENABLE_LLD=ON on windows also requires setting
-DCMAKE_LINKER=lld-link.exe. This is both misleading and redundant.
Fix this by trying to find llvm-link.exe when -DLLVM_ENABLE_LLD=ON is
set and CMAKE_LINKER is not, and aborting otherwise.
Differential Revision: https://reviews.llvm.org/D140534
Florian Hahn [Thu, 22 Dec 2022 18:58:22 +0000 (18:58 +0000)]
[VPlan] Add support for tracking UFs applicable to VPlan (NFC).
Explicitly track the UFs supported in a VPlan. This is needed to
allow transformations to restrict the UFs which are supported.
Discussed as separate improvement in D135017.
Koakuma [Thu, 22 Dec 2022 18:50:11 +0000 (13:50 -0500)]
[SPARC] Fix SELECT_REG emission for f128s
In LowerSELECT_CC, SELECT_REG between two f128s should only be emitted if we
have hardware quadfloat enabled.
This should fix issue #59646
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D140515
Mark de Wever [Thu, 22 Dec 2022 18:47:54 +0000 (19:47 +0100)]
[libc++][CI] Improves buildbot runner.
Adds documentation and shows a help message when running the script
without arguments.
Lands parts of D139545.
LLVM GN Syncbot [Thu, 22 Dec 2022 18:42:31 +0000 (18:42 +0000)]
[gn build] Port
eb6e13cb3280
Michael Jones [Tue, 20 Dec 2022 23:37:17 +0000 (15:37 -0800)]
[libc] change str to int tests to be templated
Previously the tests were copy/pasted into several files, this changes
them to be instead templated and sharing one file.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D140441
Mark de Wever [Thu, 15 Dec 2022 17:07:41 +0000 (18:07 +0100)]
[libc++][format] Removes test redundancy.
The format function test serve two purposes:
- Test whether all format functions work in general.
- Test whether all formatting rules are implemented correctly.
At the moment the *pass.cpp tests do both. These tests are quite slow,
while testing all rules for all functions doesn't add much coverage.
There are two execution modi of the format functions:
- run-time validation in the vformat functions.
- compile-time validation in the other function.
So instead of running all tests for all functions, they are only used for
format.pass.cpp and vformat.pass.cpp still do all tests.
The other tests do a smaller set of test, just to make sure they work in the
basics.
Running the format tests using one thread:
- before 00:04:16
- after 00:02:14
The slow tests were also reported in
https::llvm.org/PR58141
Also split a generic part of the test to a generic support header. This
allows these parts to be reused in the range-based formatter tests.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D140115
Mark de Wever [Thu, 5 May 2022 16:57:32 +0000 (18:57 +0200)]
[libc++][format] Adds formatter for tuple and pair
Implements parts of
- P2286R8 Formatting Ranges
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D136775
Aart Bik [Thu, 22 Dec 2022 01:10:12 +0000 (17:10 -0800)]
[mlir][sparse] completed codegen environment privatization
All members are now private and access is through delegate
or convenience methods only (except the loop emitter, which
is still under refactoring).
Reviewed By: Peiming
Differential Revision: https://reviews.llvm.org/D140519
Florian Hahn [Thu, 22 Dec 2022 18:29:39 +0000 (18:29 +0000)]
[VPlan] Add unittest for printing plans with VFs and UFs (NFC).
Mark Mendell [Thu, 22 Dec 2022 18:14:10 +0000 (10:14 -0800)]
[mlir][spirv] Add StreamingInterfaceINTEL to SPIRVBase.td
StreamingInterfaceINTEL has been recently added to the SPIR-V headers:
https://github.com/KhronosGroup/SPIRV-Headers/commit/
70ff9d939cd7fd0c758756ac57ab0c7c6d6c64d6
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D140476
Blue Gaston [Mon, 19 Dec 2022 21:50:07 +0000 (16:50 -0500)]
[Sanitizer] Fix page alignment for mmap calls
We are in the process of enabling sanitizer_common unit tests on arm64 for apple devices. rdar://
101436019
The test `CompactRingBuffer.int64` is failing on arm64 with the error:
```==17265==ERROR: SanitizerTool failed to deallocate 0xfffffffffffff000 (-4096) bytes at address 0x000105c30000
SanitizerTool: CHECK failed: sanitizer_posix.cpp:63 "(("unable to unmap" && 0)) != (0)" (0x0, 0x0) (tid=157296)```
If page size is sufficiently larger than alignment then this code:
UnmapOrDie((void*)end, map_end - end);
end is will be greater than map_end causing the value passed to UnmapOrDie to be negative.
This is caused when GetPageSizeCached returns 16k and alignment is 8k.
map_size and what is mapped by mmap uses size and alignment which is smaller than what is calculated by end using the actual page size.
Therefore, map_end ends up being less than end.
The call to mmap is allocating sufficent page-aligned memory, because it calls RoundUp within MmapOrDieOnFatalError.
But this size is not being captured by map_size.
We can address this by rounding up map_size here to be page-aligned. This ensures that map_end will be greater than or equal to end and that it will match mmaps use of page-aligned value, and the
subsequent call to munmap will also be page-aligned.
Differential Revision: https://reviews.llvm.org/D140353
Jessica Paquette [Tue, 20 Dec 2022 23:16:18 +0000 (15:16 -0800)]
[IR/MachineOutliner] Add a "nooutline" function attr and respect it
Add `nooutline` + update LangRef to say it exists.
This makes it possible to say "don't outline from this function ever."
We want to be able to toggle whether or not a function should be in the search
set regardless of default behaviour.
Add testcases for the IR Outliner + Machine Outliner.
Also remove an unnecessary check for an empty function in the Machine Outliner.
Differential Revision: https://reviews.llvm.org/D140438
Michael Jones [Thu, 1 Dec 2022 23:29:15 +0000 (15:29 -0800)]
[libc] add exponent format to printf
Add support for the %e/E conversion in printf, as well as unit tests. It
does not yet support long doubles.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D140042
Augusto Noronha [Wed, 14 Dec 2022 21:21:57 +0000 (13:21 -0800)]
[lldb] Add LTO dependency to lldb test suite
Make the lldb test target depend on LTO, since TestFullLtoStepping
needs it (prior to this patch, running "ninja check-lldb" would not
build libLTO).
Differential Revision: https://reviews.llvm.org/D140051
Matt Arsenault [Mon, 21 Nov 2022 15:54:50 +0000 (10:54 -0500)]
AMDGPU: Modernize sqrt f64 test
Use the readfirstlane hack for the scalar cases as a hack to
combine globalisel and sdag tests. gfx6 stores are a bit broken
in globalisel, and scalar returns are totally broken in sdag.
Mitch Phillips [Thu, 22 Dec 2022 17:52:40 +0000 (09:52 -0800)]
Add aligned_alloc to symbolizer symbols list.
New symbol used by libcxx as of https://reviews.llvm.org/D138196, needs
to be added to the symbol deps list.
Matt Arsenault [Tue, 29 Nov 2022 19:09:08 +0000 (14:09 -0500)]
Support: Add polling option to sys::Wait
Currently the process is terminated after the timeout. Add an option
to let the process resume after the timeout instead.
https://reviews.llvm.org/D138952
Matt Arsenault [Thu, 22 Dec 2022 15:22:11 +0000 (10:22 -0500)]
AMDGPU: Update constant address spaces used in printf test
This was never updated for the address space number shuffle.
Matt Arsenault [Thu, 22 Dec 2022 15:20:33 +0000 (10:20 -0500)]
AMDGPU: Use early continue to reduce indentation
Chenguang Wang [Thu, 22 Dec 2022 17:10:15 +0000 (09:10 -0800)]
[mlir] Allow specifying benefit for C func ptr style patterns.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D139234
David Green [Thu, 22 Dec 2022 16:49:19 +0000 (16:49 +0000)]
[AArch64] Add RSHRN and RSHRN2 patterns
This adds some tablegen patterns for RSHRN, which performs a rounding
shift with narrow. This is similar to the existing SHRN patterns with an
extra addition to perform the rounding, that adds 1<<(shift-1) before
the right shift. Because the round immediate and the shift amount are
tied, it goes via a ComplexPattern that uses a SelectRoundingVLShr
method to perform the selection checks.
aarch64_neon_rshrn are expanded into the sequence of equivalent
instructions (trunc(shr(add(x, 1<<(sht-1)), sht))) so that they can be
converted back into RSHRN. Which also allows us to match raddhn through
the adjusted patterns that previously used aarch64_neon_rshrn.
DIfferential Revision: https://reviews.llvm.org/D140297
Amy Huang [Wed, 21 Dec 2022 23:02:43 +0000 (23:02 +0000)]
Small fixes to creduce-clang-crash.py script.
Specify python3, and replace / with // to do integer division.
Ramkumar Ramachandra [Wed, 14 Dec 2022 17:55:07 +0000 (18:55 +0100)]
mlir/tblgen test: add a test for EnumAttr customAssemblyFormat
attr-or-type-format.td contains tests for various attributes and types,
but nowhere in the testsuite is the customAssemblyFormat for an EnumAttr
(enum class in C++) exercised. Fix this by adding a test.
Signed-off-by: Ramkumar Ramachandra <r@artagnon.com>
Differential Revision: https://reviews.llvm.org/D140034
Ties Stuij [Thu, 22 Dec 2022 15:32:34 +0000 (15:32 +0000)]
[GlobalISel][Legalizer] add minScalarIf action
Ensure scalar is at least as wide as type, but only if the specified condition
is met.
Reviewed By: paquette
Differential Revision: https://reviews.llvm.org/D140305
Ayke van Laethem [Wed, 23 Nov 2022 18:14:01 +0000 (19:14 +0100)]
[AVR] Do not emit instructions invalid for attiny10
The attiny4/attiny5/attiny9/attiny10 have a slightly modified
instruction set that drops a number of useful instructions. This patch
makes sure to not emit them on these "reduced tiny" cores.
The affected instructions are:
* lds and sts (load/store directly from data)
* ldd and std (load/store with displacement)
* adiw and sbiw (add/sub register pairs)
* various other instructions that were emitted without checking
whether the chip actually supports them (movw, adiw, etc)
There is a variant on lds and sts on these chips, but it can only
address a limited portion of the address space and is mainly useful to
load/store I/O registers (as an extension to the in and out
instructions). I have not implemented it here, implementing it can be
done in a separate patch.
This patch is not optimal. I'm sure it can be improved a lot. For
example, we could teach the instruction selector to not select lddw/stdw
instructions so that the weird pointer adjustments are not necessary.
But for now I've focused just on correctness, not on code quality.
Updates: https://github.com/llvm/llvm-project/issues/53459
Differential Revision: https://reviews.llvm.org/D131867
Jay Foad [Thu, 22 Dec 2022 12:02:11 +0000 (12:02 +0000)]
[AMDGPU] Remove permlane discard vdst_in optimization from isel
D72845 implemented the equivalent IR optimization in InstCombine so it
seems that there's no advantage to doing it during isel too.
This partially reverts D72844.
Differential Revision: https://reviews.llvm.org/D140546
Mehdi Amini [Sat, 10 Dec 2022 12:22:49 +0000 (12:22 +0000)]
Apply clang-tidy fixes for llvm-else-after-return in TensorOps.cpp (NFC)
Mehdi Amini [Sat, 10 Dec 2022 12:01:27 +0000 (12:01 +0000)]
Apply clang-tidy fixes for llvm-else-after-return in SparseVectorization.cpp (NFC)
Nikita Popov [Thu, 22 Dec 2022 15:24:03 +0000 (16:24 +0100)]
[SampleProfile] Regenerate test checks (NFC)
Nikita Popov [Thu, 22 Dec 2022 15:20:55 +0000 (16:20 +0100)]
[Util] Regenerate test checks (NFC)
Nikita Popov [Thu, 22 Dec 2022 15:13:36 +0000 (16:13 +0100)]
[InstCombine] Regenerate test checks (NFC)
Aliia Khasanova [Thu, 22 Dec 2022 10:14:24 +0000 (11:14 +0100)]
[mlir][linalg] Reuploading: add a shortened printing/parsing form for linalg.map and linalg.reduce.
Differential Revision: https://reviews.llvm.org/D140535
Alex Richardson [Thu, 17 Nov 2022 10:19:28 +0000 (10:19 +0000)]
[libc++] Use aligned_alloc instead of posix_memalign for C++17
C++17 defines the C11 `aligned_alloc`, so we can use that instead of
posix_memalign. This change allows building against picolibc without
defining _DEFAULT_SOURCE/_GNU_SOURCE.
The C11 `aligned_alloc` function should be available on all supported
non-Windows platforms except for macOS where we need version 10.15.
There is one caveat: aligned_alloc() requires that __size is a multiple of
__alignment, but [new.delete.general] only states "if the value of an
alignment argument passed to any of these functions is not a valid
alignment value, the behavior is undefined".
To handle calls such as ::operator new(1, std::align_val_t(128)), we
round up __size to __alignment (and check for wrap-around).
This is required at least for macOS where aligned_alloc(128, 1) returns
an error instead of allocating memory (glibc ignores the specification).
Differential Revision: https://reviews.llvm.org/D138196
Nikita Popov [Thu, 22 Dec 2022 14:58:18 +0000 (15:58 +0100)]
[SystemZ] Convert test to opaque pointers (NFC)
Nikita Popov [Thu, 22 Dec 2022 14:55:38 +0000 (15:55 +0100)]
[RISCV] Convert test to opaque pointers (NFC)
There is a minor change in operand order (of a commutative
instruction).
Nikita Popov [Thu, 22 Dec 2022 14:47:32 +0000 (15:47 +0100)]
[RISCV] Convert some tests to opaque pointers (NFC)
The asm test has minor differences in instruction scheduling only.
Yitzhak Mandelbaum [Tue, 20 Dec 2022 19:41:19 +0000 (19:41 +0000)]
[clang][dataflow] Fix bug in handling of `return` statements.
The handling of return statements, added in support of context-sensitive
analysis, has a bug relating to functions that return reference
types. Specifically, interpretation of such functions can result in a crash from
a bad cast. This patch fixes the bug and guards all of that code with the
context-sensitive option, since there's no reason to execute at all when
context-sensitive analysis is off.
Differential Revision: https://reviews.llvm.org/D140430
Matt Arsenault [Thu, 22 Dec 2022 13:51:07 +0000 (08:51 -0500)]
InstSimplify: Split isKnownNeverInfinity tests into separate file
This fixes an annoying assymmetry in the test organization. We have
known-never-nan.ll for dedicated isKnownNeverNaN handling tests, but
the isKnownNeverInfinity were in floating-point-compare.ll. Move the
more targeted tests into a separate file to match.
Matt Arsenault [Sun, 4 Dec 2022 14:09:41 +0000 (09:09 -0500)]
ValueTracking: Add test for isKnownNeverInfinity for fptrunc
Matt Arsenault [Thu, 17 Nov 2022 16:02:14 +0000 (08:02 -0800)]
ValueTracking: Add test for fneg isKnownNeverNaN handling
This didn't have a negative test.
Yitzhak Mandelbaum [Wed, 21 Dec 2022 22:05:09 +0000 (22:05 +0000)]
[clang][dataflow] Account for global variables in constructor initializers.
Previously, the analysis modeled global variables appearing in the _body_ of
any function (including constructors). But, that misses those appearing in
constructor _initializers_. This patch adds the initializers to the set of
expressions used to determine which globals to model.
Differential Revision: https://reviews.llvm.org/D140501
Yitzhak Mandelbaum [Wed, 21 Dec 2022 22:48:04 +0000 (22:48 +0000)]
[clang][dataflow] Simplify handling of nullopt-optionals.
Previously, in the case of an optional constructed from `nullopt`, we relied on
the value constructed for the `nullopt`. This complicates the implementation and
exposes it to bugs (indeed, one such was found), yet doesn't improve the
engine. Instead, this patch constructs a fresh optional representation, rather
than relying on the underlying nullopt representation.
Differential Revision: https://reviews.llvm.org/D140506
Matt Arsenault [Thu, 22 Dec 2022 13:57:16 +0000 (08:57 -0500)]
MIR: Fix test error message
Matthias Springer [Thu, 22 Dec 2022 13:05:51 +0000 (14:05 +0100)]
[mlir][vector] Add additional scalar vector transfer foldings
* Rewrite vector.transfer_write of vectors with 1 element to
memref.store
* Rewrite vector.extract(vector.transfer_read) to memref.load
Differential Revision: https://reviews.llvm.org/D140391
Matt Arsenault [Tue, 22 Nov 2022 16:21:18 +0000 (11:21 -0500)]
clang/HIP: Fix missing test for __frsqrt_rn
Nikita Popov [Thu, 22 Dec 2022 13:30:38 +0000 (14:30 +0100)]
[RISCV] Name instructions in tests (NFC)
Jordan Rupprecht [Thu, 22 Dec 2022 13:19:29 +0000 (05:19 -0800)]
[test][lldb-vscode] Relax assertion to allow multiple compile units returned.
I don't think the intent of this test is to make sure we only have one compile unit; it's to make sure request_compileUnits returns something sensible. Relax the test case to just make sure that the main source file is one of the compile units returned, even if there are others.
Fixes llvm.org/pr49418.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D138344
Matt Arsenault [Thu, 22 Dec 2022 12:31:05 +0000 (07:31 -0500)]
MIR: Don't assert if a virtual register uses a non-allocatable class
Florian Hahn [Thu, 22 Dec 2022 13:15:01 +0000 (13:15 +0000)]
[VPlan] Move VF and UF string generation to getName() (NFC).
The VFs and UFs may be more constrained as the plans are transformed
(e.g. see D135017 for an example).
To make sure the VFs/UFs included in the VPlan dump are accurate,
generate them when accessing a plan's name, rather than include them in
the name string set after initial construction.
Adrian Kuegel [Thu, 22 Dec 2022 13:13:30 +0000 (14:13 +0100)]
[mlir][Tosa] Apply ClangTidy performance findings (NFC)
Nikita Popov [Thu, 22 Dec 2022 13:01:56 +0000 (14:01 +0100)]
[NVPTX] Convert test to opaque pointers (NFC)
Nikita Popov [Thu, 22 Dec 2022 12:58:29 +0000 (13:58 +0100)]
[MIR] Convert tests to opaque pointers (NFC)
Nikita Popov [Thu, 22 Dec 2022 12:57:14 +0000 (13:57 +0100)]
[CodeGen] Convert test to opaque pointers (NFC)
Matt Arsenault [Mon, 21 Nov 2022 03:30:09 +0000 (19:30 -0800)]
clang/HIP: Fix broken implementations of __make_mantissa* functions
The optimizer was folding the entire function to return 0. This
meant to be checking the character content of the pointer is the
string terminator, not null.
Also just make null inputs undefined. My docs for nanf say the
behavior of the argument is unspecified and segfaults on my system.
Nikita Popov [Thu, 22 Dec 2022 11:56:50 +0000 (12:56 +0100)]
[BPF] Convert test to opaque pointers (NFC)
Jay Foad [Thu, 22 Dec 2022 11:21:11 +0000 (11:21 +0000)]
[AMDGPU] Simplify simplifyAMDGCNMemoryIntrinsicDemanded. NFC.
gonglingqin [Thu, 22 Dec 2022 11:18:22 +0000 (19:18 +0800)]
[Clang][LoongArch] Add intrinsic for rdtime_d, rdtimeh_w and rdtimel_w
Add these intrinsics to keep consistent with GCC [1].
[1]: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/loongarch/larchintrin.h#L33
Differential Revision: https://reviews.llvm.org/D139987
gonglingqin [Thu, 22 Dec 2022 08:59:56 +0000 (16:59 +0800)]
[Clang][LoongArch] Add intrinsic for asrtle, asrtgt, lddir, ldpte and cpucfg
`__cpucfg` is required by Linux [1].
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/asm/loongarch.h#n59
Differential Revision: https://reviews.llvm.org/D139915
Owen Pan [Thu, 22 Dec 2022 10:24:01 +0000 (02:24 -0800)]
[clang-format] Add InsertBraces to operator== in Format.h
Matt Devereau [Thu, 22 Dec 2022 10:00:57 +0000 (10:00 +0000)]
[AArch64][SVE] Remove dso_local and local_unnamed_addr from muladdsub.ll
Micah Weston [Thu, 22 Dec 2022 09:54:04 +0000 (01:54 -0800)]
[clang-format] Add 'friend' to QualifierOrder
For cases of defining friend functions, qualifier ordering can
allow multiple positions for the 'friend' token.
Closes #59450.
Differential Revision: https://reviews.llvm.org/D139801
Matt Devereau [Thu, 15 Dec 2022 16:09:13 +0000 (16:09 +0000)]
[AArch64][InstCombine] Fuse ADD+MUL and SUB+MUL AArch64 instrinsics
Fold (ADD p c (MUL p a b)) into (MAD p a b c)
Fold (FADD p c (FMUL p a b)) into (FMAD p a b c)
Fold (FSUB p c (FMUL p a b)) into (FNMSB p a b c)
Fold (ADD p (MUL p a b) c) into (MLA p c a b)
Fold (FADD p (FMUL p a b) c) into (FMLA p c a b)
Fold (SUB p (MUL p a b) C) into (MLS p c a b)
Fold (FSUB p (FMUL p a b) c) into (FMLS p c a b)
Differential Revision: https://reviews.llvm.org/D140200
Matthias Springer [Thu, 22 Dec 2022 09:22:37 +0000 (10:22 +0100)]
[mlir][vector] Fold vector.extractelement(vector.broadcast)
Differential Revision: https://reviews.llvm.org/D140394
Evgenii Kudriashov [Wed, 21 Dec 2022 12:45:41 +0000 (20:45 +0800)]
[X86] Support ANDNP combine through vector_shuffle
Combine
```
and (vector_shuffle<Z,...,Z>
(insert_vector_elt undef, (xor X, -1), Z), undef), Y
->
andnp (vector_shuffle<Z,...,Z>
(insert_vector_elt undef, X, Z), undef), Y
```
Reviewed By: RKSimon, pengfei
Differential Revision: https://reviews.llvm.org/D138521
Juan Manuel MARTINEZ CAAMAÑO [Thu, 22 Dec 2022 08:31:36 +0000 (03:31 -0500)]
Revert "Revert "[DebugInfo] Correctly recognize bitfields when emitting dwarf""
https://reviews.llvm.org/D140195 should have fixed the fail in
green-dragon that was reported in https://reviews.llvm.org/D96334 and
resulted in the revert.
This reverts commit
920de9c94caff0b3ac21bf637487b07cb9aea98a.
Fangrui Song [Thu, 22 Dec 2022 08:12:58 +0000 (00:12 -0800)]
[bazel] Fix some --features=layering_check issues
Tobias Gysi [Thu, 22 Dec 2022 07:49:00 +0000 (08:49 +0100)]
[mlir][llvm] Cleanup LLVM IR control flow import test (NFC).
Use a FileCheck variable to match the switch op argument
instead of hardcoding the argument name.
Reviewed By: ftynse, Dinistro
Differential Revision: https://reviews.llvm.org/D140469
Fangrui Song [Thu, 22 Dec 2022 06:59:36 +0000 (22:59 -0800)]
[bazel] Make TargetParser depend on config to fix --features=layering_check
While here, apply `buidifier`.
Craig Topper [Wed, 21 Dec 2022 23:08:12 +0000 (15:08 -0800)]
[RISCV] Add more abs+zext test cases. NFC
Utkarsh Saxena [Thu, 22 Dec 2022 05:49:29 +0000 (06:49 +0100)]
[clang][C++20] Add test for crash in NestedRequirement.
Piyou Chen [Thu, 22 Dec 2022 04:27:44 +0000 (20:27 -0800)]
[RISCV] Merge Masked and unMasked RVV manual codegen
RVV intrinsic function will generate riscv_vector_builtin_cg.inc for CGBuiltin.cpp to produce the corresponding RVV intrinsic LLVM IR.
In this stage, riscv_vector.td will describe the bunch of manual codegen C++ code to tell CGBuiltin how to handle these instructions.
In this patch, we merge the masked RVV manual codegen and unmasked RVV manual codegen to reduce the number of manual codegen, and make more policy addition easier in the future.
This is a clean-up job that will not affect the RVV intrinsic functionality.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D140361
Utkarsh Saxena [Thu, 22 Dec 2022 04:18:45 +0000 (05:18 +0100)]
Fix out-of-bound access in TransformNestedRequirement.
Yashwant Singh [Thu, 22 Dec 2022 04:17:28 +0000 (09:47 +0530)]
[AMDGPU][Test] Update perfhint test to use opaque pointers
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D140452
Matt Arsenault [Wed, 21 Dec 2022 17:35:42 +0000 (12:35 -0500)]
Linker: Disallow linking appending globals with different addrspaces
The current appending linkage handling implicitly assumes this by
using a basic ConstantExpr::getBitCast to resolve type
mismatches. Avoid this edge case so we don't need to keep the type
mismatch replacement code around after opaque pointers.
ping.deng [Wed, 21 Dec 2022 12:25:00 +0000 (20:25 +0800)]
[RISCV][NFC] Use Arrayref in TargetLowering functions.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D140464
Mircea Trofin [Thu, 22 Dec 2022 02:36:59 +0000 (18:36 -0800)]
[NFC] Rename Function::isDebugInfoForProfiling to shouldEmit[...]
The function name was misleading - the expectation set both by the name
and by other members of Function (like isDeclaration or isIntrinsic)
would be that the function somehow would "be" "debug info for
profiling". But that's not the case - the property indicates (as the
comment over the declaration also explains) whether debug info should be
emitted (for profiling).
Fangrui Song [Thu, 22 Dec 2022 02:07:39 +0000 (18:07 -0800)]
[M68k] Fix MachineFunctionInfo initialization after
69e75ae695d9ef1360a2a1fbefd6e0e0456c3f7b
Fangrui Song [Thu, 22 Dec 2022 01:53:11 +0000 (17:53 -0800)]
[ARC][M68k] Fix INITIALIZE_PASS after D140364
Matt Arsenault [Tue, 6 Dec 2022 16:59:49 +0000 (11:59 -0500)]
AMDGPU: Use DenormalMode type in FP mode tracking
This simplies a future patch. The MIR handling should be fixed. We're
still printing these in custom MachineFunctionInfo as bools (plus the
inverted meaning is hard to follow).
Peiming Liu [Thu, 22 Dec 2022 01:24:52 +0000 (01:24 +0000)]
[bazel] fix bazel file
Reviewed By: yijia1212
Differential Revision: https://reviews.llvm.org/D140520
wanglei [Thu, 22 Dec 2022 01:13:42 +0000 (09:13 +0800)]
[LoongArch] Fix build after createMachineFunctionInfo change
c774fd55008dbd2be51bc25f4c6f534978e73d95
Kevin Sala [Wed, 21 Dec 2022 22:04:13 +0000 (23:04 +0100)]
[OpenMP][libomptarget] Centralize host pinned buffers map to NextGen's PluginInterface
This patch moves the management/tracking of host pinned buffers to the common PluginInterface
in NextGen plugins. For the moment, the management consists of tracking the host pinned
allocations into a map in each device.
Differential Revision: https://reviews.llvm.org/D140502
Will Dietz [Thu, 22 Dec 2022 00:46:27 +0000 (18:46 -0600)]
[mlir] Gate test checking statistics on their availability.
Fixes #59620.
Kevin Sala [Thu, 22 Dec 2022 00:41:50 +0000 (01:41 +0100)]
[NFC][OpenMP][libomptarget] Return null if error detected during allocation in NextGen AMDGPU
Jacques Pienaar [Thu, 22 Dec 2022 00:22:39 +0000 (16:22 -0800)]
Revert "Revert "[mlir][py] Enable building ops with raw inputs""
Fix Python 3.6.9 issue encountered due to type checking here. Will
add back in follow up.
This reverts commit
1f47fee2948ef48781084afe0426171d000d7997.