Commit Graph

404348 Commits

Author SHA1 Message Date
Nikita Popov fb1a203e45 [InstCombine] Add additional test with signed range check (NFC) 2021-11-10 18:00:24 +01:00
Florian Hahn fcf2ae9923
[SCEV] Add tests that require rewriting zexts when applying guards.
Precommit tests inspired by PR40961 and PR52464.
2021-11-10 16:58:27 +00:00
Simon Pilgrim a1e0aa75ca [X86] combineMulToPMADDWD - remove useless TODO
We should always be able to use PMULUDQ/PMULDQ in PMADDWD patterns with greater than 32-bit extended integer sources
2021-11-10 16:56:44 +00:00
Igor Kirillov 4860f6cb25 [OpenMP] Fix: opposite attributes could be set by -fno-inline
After the changes introduced by D106799 it is possible to tag
outlined function with both AlwaysInline and NoInline attributes using
-fno-inline command line options.
This issue is similiar to D107649.

Differential Revision: https://reviews.llvm.org/D112645
2021-11-10 16:48:09 +00:00
Med Ismail Bennani 976867b513 [lldb/test] Update TestScriptedProcess to use skinny corefiles
This patch changes the ScriptedProcess test to use a stack-only skinny
corefile as a backing store.

The corefile is saved as a temporary file at the beginning of the test,
and a second target is created for the ScriptedProcess. To do so, we use
the SBAPI from the ScriptedProcess' python script to interact with the
corefile process.

This patch also makes some small adjustments to the other ScriptedProcess
scripts to resolve some inconsistencies and removes the raw memory dump
that was previously checked in.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-11-10 17:43:29 +01:00
Med Ismail Bennani 738621d047 [lldb/bindings] Change ScriptedThread initializer parameters
This patch changes the `ScriptedThread` initializer in couple of ways:
- It replaces the `SBTarget` parameter by a `SBProcess` (pointing to the
  `ScriptedProcess` that "owns" the `ScriptedThread`).
- It adds a reference to the `ScriptedProcessInfo` Dictionary, to pass
  arbitrary user-input to the `ScriptedThread`.

This patch also fixes the SWIG bindings methods that call the
`ScriptedProcess` and `ScriptedThread` initializers by passing all the
arguments to the appropriate `PythonCallable` object.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-11-10 17:43:28 +01:00
Med Ismail Bennani ad0f7d3d4a
[lldb] Fix Scripted ProcessLaunchInfo Argument nullptr deref
This patch adds a new `StructuredData::Dictionary` constructor that
takes a `StructuredData::ObjectSP` as an argument. This is used to pass
the opaque_ptr from the `SBStructuredData` used to initialize a
ScriptedProecss, to the `ProcessLaunchInfo` class.

This also updates `SBLaunchInfo::SetScriptedProcessDictionary` to
reflect the formentionned changes which solves the nullptr deref.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-11-10 16:43:19 +00:00
Tobias Gysi 9aea27ac88 [mlir][linalg] Remove getSmallestBoundingIndex (NFC).
Remove the getSmallestBoundingIndex method that has no uses anymore.

Depends On D113548

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113549
2021-11-10 16:18:20 +00:00
Adam Czachorowski 7a2b1bdb4c [clang] Do not crash in APValue::prettyPrint() on forward-decl structs.
The call to getTypeSizeInChars() is replaced with
getTypeSizeInCharsIfKnown(), which does not crash on forward declared
structs. This only affects printing.

Differential Revision: https://reviews.llvm.org/D113570
2021-11-10 17:17:00 +01:00
Tobias Gysi 53da8600e1 [linalg][mlir] Replace getSmallestBoundingIndex in promotion (NFC).
Replace the getSmallestBoundingIndex method used in promotion by getConstantUpperBoundForIndex that uses flat affine constraints to compute a constant upper bound.

Depends On D113546

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113548
2021-11-10 16:16:08 +00:00
David Green 509b397dd5 [AArch64] Combine vector fptoi.sat(fmul) to fixed point fcvtz
Similar to D113199 but dealing with the vector size, this extends the
fptosi+fmul to fixed point fold to handle fptosi.sat nodes that are
equally viable, so long as the saturation width matches the output
width.

Differential Revision: https://reviews.llvm.org/D113200
2021-11-10 16:12:48 +00:00
Andrew Savonichev 00aa0aeb06 [NVPTX] Add imm variants for surface and texture instructions
Texture/sampler/surface operands can be either a register or an
immediate (an index of .texref, .samplerref or .surfref).

TableGen declarations for these instructions used to only have
Int64Regs operands, so this caused issues when machine verifier
is turned on:

    *** Bad machine code: Expected a register operand. ***
    - function:    bar
    - basic block: %bb.0  (0x55b144d99ab8)
    - instruction: %4:int32regs = SULD_1D_I32_TRAP 0, killed %2:int32regs
    - operand 1:   0

The solution is to duplicate these instructions for all possible
operand types (i16imm and Int64Regs). Since this would
essentially double the amount code in TableGen, the patch also
does some refactoring for the original instructions to keep
things manageable.

Differential Revision: https://reviews.llvm.org/D112232
2021-11-10 19:05:03 +03:00
Tobias Gysi 4e2c978f44 [mlir][linalg] Use getUpperBoundForIndex in hoisting (NFC).
Use the custom upper bound computation in hoisting by the new getUpperBoundForIndex method.

Depends On D113546

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113547
2021-11-10 15:55:55 +00:00
Tobias Gysi b326eb64fd [mli][linalg] Use CodegenStrategy to test interchange (NFC).
Use CodegenStrategy instead of a separate test pass to test iterator interchange.

Depends On D113409

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113550
2021-11-10 15:44:44 +00:00
Dokyung Song 614b8bac01 [libFuzzer] Deflake entropic exec-time test.
Entropic scheduling with exec-time option can be misled, if inputs
on the right path to become crashing inputs accidentally take more
time to execute before it's added to the corpus. This patch, by letting
more of such inputs added to the corpus (four inputs of size 7 to 10,
instead of a single input of size 2), reduces possibilities of being
influenced by timing flakiness.

A longer-term fix could be to reduce timing flakiness in the fuzzer;
one way could be to execute inputs multiple times and take average of
their execution time before they are added to the corpus.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D113544
2021-11-10 07:43:21 -08:00
Nico Weber e23c6cc54e [aarch64/mac] Correctly disassemble @TLVPPAGE(OFF) relocs
`llvm-otool -tV foo.o` and `llvm-objdump --macho -d foo.o` would
previously fail on object files containing @TLVPPAGE or @TLVPPAGEOFF relocs.

Move llvm-objdump-specific test from
llvm/test/MC/AArch64/arm64-tls-modifiers-darwin.s to new
llvm/test/tools/llvm-objdump/MachO/disassemble-arm64-tlv-modifers.test
and put test for this fix to that new file.

Fixes PR52356.

Differential Revision: https://reviews.llvm.org/D112843
2021-11-10 10:41:18 -05:00
Tobias Gysi 659586bf19 [mlir][linalg] Remove padding test pass (NFC).
Remove padding test pass that was replaced by CodegenStrategy.

Depends On D113411

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113412
2021-11-10 15:33:26 +00:00
Jon Chesterfield 27177b82d4 [OpenMP] Lower printf to __llvm_omp_vprintf
Extension of D112504. Lower amdgpu printf to `__llvm_omp_vprintf`
which takes the same const char*, void* arguments as cuda vprintf and also
passes the size of the void* alloca which will be needed by a non-stub
implementation of `__llvm_omp_vprintf` for amdgpu.

This removes the amdgpu link error on any printf in a target region in favour
of silently compiling code that doesn't print anything to stdout.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D112680
2021-11-10 15:30:56 +00:00
Quinn Pham 8cd1c2c8d3 [NFC] Inclusive language: replace master with main in benchmark docs
[NFC] As part of using inclusive language within the llvm project and to match
the renamed master branch of `google/benchmark`, this patch replaces master with
main in the benchmark releasing docs.

Reviewed By: kbobyrev

Differential Revision: https://reviews.llvm.org/D113513
2021-11-10 09:24:51 -06:00
Simon Pilgrim 381d14775e [DAG] reassociateOpsCommutative - pull out repeated getOperand() calls. NFC. 2021-11-10 15:19:13 +00:00
Tobias Gysi ea53a6938b [linalg][mlir] Replace getSmallestBoundingIndex in padding (NFC).
Replace the getSmallestBoundingIndex method used in padding by getConstantUpperBoundForIndex that uses flat affine constraints to compute a constant upper bound.

Depends On D113398

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113546
2021-11-10 15:12:51 +00:00
Tobias Gysi b676a67092 [mlir][linalg] Use CodegenStrategy to test hoisting (NFC).
Use CodegenStrategy instead of a separate test pass to test hoisting.

Depends On D113410

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113411
2021-11-10 15:06:31 +00:00
Tobias Gysi 0c7c532643 [mli][linalg] Use CodegenStrategy to test padding (NFC).
Use CodegenStrategy instead of a separate test pass to test padding.

Depends On D113409

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113410
2021-11-10 15:00:06 +00:00
Tobias Gysi b86b2309ce [mlir][linalg] Use AffineApplyOp to compute padding width (NFC).
Use AffineApplyOp instead of SubIOp to compute the padding width when creating a pad tensor operation.

Depends On D113382

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113404
2021-11-10 14:53:52 +00:00
Sanjay Patel 67299aa84f [InstCombine] add check for integer source type from cast to prevent crash
A problem was noted in the post-commit review for
c36b7e21bd / D113035 :

If the source type is not integer or integer vector,
then we could crash when trying to ComputeNumSignBits().
2021-11-10 09:44:55 -05:00
Sanjay Patel be9e892e9d [x86] shorten function name; NFC 2021-11-10 09:44:55 -05:00
Sanjay Patel 51baafd238 [x86] add tests for signbit splat mask patterns; NFC 2021-11-10 09:44:21 -05:00
Valentin Clement df3b9810c7
[fir] Add fir.box_rank, fir.box_addr, fir.box_dims and fir.box_elesize conversion
This patch adds conversion for basic box operations that extract
information from the box.

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

Reviewed By: awarzynski

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
2021-11-10 15:35:19 +01:00
Valentin Clement 5eca6ad752
[fir] Use contralized values for indexing box
Add constant to index the different values in a box so that
they can be reused for the codegen part as well.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D113553
2021-11-10 15:35:19 +01:00
Nemanja Ivanovic 5840f7197d [PowerPC] Respect rounding mode in the back end
Currently, the floating point instructions that depend on
rounding mode are correctly marked in the PPC back end with
an implicit use of the RM register. Similarly, instructions
that explicitly define the register are marked with an
implicit def of the same register. So for the most part,
RM-using code won't be moved across RM-setting instructions.

However, calls are not marked as RM-setting instructions so
code can be moved across calls. This is generally desired,
but so is the ability to turn off this behaviour with an
appropriate option - and -frounding-math really should be
that option.

This patch provides a set of call instructions (for direct
and indirect calls) that are marked with an implicit def of
the RM register. These will be used for calls that are marked
with the strictfp attribute.

Differential revision: https://reviews.llvm.org/D111433
2021-11-10 08:19:58 -06:00
Tobias Gysi ba2ac9c97c [mli][linalg] Add flag to control CodegenStrategy enable pass.
Add a flag to control if CodegenStrategy runs the EnablePass between the transformations.

Depends On D113382

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113409
2021-11-10 14:11:40 +00:00
Pavel Labath ff7ce0af04 [lldb] DeConstStringify the Property class
Most of the interfaces were converted already, this just converts the
internal implementation.
2021-11-10 15:07:30 +01:00
Tobias Gysi 969243a007 [mlir][linalg] Hoist padding simplifications (NFC).
Remove unused members and store the indexing and packing loops in SmallVector.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113398
2021-11-10 14:01:49 +00:00
Andrew Savonichev e201232ece [NFC][AArch64] Handle processLogicalImmediate error
If processLogicalImmediate fails, we should return from the function
without changing InsInstrs or DelInstrs. This happens for
CodeGen/AArch64/urem-seteq-nonzero.ll LIT test as described in
https://reviews.llvm.org/D99662#2662296.

Callers of genAlternativeCodeSequence skip patterns where InsInstrs
stays empty, so this does not cause any issues now.

Differential Revision: https://reviews.llvm.org/D100047
2021-11-10 16:57:24 +03:00
Florian Hahn cd8aa234fd
[llvm-reduce] Use DenseSet instead of std::set (NFC).
When reducing functions with very large basic blocks (~ almost 1 million
BBs), the majority of time is spent maintaining the order in the std::set
for the basic blocks to keep.

In those cases, DenseSet<> is much more efficient. Use it instead.
2021-11-10 13:56:22 +00:00
Tobias Gysi 0609eb1b32 [mlir][linalg] Remove padding from tiling options.
Remove the padding options from the tiling options since padding is now implemented by a separate pattern/pass introduced in https://reviews.llvm.org/D112412.

The revsion remove the tile-and-pad-tensors.mlir and replaces it with the pad.mlir that tests padding in isolation (without tiling). Similarly, hoist-padding.mlir is replaced by pad-and-hoist.mlir introduced in https://reviews.llvm.org/D112713.

Depends On D112838

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D113382
2021-11-10 13:33:28 +00:00
Simon Pilgrim ed80761b50 [DAG] Split BuildVectorSDNode::getConstantRawBits into BuildVectorSDNode::recastRawBits helper. NFC.
NFC refactor of D113351, pulling out the APInt split/merge code from the BuildVectorSDNode bits extraction into a BuildVectorSDNode::recastRawBits helper. This is to allow us to reuse the code when we're packing constant folded APInt data back together.
2021-11-10 13:06:19 +00:00
Florian Hahn 93931d78cf
[LV] Do not rely on InductionDescriptor::getCastInsts. (NFC)
Now that CastDef is passed as VPValue, there is no need to access
ID.getCastInsts, as CastDef can instead be checked.
2021-11-10 13:03:44 +00:00
Vassil Vassilev 4fb0805c65 [clang-repl] Allow Interpreter::getSymbolAddress to take a mangled name. 2021-11-10 12:52:05 +00:00
Diana Picus 81c99c5404 [fir] Fixup comment. NFC
Fixed comment as requested in https://reviews.llvm.org/D113560.
2021-11-10 12:49:31 +00:00
Diana Picus a343b74f85 [fir] Add !fir.char type conversion
This patch is part of the upstreaming effort from fir-dev.

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
2021-11-10 12:27:58 +00:00
Diana Picus deafc6fc6d [fir] Add !fir.ptr type conversion
This patch is part of the upstreaming effort for fir-dev.

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
2021-11-10 12:27:39 +00:00
Denys Shabalin aaea92e1cd [mlir] Reintroduce nano time to execution_engine
Prior change had a broken test that wasn't run by accident.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D113488
2021-11-10 13:14:18 +01:00
Joachim Protze 52da6f562e Revert "[openmp] Add OMPT initialization in libomptarget"
Reverting initial OMPT for target implementation in favor of a
different implementation.

This reverts commit 3bc8ce5dd7.
2021-11-10 12:44:25 +01:00
Florian Hahn e7f1232cb7
[LV] Move optimized IV recipes to phi section of header after sinking.
Unfortunately sinking recipes for first-order recurrences relies on
the original position of recipes. So if a recipes needs to be sunk after
an optimized induction, it needs to stay in the original position, until
sinking is done. This is causing PR52460.

To fix the crash, keep the recipes in the original position until
sink-after is done.

Post-commit follow-up to c45045bfd0 to address PR52460.
2021-11-10 11:41:08 +00:00
Kerry McLaughlin 6f16ee5e14 Revert "[LoopVectorize] Extract the last lane from a uniform store"
This reverts commit 0d748b4d32.
This is causing some failures when building Spec2017 with scalable
vectors. Reverting to investigate.
2021-11-10 11:21:19 +00:00
Roman Lebedev cffbfd01e3
[NFC][SROA] Revisit test coverage in non-capturing-call.ll 2021-11-10 13:38:23 +03:00
Dmitry Makogon 62f86d4f95 Reapply 5ec2386 "Reapply db28934 "[IndVars] Pass TTI to replaceCongruentIVs""
This reverts commit 7cd273c339.

Several patches with tests fixes have been applied:
0cada82f0a "[Test] Remove incorrect test in GVN"
97cb13615d "[Test] Separate IndVars test into AArch64 and X86 parts"
985cc490f1 "[Test] Remove separated test in IndVars",
and test failures caused by 5ec2386 should be resolved now.
2021-11-10 17:36:14 +07:00
Matthias Springer 8f6119128f [mlir][linalg][bufferize] Add mustBufferizeInPlace to op interface
This is useful for ops such as scf::IfOp, which always bufferize in-place.

This commit is in preparation of decoupling BufferizationAliasInfo from the SCF dialect.

Differential Revision: https://reviews.llvm.org/D113339
2021-11-10 19:33:11 +09:00
Michał Górny e7861449ea [lldb] [test] Skip new signal tests on Windows 2021-11-10 11:31:21 +01:00