aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-12-08[X86] combineConcatVectorOps - handle the load combines in the same placeSimon Pilgrim1-19/+22
The intention is to merge some of the concat folds of vector constant data to address some of the remaining regressions in #73509
2023-12-08[libc][NFC] Clean up conversion warnings in math function implementations. ↵lntue8-12/+14
(#74697)
2023-12-08[InstCombine] Relax one-use check for icmp of gep foldNikita Popov2-4/+4
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.
2023-12-08[InstCombine] Add some more multi-use icmp gep folding tests (NFC)Nikita Popov1-0/+46
2023-12-08[libc++][NFC] Move 32-bit pointer Lit feature check where it belongsLouis Dionne1-12/+12
It was previously defined in the block where we defined back-deployment features.
2023-12-08[flang] Fix length handling in character kind implicit conversion (#74586)jeanPerier2-1/+32
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.
2023-12-08[OpenACC][NFC] Change Readonly token check to use isSpecialTokenKinderichkeane1-2/+4
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.
2023-12-08[NFC][LLVM] clang-format "struct ValID" within LLParser.h.Paul Walker1-9/+16
2023-12-08[clang][Interp] Implement builtin_expect (#69713)Timm Baeder3-0/+61
2023-12-08[lldb][test] Disable image lookup colour test on Mac OSDavid Spickett1-0/+3
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.
2023-12-08[lldb][test] Disable image lookup colour test on WindowsDavid Spickett1-0/+3
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.
2023-12-08[lldb][test] Don't check line number in image lookup colour testDavid Spickett1-1/+1
We can assume the correct symbol is found, so putting the line number here is just going to confuse anyone extending these tests.
2023-12-08[NVPTX] Fix a typo that makes the output invalid PTXBenjamin Kramer2-1/+11
It's surprisingly tricky to trigger this as it's only used by abs/neg which expand into and/xor in the integer domain.
2023-12-08[AMDGPU] Add GFX11 test coverage to integer-mad-patterns.llJay Foad1-0/+1363
2023-12-08[Clang] Emit TBAA info for enums in C (#73326)David Sherwood3-1/+123
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
2023-12-08[GlobalISel] Fix comment on buildIsFPClassJay Foad1-1/+1
2023-12-08[AMDGPU][NFC] Improve testing for AMDHSA ABI Version (#74300)Saiyedul Islam15-72/+171
Add tests for COV4 as well as COV5 instead of only testing for the default version.
2023-12-08[X86] combineLoad - consistently use cast<MemSDNode>. NFCI.Simon Pilgrim1-3/+3
getBasePtr()/getMemoryVT() are common methods for all memory nodes.
2023-12-08[VPlan] Compute scalable VF in preheader for induction increment. (#74762)Florian Hahn60-1122/+1138
UF * VF is loop invariant and can be computed directly in the preheader. This prepares the code for #74761 and reduces the test changes.
2023-12-08[mlir] Add missing MLIR_ENABLE_EXECUTION_ENGINE option to MLIRConfig.cmake.inMehdi Amini1-0/+1
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.
2023-12-08[llvm-exegesis]Allow clients to do their own snippet running error ha… ↵Clement Courbet3-13/+19
(#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.
2023-12-08[LoopUnroll] Make use of MaxTripCount for loops with "#pragma unroll" (#74703)XiangZhang2-2/+942
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).
2023-12-08[X86] canonicalizeBitSelect - always use VPTERNLOGD for sub-32bit typesSimon Pilgrim29-398/+381
We were using VPTERNLOGQ for everything but i32 types, which made broadcasts wider than necessary Noticed in #73509
2023-12-08[lldb] Add missing nullptr checks when colouring symbol outputDavid Spickett2-6/+14
This adds some checks missed by c90cb6eee8296953c097fcc9fc6e61f739c0dad3, probably because some tests only run on certain platforms.
2023-12-08[lldb] colorize symbols in image lookup with a regex pattern (#69422)taalhaataahir010213-35/+239
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>
2023-12-08 [DAG] isSplatValue - node is a splat if all demanded elts have the same ↵Simon Pilgrim13-2347/+2321
whole constant value (#74443)
2023-12-08[flang][CodeGen] add nsw to address calculations (#74709)Tom Eccles6-104/+115
`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.
2023-12-08[VPlan] Print flags for VPWidenCastRecipe.Florian Hahn2-17/+16
Update VPWidenCastRecipe to also print flags. Simplify nneg printing test and replace hard-coded value number references with patterns.
2023-12-08Reapply "[lldb][test] TestLocationListLookup.py: skip expr check on ↵Mikhail Goncharov1-7/+20
unsupported platforms (#74818)" This reverts commit e33302fa1279d0a15aac18eca3f0311669bfe328. there is a fix already, sorry for the noise
2023-12-08Revert "[lldb][test] TestLocationListLookup.py: skip expr check on ↵Mikhail Goncharov1-20/+7
unsupported platforms (#74818)" This reverts commit 11a7e5781c6363ca3061f57f3aa7e49164673821. Test fails: https://lab.llvm.org/buildbot/#/builders/219/builds/7416 and others.
2023-12-08[RISCV][NFC] Use raw_svector_ostream to construct key of SubtargetMap (#72964)Wang Pengcheng1-7/+2
To simplify some code.
2023-12-08[X86] LowerBUILD_VECTOR - don't use insert_element(constant, elt, idx) if we ↵Simon Pilgrim2-0/+69
have a freeze(undef) element Fixes #74736
2023-12-08[AMDGPU] Fix GCNUpwardRPTracker: max register pressure on defs. (#74422)Valery Pykhtin3-135/+112
Treat a defined register as fully live "at" the instruction and update maximum pressure accordingly. Fixes #3786.
2023-12-08[InstCombine] Generalize folds for inversion of icmp operands (#74317)Nikita Popov6-71/+50
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.
2023-12-08[LV] Add support for linear arguments for vector function variants (#73941)Graham Hunter2-15/+53
If we have vectorized variants of a function which take linear parameters, we should be able to vectorize assuming the strides match.
2023-12-08[lldb][test] TestLocationListLookup.py: skip expr check on unsupported ↵Michael Buch1-7/+20
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
2023-12-08LoopVectorize/test: fix opt invocations with -march (NFC) (#74462)Ramkumar Ramachandra2-4/+2
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.
2023-12-08MIRLangRef: fix llc invocation lines to write output (#74104)Ramkumar Ramachandra1-2/+2
The first couple of llc invocations mentioned in the document are wrong, and users will get confused about no output being written. Fix them.
2023-12-08[mlir][linalg] Expose getPreservedProducerResults method from ↵Amir Bishara2-11/+24
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.
2023-12-08[DomCondCache] Remove unused variable (NFC)Nikita Popov1-2/+1
2023-12-08[ValueTracking] Remove unused argument (NFC)Nikita Popov1-4/+4
2023-12-08Revert "[llvm-readobj][AArch64][ELF][PAC] Support ELF AUTH constants" (#74816)Daniil Kovalev11-302/+26
Reverts llvm/llvm-project#72713 Buildbot tests fail on clang-armv7-global-isel builder https://lab.llvm.org/buildbot/#/builders/186/builds/13604
2023-12-08Fix argument name of GEPOp builder (#74810)xiaoleis-nv1-2/+2
This MR fix the argument name of GEPOp builder from `basePtrType` to `elementType` to avoid confusion. Co-authored-by: Xiaolei Shi <xiaoleis@nvidia.com>
2023-12-08 [clang][NFC] Refactor expected directives in C++ DRs 700-1999 (#74767)Vlad Serebrennikov14-859/+1530
This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details.
2023-12-08[lldb][Symbol] Make sure we decrement PC before checking location list (#74772)Michael Buch5-35/+34
2023-12-08[LoongArch] Mark ISD::FNEG as legalwanglei5-0/+68
2023-12-08Add opt with ctlz and shifts of power of 2 constants (#74175)Sizov Nikita2-0/+268
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
2023-12-07[AMDGPU] Use isNullConstant (NFC)Kazu Hirata1-5/+4
2023-12-08[llvm-readobj][AArch64][ELF][PAC] Support ELF AUTH constants (#72713)Daniil Kovalev11-26/+302
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
2023-12-08[LoongArch] Make ISD::FSQRT a legal operation with lsx/lasx feature (#74795)wanglei7-0/+257
And add some patterns: 1. (fdiv 1.0, vector) 2. (fdiv 1.0, (fsqrt vector))