Age | Commit message (Collapse) | Author | Files | Lines |
|
The intention is to merge some of the concat folds of vector constant data to address some of the remaining regressions in #73509
|
|
(#74697)
|
|
Instead of checking whether the GEP as a whole is constant, only
check whether it has constant incides. This matches what we do in
other places in this code.
This has little practical impact, because it is mostly already
handled through other cases anyway. We see a difference for
non-inbounds equality comparisons.
|
|
|
|
It was previously defined in the block where we defined back-deployment
features.
|
|
When assigning to a whole allocatable, lowering is dealing with the
implicit conversion to preserve the RHS lower bounds. In case of
character KIND mismatch, the code was setting the new RHS length to the
one from the LHS, which is wrong for two reasons:
- no padding/truncation was actually done in the conversion
- the RHS length should anyway not be touched since the one from the
allocatable LHS may change to become the one of the RHS.
Update the code to preserve the RHS type length when materializing the
implicit character KIND conversion.
|
|
As brought up in a previous review, instead of checking a token's
spelling in text everywhere, we added a 'special token kind'.
This adds the only other use of a special kind to use the checking
function instead.
|
|
|
|
|
|
I think it can work there but we need to correct the CHECK lines.
```
command-image-lookup-color.test:34:11: error: CHECK7: expected string not found in input
^
```
https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/10880/testReport/
I don't have a way to see the full output.
|
|
On Linux `main.c` shows up in the symbol search but this is not the
case on Windows according to:
https://lab.llvm.org/buildbot/#/builders/219/builds/7422/steps/6/logs/stdio
It's possible we could make this test work there once function
search highlighting is implemented.
|
|
We can assume the correct symbol is found, so putting the line
number here is just going to confuse anyone extending these tests.
|
|
It's surprisingly tricky to trigger this as it's only used by abs/neg
which expand into and/xor in the integer domain.
|
|
|
|
When emitting TBAA information for enums in C code we currently just
treat the data as an 'omnipotent char'. However, with C strict aliasing
this means we fail to optimise certain cases. For example, in the
SPEC2017 xz benchmark there are structs that contain arrays of enums,
and clang pessmistically assumes that accesses to those enums could
alias with other struct members that have a different type.
According to
https://en.cppreference.com/w/c/language/enum
enums should be treated as 'int' types unless explicitly specified (C23)
or if 'int' would not be large enough to hold all the enumerated values.
In the latter case the compiler is free to choose a suitable integer
that would hold all such values.
When compiling C code this patch generates TBAA information for the enum
by using an equivalent integer of the size clang has already chosen for
the enum. I have ignored C++ for now because the rules are more complex.
New test added here:
clang/test/CodeGen/tbaa.c
|
|
|
|
Add tests for COV4 as well as COV5 instead of only testing for the
default version.
|
|
getBasePtr()/getMemoryVT() are common methods for all memory nodes.
|
|
UF * VF is loop invariant and can be computed directly in the preheader.
This prepares the code for #74761 and reduces the test changes.
|
|
This is the kind of options that downstream consumers of preconfigured MLIR
packages can check to see if the execution engine is available or not.
|
|
(#74711)
…ndling.
Returns an error *and* a benchmark rather than an error *or* a
benchmark. This allows users to have custom error handling while still
being able to inspect the benchmark.
Apart from this small API change, this is an NFC.
This is an alternative to #74211.
|
|
Fix loop unroll fail caused by branches folding.
For example:
SimplifyCFG foldloop branches then cause loop unroll failed for "#program unroll" loop.
```
#program unroll
for (int I = 0; I < ConstNum; ++I) { // folding "I < ConstNum" and "Cond2"
if (Cond2) {
break;
}
xxx loop body;
}
```
The pragma unroll metadata only takes effect if there is an exact trip
count, but not if there is an upper bound trip count. This patch make it
work with an upper bound trip count as well in shouldPragmaUnroll().
Loop unroll is important in stack nervous devices (e.g. GPU, and that is
why a lot of GPU code mark loop with "#program unroll").
It usually much simplify the address (offset) calculations in old
iterations, then we can do a lot of others optimizations, e.g, SROA, for
these simplifed address (escape alloca the whole aggregates).
|
|
We were using VPTERNLOGQ for everything but i32 types, which made broadcasts wider than necessary
Noticed in #73509
|
|
This adds some checks missed by c90cb6eee8296953c097fcc9fc6e61f739c0dad3,
probably because some tests only run on certain platforms.
|
|
Fixes https://github.com/llvm/llvm-project/issues/57372
Previously some work has already been done on this. A PR was generated
but it remained in review:
https://reviews.llvm.org/D136462
In short previous approach was following:
Changing the symbol names (making the searched part colorized) ->
printing them -> restoring the symbol names back in their original form.
The reviewers suggested that instead of changing the symbol table, this
colorization should be done in the dump functions itself. Our strategy
involves passing the searched regex pattern to the existing dump
functions responsible for printing information about the searched
symbol. This pattern is propagated until it reaches the line in the dump
functions responsible for displaying symbol information on screen.
At this point, we've introduced a new function called
"PutCStringColorHighlighted," which takes the searched pattern, a prefix and suffix,
and the text and applies colorization to highlight the pattern in the
output. This approach aims to streamline the symbol search process to
improve readability of search results.
Co-authored-by: José L. Junior <josejunior@10xengineers.ai>
|
|
whole constant value (#74443)
|
|
`nsw` is a flag for LLVM arithmetic operations meaning "no signed wrap".
If this keyword is present, the result of the operation is a poison
value if overflow occurs. Adding this keyword permits LLVM to re-order
integer arithmetic more aggressively.
In
https://discourse.llvm.org/t/rfc-changes-to-fircg-xarray-coor-codegen-to-allow-better-hoisting/75257/16
@vzakhari observed that adding nsw is useful to enable hoisting of
address calculations after some loops (or is at least a step in that
direction).
Classic flang also adds nsw to address calculations.
|
|
Update VPWidenCastRecipe to also print flags. Simplify nneg printing
test and replace hard-coded value number references with patterns.
|
|
unsupported platforms (#74818)"
This reverts commit e33302fa1279d0a15aac18eca3f0311669bfe328.
there is a fix already, sorry for the noise
|
|
unsupported platforms (#74818)"
This reverts commit 11a7e5781c6363ca3061f57f3aa7e49164673821.
Test fails: https://lab.llvm.org/buildbot/#/builders/219/builds/7416 and
others.
|
|
To simplify some code.
|
|
have a freeze(undef) element
Fixes #74736
|
|
Treat a defined register as fully live "at" the instruction and update maximum pressure accordingly. Fixes #3786.
|
|
We have a bunch of folds that basically perform X pred Y to ~Y pred ~X
for various special cases where this saves an instruction.
Generalize these folds to use isFreeToInvert(). We have to make sure
that we consume an instruction in either of the inversions, otherwise
we're just going to swap the icmp back and forth.
Fixes https://github.com/llvm/llvm-project/issues/74302.
|
|
If we have vectorized variants of a function which take linear
parameters, we should be able to vectorize assuming the strides match.
|
|
platforms (#74818)
The `expect_expr` check was introduced in
https://github.com/llvm/llvm-project/pull/74772. It is failing on Linux
and Windows, so skip this test to unblock the bots
|
|
opt accepts the -march command-line argument, but this argument only
makes sense in conjunction with -mtriple. Fix a couple of tests under
LoopVectorize that invoke opt with -march but without -mtriple, to avoid
confusing users.
|
|
The first couple of llc invocations mentioned in the document are wrong,
and users will get confused about no output being written. Fix them.
|
|
ElementwiseOpFusion file (#73850)
Declare `getPreservedProducerResults` function which helps to get the
preserved results of the producer linalg generic operation as a result
of elementwise fusion.
|
|
|
|
|
|
Reverts llvm/llvm-project#72713
Buildbot tests fail on clang-armv7-global-isel builder
https://lab.llvm.org/buildbot/#/builders/186/builds/13604
|
|
This MR fix the argument name of GEPOp builder from `basePtrType` to
`elementType` to avoid confusion.
Co-authored-by: Xiaolei Shi <xiaoleis@nvidia.com>
|
|
This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its
corresponding PR for details.
|
|
|
|
|
|
This patch does the following simplifications:
```
cttz(shl(C, X), 1) -> add(cttz(C, 1), X)
cttz(lshr exact(C, X), 1) -> sub(cttz(C, 1), X)
ctlz(lshr(C, X), 1) --> add(ctlz(C, 1), X)
ctlz(shl nuw (C, X), 1) --> sub(ctlz(C, 1), X)
```
Alive2: https://alive2.llvm.org/ce/z/9KHlKc
Closes #41333
|
|
|
|
This patch adds llvm-readobj support for:
- Dynamic R_AARCH64_AUTH_* relocations (including RELR compressed AUTH
relocations) as described here:
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#auth-variant-dynamic-relocations
- .note.AARCH64-PAUTH-ABI-tag section as defined here
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#elf-marking
|
|
And add some patterns:
1. (fdiv 1.0, vector)
2. (fdiv 1.0, (fsqrt vector))
|