468286 Commits

Author SHA1 Message Date
Viktoriia Bakalova
1f7c7d4bdd [clangd] Update symbol collector to use include-cleaner.
Differential Revision: https://reviews.llvm.org/D152900
2023-07-19 13:47:02 +00:00
David Truby
1ae04d1c89 [flang] Implement tand intrinsic
This implements the tand intrinsic by performing a multiplication
by pi/180 to the argument before calling tan inline.

This is a commonly provided extension that is used by OpenRadioss

Differential Revision: https://reviews.llvm.org/D154614
2023-07-19 14:42:04 +01:00
David Truby
3681a7dd78 [flang] Use libm functions for complex operations by default
This patch changes the default lowering for complex operations to use
the more accurate libm operations as opposed to the mlir complex
operations. This is necessary due to precision issues in the mlir
complex dialect that cause failures in e.g. the LAPACK tests.

The mlir complex dialect lowering will still be used when
`-fapprox-func` is set (and by extension `-ffast-math` and `-Ofast`)

Differential Revision: https://reviews.llvm.org/D155310
2023-07-19 14:34:38 +01:00
Simon Pilgrim
6cf8bde056 [X86] getFauxShuffleMask - add SIGN_EXTEND_VECTOR_INREG handling for all-signbits sources
Add suport for shuffle combines (via combineEXTEND_VECTOR_INREG) to begin from SIGN_EXTEND_VECTOR_INREG nodes
2023-07-19 14:32:34 +01:00
Paweł Bylica
966318005a
[InstCombine] Preserve metadata when combining select+binop
Fixes https://github.com/llvm/llvm-project/issues/63910

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D155461
2023-07-19 15:20:49 +02:00
Paweł Bylica
7769c1e623
[InstCombine][NFC] Add tests for preserving metadata
Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D155594
2023-07-19 15:20:48 +02:00
Felipe de Azevedo Piovezan
00c6049677 [lldb][NFC] Refactor test to enable subsequent reuse
On a subsequent commit, I intend to update the expression and call the evaluate
function more times. This refactors enables reusing some of the existing code
for that.

Differential Revision: https://reviews.llvm.org/D155197
2023-07-19 09:15:48 -04:00
Felipe de Azevedo Piovezan
8bc97a3ee4 [lldb][NFC] Factor out CommandObject code filtering results based on scope
We will need this code in a subsequent commit.

Differential Revision: https://reviews.llvm.org/D155332
2023-07-19 09:14:02 -04:00
Simon Pilgrim
32ed3031fa [X86] Add test coverage for Issue #63946 2023-07-19 14:05:13 +01:00
Simon Pilgrim
70893b62cf [X86] matchUnaryShuffle - match SIGN_EXTEND_VECTOR_INREG patterns for 'all-signbits' sources
Adapt the existing ANY/ZERO_EXTEND_VECTOR_INREG shuffle matching to also recognise SIGN_EXTEND_VECTOR_INREG patterns to handle cases where we're effectively "splatting" all-signbits sources.
2023-07-19 14:05:13 +01:00
John Brawn
cee7e7b245 [ARM] Correctly handle execute-only in EmitStructByval
Currently when compiling for an execute-only target without movt then
EmitStructByval will generate a constant pool load which isn't
compatible with execute-only. Handle this by emitting tMOVi32imm,
and also simplify the existing movt handling by emitting t2MOVi32imm
or MOVi32imm.

Differential Revision: https://reviews.llvm.org/D154944
2023-07-19 13:56:36 +01:00
John Brawn
1b12b1a335 [ARM] Restructure MOVi32imm expansion to not do pointless instructions
The expansion of the various MOVi32imm pseudo-instructions works by
splitting the operand into components (either halfwords or bytes) and
emitting instructions to combine those components into the final
result. When the operand is an immediate with some components being
zero this can result in pointless instructions that just add zero.

Avoid this by restructuring things so that a separate function handles
splitting the operand into components, then don't emit the component
if it is a zero immediate. This is straightforward for movw/movt,
where we just don't emit the movt if it's zero, but the thumb1
expansion using mov/add/lsl is more complex, as even when we don't
emit a given byte we still need to get the shift correct.

Differential Revision: https://reviews.llvm.org/D154943
2023-07-19 13:56:36 +01:00
Ties Stuij
84f888ca82 [ARM] don't emit constant pool for Thumb1 XO/stack guard combo
Currently for armv6-m and armv8-m.baseline, we emit constant pool code when we
use execute-only (XO) in combination with stack guards.

XO is a new feature for armv6-m, and this patch is part of a series of patches
that substitutes constant pool generation with the tMOVi32imm equivalent.

However XO for armv8-m.baseline has been available for about 6 years, and so
for armv8-m.baseline this is a bugfix.

Reviewed By: simonwallis2, olista01

Differential Revision: https://reviews.llvm.org/D155170
2023-07-19 13:51:43 +01:00
Kelvin Li
42b41137d3 [flang] Simplify macros for the vec_sld and vec_sldw intrinsics
The ignore_tkr directive is applied to the third argument so that the number of
interfaces can be reduced.

Differential Revision: https://reviews.llvm.org/D155624
2023-07-19 08:46:43 -04:00
Carlos Galvez
b70e6e9681 [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members
Since that's what the guidelines require.

Fixes #63733

Differential Revision: https://reviews.llvm.org/D155625
2023-07-19 12:05:15 +00:00
Piyou Chen
b03a6db276 [RISCV] Replace zihintntl with zicond in ISAInfo unittest
Some ISAInfo unittest base on experimental-zihintntl, but zihintntl will become none-experimental. This patch use another experimental extension zicond to replace zihintntl.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D155673
2023-07-19 04:41:25 -07:00
pvanhout
b50fe313e8 [TableGen] Deprecate old GI Combiner Emitter
Will be removed in a month or so.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D154939
2023-07-19 13:17:02 +02:00
Igor Kirillov
c15557d64e [CodeGen] Extend ComplexDeinterleaving pass to recognise patterns using integer types
AArch64 introduced CMLA and CADD instructions as part of SVE2. This
change allows to generate such instructions when this architecture
feature is available.

Differential Revision: https://reviews.llvm.org/D153808
2023-07-19 11:01:19 +00:00
Simon Pilgrim
98b0f1360d [DAG] hoistLogicOpWithSameOpcodeHands - add support for SIGN_EXTEND_INREG nodes.
This can reuse the existing *_EXTEND node handling (with special handling for the valuetype arg)
2023-07-19 11:56:32 +01:00
Ivan Kosarev
1b32427213 [AMDGPU] Combine the SDAG and GISel versions of the fmed3.ll test.
Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D155590
2023-07-19 11:42:36 +01:00
Ivan Kosarev
6b693f5e34 [AMDGPU][AsmParser][NFC] Translate parsed DS instructions to MCInsts automatically.
Part of <https://github.com/llvm/llvm-project/issues/62629>.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D155620
2023-07-19 11:30:56 +01:00
Jie Fu
51c8cacafd [InstrProf] Ignore -Wcast-qual after D153911 to fix build failure (NFC)
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:46:60: error: cast from 'const char *' to 'struct __llvm_profile_header *' drops const qualifier [-Werror,-Wcast-qual]
  __llvm_profile_header *Header = (__llvm_profile_header *)ProfileData;
                                                           ^
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:49:30: error: cast from 'const char *' to 'struct __llvm_profile_data *' drops const qualifier [-Werror,-Wcast-qual]
      (__llvm_profile_data *)(ProfileData + sizeof(__llvm_profile_header) +
                             ^
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:77:41: error: cast from 'const struct __llvm_profile_data *' to 'struct __llvm_profile_data *' drops const qualifier [-Werror,-Wcast-qual]
       DstData = (__llvm_profile_data *)__llvm_profile_begin_data();
                                        ^
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:109:60: error: cast from 'const char *' to 'struct __llvm_profile_header *' drops const qualifier [-Werror,-Wcast-qual]
  __llvm_profile_header *Header = (__llvm_profile_header *)ProfileData;
                                                           ^
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:116:30: error: cast from 'const char *' to 'struct __llvm_profile_data *' drops const qualifier [-Werror,-Wcast-qual]
      (__llvm_profile_data *)(ProfileData + sizeof(__llvm_profile_header) +
                             ^
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:129:40: error: cast from 'const struct __llvm_profile_data *' to 'struct __llvm_profile_data *' drops const qualifier [-Werror,-Wcast-qual]
      DstData = (__llvm_profile_data *)__llvm_profile_begin_data(),
                                       ^
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:179:34: error: cast from 'const char *' to 'struct ValueProfData *' drops const qualifier [-Werror,-Wcast-qual]
    VPMergeHook((ValueProfData *)SrcValueProfData, DstData);
                                 ^
/data/llvm-project/compiler-rt/lib/profile/InstrProfilingMerge.c:181:46: error: cast from 'const char *' to 'struct ValueProfData *' drops const qualifier [-Werror,-Wcast-qual]
        SrcValueProfData + ((ValueProfData *)SrcValueProfData)->TotalSize;
                                             ^
...
2023-07-19 18:00:05 +08:00
Simon Pilgrim
2167ae93c9 [DAG] hoistLogicOpWithSameOpcodeHands - add support for *_EXTEND_VECTOR_INREG nodes.
This can reuse the existing *_EXTEND node handling.
2023-07-19 10:50:23 +01:00
Mikhail Goncharov
571c1292b6 [bazel] remove PythonAttr TD after 67a910bbff772ebf4c47e8b434b59cdc4820bb68
Differential Revision: https://reviews.llvm.org/D155686
2023-07-19 11:46:47 +02:00
Guray Ozen
bf62748342 [mlir][nvvm] Introduce Syncronization Ops for WGMMA
This work introduces : `wgmma.fence.aligned`, `wgmma.commit.group.sync.aligned` and `wgmma.wait.group.sync.aligned` Ops. They are used to syncronize warpgroup level matrix multiply-accumulate instructions, as known as WGMMA.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D155676
2023-07-19 11:45:04 +02:00
Jay Foad
7fa7a08f21 [AMDGPU] Insert s_nop before s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
Differential Revision: https://reviews.llvm.org/D155681
2023-07-19 10:33:11 +01:00
Jay Foad
496766840f [ARM] Add a regression test for D154281
This is a reduced version of one of the tests that was broken by the
original commit of D154281 "[CodeGen] Store SP adjustment in
MachineBasicBlock. NFCI.".

Differential Revision: https://reviews.llvm.org/D155471
2023-07-19 10:32:21 +01:00
Jingu Kang
62ed3ff4bb Revert "[MachineLICM] Handle Subloops"
This reverts commit 33e60484d750291e99301e29e60fe72c8fa48ccd.
2023-07-19 10:30:50 +01:00
Shivam Gupta
061e855767 [clang][Docs] Added release note for D142609 2023-07-19 15:00:24 +05:30
Nuno Lopes
d75fb17963 [VectorCombine] Use poison insteaf of undef as placeholder [NFC]
These vector lanes are never accessed. They are used for shifting a value into the right lane
and therefore only 1 value of the whole vector is actually used
2023-07-19 10:29:08 +01:00
khei4
569769b648 Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas
This reverts commit 8f3864ba4323a253bcf29825d23cd325b52c4106.
Differential Revision: https://reviews.llvm.org/D153453
2023-07-19 18:26:04 +09:00
khei4
bdc9a6b1e9 [MemCpyOpt] add terminator user test for D153453(NFC)
Differential Revision: https://reviews.llvm.org/D155571
2023-07-19 18:26:04 +09:00
Ingo Müller
1dccdf7f49 [mlir][linalg][transform][python] Add type arg to MatchOp extension.
The extension class to MatchOp has a class method called match_op_names.
The previous version of that function did not allow to specify the
result type. This, however, may be useful/necessary if the op consuming
the resulting handle requires a particular type (such as the
bufferization.EmptyTensorToAllocTensorOp). This patch adds an overload
to match_op_names that allows to specify the result type.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D155567
2023-07-19 09:15:41 +00:00
Simon Pilgrim
5bc836422e [X86] LowerEXTEND_VECTOR_INREG - add sign_extend_vector_inreg fast path for all-signbits source values
If the source operand is already all-signbits we don't need to create the sign extended elements - just splat the source element to the destination element width
2023-07-19 10:13:08 +01:00
Oleg Shyshkov
c425cfa98e [mlir][bazel] Fix build. 2023-07-19 11:11:32 +02:00
Guillaume Chatelet
1f5783474f [libc][NFC] Rename files
This patch mostly renames files so it better reflects the function they declare.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D155607
2023-07-19 09:06:29 +00:00
David Spickett
865b1190e6 [lldb] XFAIL command-disassemble-mixed.c on Windows
Either clang-cl has different assembly output or we're not mapping
source to assembly properly on Windows. We (Linaro) will find out which.

https://lab.llvm.org/buildbot/#/builders/219/builds/4195
2023-07-19 09:04:56 +00:00
Chuanqi Xu
7db501a738 [NFC] Adjust test for pr63595
The original test case is not strictly correct but our ODR checking
system doesn't find it.
2023-07-19 16:51:37 +08:00
Kadir Cetinkaya
d06af7a44e
Revert "[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)"
This reverts commit c4fa97fca7e92c736fcb09779c84b42c25ffae70.
2023-07-19 10:45:23 +02:00
Guillaume Chatelet
bc8c3f4998 [libc][memfunctions] Explicit error when platform in not supported
Reviewed By: JonChesterfield, jhuber6

Differential Revision: https://reviews.llvm.org/D155597
2023-07-19 08:45:04 +00:00
Nikita Popov
a6705053c3 [LoopPeel] Clear dispositions after peeling
Block dispositions of values defined inside the loop may change
during peeling, so clear them. We already do this for other kinds
of unrolling.

Differential Revision: https://reviews.llvm.org/D153762
2023-07-19 10:39:59 +02:00
Kadir Cetinkaya
92c0546941
Revert "[clangd] Always run preamble indexing on a separate thread"
This reverts commit 036a1b2202cb71aacfa72ef15145a88dc50a02cf.

Triggering failures under tsan, https://lab.llvm.org/buildbot/#/builders/131/builds/48349
2023-07-19 10:38:23 +02:00
Simi Pallipurath
c1873d84a3 [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.
When linking a big-endian image for Arm, clang has
to select  between BE8 and BE32 formats. The default
is dependent on the selected target architecture.
For ARMv6 and later architectures the default is
BE8, for older architectures the default is BE32.
For BE8 and BE32, compiler outputs a big endian ELF
relocatable object file with the instructions and
data both big endian. The difference is that at
link time, for BE8 a linker must endian reverse
the instructions to little endian. For BE8, the
clang has to pass --be8 to the linker for Arm.

At the moment clang is not passing the --be8 flag
to linker for the baremetal target architectures
above ArmV6 for Arm. This patch passes through --be8
and -BE or EL to the linker, taking into account the
target and the -mbig-endian and -mlittle-endian flag.
Also there are few more changes in the baremetal
driver so that the code can cope with AArch64 being
big-endian as well.

Reviewed By: michaelplatings, MaskRay

Differential Revision: https://reviews.llvm.org/D154786
2023-07-19 09:37:40 +01:00
Viktoriia Bakalova
22605f5f1b [clangd] Make an include always refer to itself. Background: clang-review expects all referents to have definition, declaration or reference(s).
Differential Revision: https://reviews.llvm.org/D155614
2023-07-19 08:32:53 +00:00
Jay Foad
4389f9b2ad [AMDGPU] Regenerate is.fpclass checks 2023-07-19 09:32:22 +01:00
Martin Storsjö
7506cb3c92 [libcxx] Link to fewer MSVC CRT libraries
The library msvcrt.lib pulls in ucrt.lib and vcruntime.lib anyway,
there's no need to manually link against the individual dependencies.

This matches how the tests link against libraries - they only link
against msvcrt and msvcprt, not directly against ucrt and vcruntime.

Differential Revision: https://reviews.llvm.org/D155555
2023-07-19 11:31:53 +03:00
Andrew Ng
f9e54a5c0f [libcxx] [test] Remove a stray double space from a test config. NFC.
Differential Revision: https://reviews.llvm.org/D155553
2023-07-19 11:31:52 +03:00
Andrzej Warzynski
e62f366b01 [mlir] Update SVE integration tests to use mlir-cpu-runner
With the recent addition of "-mattr" and "-march" to the list of options
supported by mlir-cpu-runner [1], the SVE integration
tests can be updated to use mlir-cpu-runner instead of lli. This will
allow better code re-use and more consistency

This patch updates 2 tests to demonstrate the new logic. The remaining
tests will be updated in the follow-up patches.

[1] https://reviews.llvm.org/D146917

Depends on D155403

Differential Revision: https://reviews.llvm.org/D155405
2023-07-19 08:29:17 +00:00
Martin Storsjö
9f4dfcb795 [CMake] Clean up old code for handling MSVC runtime setting the old way
This was left in place to reduce the risk of breaking anything,
and to keep the diff smaller, in D155233.

Differential Revision: https://reviews.llvm.org/D155431
2023-07-19 11:25:28 +03:00
Nikita Popov
2ea5aa1c96 [IR] Deprecate opaque pointer compatibility APIs
This deprecates various compatibility APIs that have been
introduced as part of the opaque pointer migration.

These will be removed at some point after the LLVM 17 release.

Differential Revision: https://reviews.llvm.org/D155585
2023-07-19 10:21:10 +02:00