Commit Graph

437009 Commits

Author SHA1 Message Date
Vitaly Buka
aba150ca23 [test][msan] Fix more tests for D134669 2022-09-26 18:06:41 -07:00
Vitaly Buka
15805c030f [tests][msan] Use -fno-sanitize-memory-param-retval in tests
Supports either default of -f[no-]sanitize-memory-param-retval.

Reviewed By: aeubanks, MaskRay

Differential Revision: https://reviews.llvm.org/D134683
2022-09-26 17:24:22 -07:00
Adrian Prantl
79e522fb44 Revert "Skip crashing test"
This reverts commit c1ce19021da0cf1c88722024e6ff9cee7aabc7b6.
2022-09-26 17:17:47 -07:00
Fangrui Song
b2d7a0dcf1 [AArch64] Check target feature support for __builtin_arm_crc*
This is the AArch64 counterpart of D134127.
Daniel Kiss will change more `BUILTIN` to `TARGET_BUILTIN`.

Fix #57802
2022-09-26 17:16:44 -07:00
Alex Yermolovich
9a1544277e [DWARF DUMP] Fix infinite recursion in Type Printer.
There is an implicit circular dependency in a debug information coming from GCC.
This results in a coredump.
It tries to resolve scope for DIE TAGs that are scopeless.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D132900
2022-09-26 16:23:37 -07:00
Tony Tye
586614064e [AMDGPU][NFC] Correct name of DW_OP_LLVM_aspace_bregx
Correct naming of DW_OP_LLVM_aspace_bregx in
AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst .

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D134467
2022-09-26 23:08:44 +00:00
Aart Bik
a3344d7fc7 [mlir][sparse] minor cleanup of sparse tensor dialect ops
Removed some whitespace, improved some of the ops doc.

Reviewed By: wrengr

Differential Revision: https://reviews.llvm.org/D134672
2022-09-26 15:37:22 -07:00
Mircea Trofin
8a24e0cb5a [nfc][mlgo] Lazily compute the regalloc reward
Differential Revision: https://reviews.llvm.org/D134664
2022-09-26 15:34:29 -07:00
Min-Yih Hsu
ddc67856ee [mlir][LLVMIR] Add translation of AtomicRMW/CmpXchg from LLVM IR
Add support for translating AtomicRMWInst and AtomicCmpXchgInst from
LLVM IR.

Differential Revision: https://reviews.llvm.org/D134450
2022-09-26 15:07:30 -07:00
Craig Topper
90b695d1f2 [IR][InstCombine] Support scalable vector splats ConstantExprs in Constant::getUniqueInteger().
I've left the getAggregateElement as a fast path for non-ConstantExprs
to avoid a call to getSplatValue in release builds.

Fixes PR57989.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D134670
2022-09-26 14:55:15 -07:00
Akira Hatanaka
0ca1051bfc Check whether the allocated type is an array type before calling
checkArrayElementAlignment in Sema::BuildCXXNew

This commit fixes a bug that was introduced by adaf62ced and reported
here: https://reviews.llvm.org/D133711#3814717
2022-09-26 14:21:21 -07:00
Fangrui Song
78084d9e77 [ELF] Rewrite R_RISCV_ALIGN nops when r.addend%4 != 0
For RVC, GNU assembler and LLVM integrated assembler add c.nop followed by a
sequence of 4-byte nops. Even if remove % 4 == 0, we have to split one 4-byte
nop and therefore need to write the code sequence, otherwise we create an
incorrect c.unimp.
2022-09-26 14:20:27 -07:00
Florian Hahn
b6352ef4f3 [LoopDeletion] Regenerate check lines for test added in f076a70979. 2022-09-26 22:11:32 +01:00
Florian Hahn
f076a70979 [LoopDeletion] Add cache verification failure test case.
Extra test coverage for D134613.
2022-09-26 21:59:41 +01:00
Francis Visoiu Mistrih
0fcc99ade4 [Matrix] Add tests for addition transpose optimizations
Tests before transpose optimizations around additions.

Differential Revision: https://reviews.llvm.org/D133656
2022-09-26 13:27:03 -07:00
Stanislav Mekhanoshin
0ce96e06ee [AMDGPU] Move SIModeRegisterDefaults to SI MFI
It does not belong to a general AMDGPU MFI.

Differential Revision: https://reviews.llvm.org/D134666
2022-09-26 13:20:24 -07:00
Lorenzo Chelini
59080febfc Revert "[MLIR] Expose getAsValues in StaticValueUtils.h (NFC)"
It introduces a circular build dependence: DialectUtils <-
ArithmeticUtils <- ArithDialect <- DialectUtils

This reverts commit 27224fe727.
2022-09-26 22:11:40 +02:00
Sanjay Patel
def6cbd2bd [InstCombine] add assert/test for zext to i1
This is a test to verify that we do not crash with the
problem noted in issue #57986. The root problem should
be fixed with a prior change to InstSimplify.
2022-09-26 16:01:25 -04:00
Sanjay Patel
222e1c73f3 [InstSimplify] don't commute constant expression operand in min/max calls
The test shows that we would fail to consistently fold the
instruction based on the max value operand. This is also
the root cause for issue #57986, but I'll add an instcombine
test + assert for that exact problem in another commit.
2022-09-26 16:01:09 -04:00
Sanjay Patel
b5bccded2c [InstSimplify] add tests for max intrinsic with constant expression; NFC
This shows the root problem that leads to the crash in issue #57986.
2022-09-26 16:01:09 -04:00
Jan Svoboda
8df1f3bc19 [clang][deps] Fix test on AIX
The "-fno-integrated-as" on AIX expands the driver invocation into multiple jobs. This patch makes new test accommodates for that.
2022-09-26 12:40:28 -07:00
Krzysztof Parzyszek
dfaf7a2846 [Hexagon] Avoid some unnecessary sign-extend instructions
Simplify (sext_inreg (extractu ...)) -> (extract ...) where appropriate.
2022-09-26 12:30:18 -07:00
Mahesh Ravishankar
7ee34550f5 [mlir][TilingInterface] Fix iter_args handling in tile (and fuse).
The current approach for handling `iter_args` was to replace all uses
of the value that is used as `init` value with the corresponding
region block argument within the `scf.for`. This is not always
correct. Instead a more deliberate approach needs to be taken to
handle these. If the slice being fused represents a slice of the
destination operand of the untiled op, then
- Make the destination of the fused producer the `init` value of the
  loop nest
- For the tiled and fused producer op created, replace the slice of
  the destination operand with a slice of the corresponding region
  iter arg of the innermost loop of the generated loop nest

Differential Revision: https://reviews.llvm.org/D134411
2022-09-26 19:09:29 +00:00
Sanjay Patel
e9e994838a [InstSimplify] rearrange matching for select-of-min/max folds; NFC
This makes the code a little shorter and should be easier to extend
for a pattern like in issue #42100.
2022-09-26 15:02:40 -04:00
Sanjay Patel
096f1c4db4 [InstSimplify] remove redundant predicate check; NFC
It's still possible that there's a simpler way to specify
the conditions needed for this set of folds, but "getStrictPred"
converts >= to > for example, so there's no need to explicitly
check that.
2022-09-26 15:02:40 -04:00
Michael Buch
1c6826e8fc [lldb][test] 2 - Add gmodules test category explicitly where previously done implicitly
Since we don't compile with `gmodules` implicitly via
debug-info test replication, we should mark all implicit
`gmodules` tests with the appropriate category so the API
tests get actually run as intended.

Differential Revision: https://reviews.llvm.org/D134574
2022-09-26 19:54:24 +01:00
Michael Buch
12502ee551 [lldb][test] 1 - Don't do test-replication for gmodules debug_info variant
Currently, by default LLDB runs an API test with 3 variants,
one of which, depending on platform, is `gmodules`. However,
most tests don't actually make use of any specific `gmodules`
feature since they compile a single `main.cpp` file without
imporint types from other modules.

Instead of running all tests an extra time with `-gmodules`
enabled, we plan to test `gmodules` features with dedicated
API tests that explicitly opt-into compiling with `-gmodules`.
One of the main benefits of this will be a reduction in total
API test-suite run-time (by around 1/3).

This patch adds a flag to `debug_info_categories` that indicates
whether a category is eligible to be replicated by `lldbtest`.

Keeping `gmodules` a debug-info category is desirable because
`builder.py` knows how to inject the appropriate Makefile flags
into the build command for debug-info categories already. Whereas
for non-debug-info categories we'd have to teach it how to. The
category is inferred from the test-name debug-info suffix currently.

Differential Revision: https://reviews.llvm.org/D134524
2022-09-26 19:54:24 +01:00
Jakub Kuderski
24cdae11ed [mlir][spirv] Format a define. NFC. 2022-09-26 14:53:29 -04:00
Matt Arsenault
473e83b95a GuardWidening: Pass through AssumptionCache (NFC) 2022-09-26 14:53:00 -04:00
Matt Arsenault
9bf1aea224 LoopPeel: Pass through AssumptionCache (NFC) 2022-09-26 14:52:59 -04:00
Matt Arsenault
53fa00b3ae LoopUnroll: Pass through AssumptionCache (NFC)
Using these queries with a context instruction and without a cache
seems to be about 2x slower than with it so this theoretically
improves compile time.
2022-09-26 14:52:59 -04:00
Jakub Kuderski
2d62833048 Reland "[mlir][spirv] Change td def/class prefix from SPV to SPIRV"
This reverts commit ce82530cd0.

Undo accidental Vulkan/SPIR-V name changes.
Tested with `ninja check-mlir check-mlir-mlir-spirv-cpu-runner check-mlir-mlir-vulkan-runner`.
2022-09-26 14:45:52 -04:00
Thomas Raoux
bc13437b15 [mlir][vector] Handle subview correctly in sotre to load opt on memref
Make sure we consider other subviews of the same buffer when doing store
to load forwarding or dead store elimination.

Differential Revision: https://reviews.llvm.org/D134576
2022-09-26 18:28:17 +00:00
Dave Lee
c418f00536 [lldb] Fix completion of 'settings set' values
Some time ago, a refactor (1153dc960) broke completion for assigning settings
values (`settings set`). This was most annoying for enum settings, where you'd
have to get the valid enum names separately.

This restores the logic in the post-refactor completion function, as well as
adding a test to catch future regressions.

Differential Revision: https://reviews.llvm.org/D134515
2022-09-26 11:26:13 -07:00
Krzysztof Parzyszek
d6c0a5be7f [Hexagon] Make sure we can still shift scalar vectors by non-splats 2022-09-26 11:25:06 -07:00
Thomas Raoux
8f27a1f865 [mlir] Relax transfer op hoisting on tensor
Improve hoisting logic to support cases where the read being hoisted
comes from a transfer_write with disjoint indices.

Differential Revision: https://reviews.llvm.org/D134624
2022-09-26 18:22:19 +00:00
Lang Hames
4ba1f04465 [JITLink] Remove overly-restrictive visibility check introduced in 75404e9ef8.
ELF undefined symbols can have non-default visibility.
2022-09-26 11:19:40 -07:00
Craig Topper
afdd600a49 [LegalizeTypes][RISCV] Support f16 in ExpandIntRes_LLROUND_LLRINT.
Promote f16 to f32 and use the f32 libcall.

I deleted rv64zfh-half-intrinsics-strict.ll because it only existed due to this issue breaking rv32.

Differential Revision: https://reviews.llvm.org/D134579
2022-09-26 11:09:33 -07:00
Jan Svoboda
715bd12d2e [clang][modules] Over-align the Module class
This makes `llvm::PointerIntPair<Module *, 3>` from f35230ae work across platforms.

Reviewed By: srj

Differential Revision: https://reviews.llvm.org/D134653
2022-09-26 10:55:22 -07:00
Felipe de Azevedo Piovezan
10a35632d5 [lldb] Skip tests incompatible with older versions of Clang
The coroutine tests require a standard library implementation of
coroutines, which was only made available some time _after_ Clang 13.
The first such Clang tested by the LLDB matrix bot is 15.0.1

The TestObjCExceptions test forces the use of the system's libcxx. For
the lldb matrix bot, the first Clang version compatible with the bot's
libraries is 13.0.

Differential Revision: https://reviews.llvm.org/D134645
2022-09-26 13:27:51 -04:00
Jeff Niu
4e214af3e2 [MLIR] Add doc for Attribute print elideType (NFC) 2022-09-26 10:21:41 -07:00
Mathieu Fehr
ebdf00bc19 [mlir] Allow accessing TypeID of attrs/types defs
SelfOwningTypeID was inherited privately, so it was not possible to access
the TypeID of an attribute or a type definition.

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D134593
2022-09-26 10:08:54 -07:00
Richard Howell
1f451a8bd6 [clang] initialize type qualifiers for FunctionNoProtoType
When initializing FunctionNoProtoType types, zero out the type
qualifiers. This will ensure the ODR hash remains stable as it
hashes the values for these qualifiers for all function types.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D133586
2022-09-26 09:48:54 -07:00
Jakub Kuderski
ce82530cd0 Revert "[mlir][spirv] Change td def/class prefix from SPV to SPIRV"
This reverts commit a2052b8794.

This commit renamed some Vulkan identifiers that shouldn't have been
renamed, e.g., `SPV_KHR_storage_buffer_storage_class`.
2022-09-26 12:40:35 -04:00
Changpeng Fang
dee4bc4a4e AMDGPU: Handle new address pattern in LowerKernelAttributes introduced by opaque pointers
Summary:
  With opaque pointer support, the "ptr" type is introduced and thus BitCast is not necessary in some cases.
This work takes care of this change, and recognizes the new address patterns to do appropriate optimizations.

Reviewers:
  arsenm

Differential Revision:
  https://reviews.llvm.org/D134596
2022-09-26 09:31:52 -07:00
Tarun Prabhu
ebfe8a7411 [flang] Lower F08 bitwise-reduction intrinsics (IALL, IANY, IPARITY)
This calls the corresponding runtime functions when appropriate. The implementation
follows the pattern of the SUM and PRODUCT intrinsics.

Differential Revision: https://reviews.llvm.org/D129616
2022-09-26 10:28:46 -06:00
Quentin Colombet
9d259916e1 [mlir][MemRef] Simplify extract_strided_metadata(allocLikeOp)
Teach the pass that simplifies extract_strided_metadata(other_op(memref))
how to get rid of extract_strided_metadata when they are fed by
allocLikeOp.

For the simplification to happen the allocLikeOp needs to have been
normalized. I.e., no weird offset and strides.

When this is the case, we replace:
```
base, offset, sizes, strides =
    extract_strided_metadata(allocLikeOp(allocSizes))
```

With
```
base = reinterpret_cast allocLikeOp(allocSizes) to a flat memref<eltTy>
offset = 0
sizes = allocSizes
strides#i = prod(allocSizes#j, for j in {i+1..rank-1})
```

The computation involving dynamic sizes are expanded in affine.apply.

Differential Revision: https://reviews.llvm.org/D134577
2022-09-26 16:14:29 +00:00
Lorenzo Chelini
27224fe727 [MLIR] Expose getAsValues in StaticValueUtils.h (NFC)
The utility function should live in `StaticValueUtils.h` as it provides
a convenient way to convert a vector of OpFoldResults into a vector of
Values.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D134451
2022-09-26 18:09:27 +02:00
Pengxuan Zheng
961c45fd9f [LLD][COFF] Generate map file even if no /out flag is present
Currently LLD does not generate a map file if no /out flag (e.g., /out:a.exe) is
present. This is because LLD derives the map file's name from the default output
file name is no output file name is specified explicitly on the command
line. However, in this case, the default output file name has not been set by
LLD yet when LLD tries to set the name of the map file. This patch fixes this
corner case by moving the logic handling map file flags to a place after the
default output file name is set.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D134559
2022-09-26 09:05:23 -07:00
Nathan Sidwell
53c3664f67 [xmm] Remove duplicate #define
I noticed a duplicate macro definition in xmmintrin.h.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D134545
2022-09-26 08:59:55 -07:00