- Dec 27, 2022
-
-
Roman Lebedev authored
[DAGCombine] `combineShuffleToZeroExtendVectorInReg()`: widen shuffle elements before trying to match We might have sunk a bitcast into shuffle, and now it might be operating on more fine-grained elements than what we'd match, so we must not be dependent on whatever the granularity the shuffle happened to be in, but transform it into the one canonical for us - with widest elements.
-
Roman Lebedev authored
-
Roman Lebedev authored
We don't have any reason to expect that the operand we will match is on any particular hand of the shuffle, so we should try both.
-
Roman Lebedev authored
The baseline legalization for `ISD::ZERO_EXTEND_VECTOR_INREG` (`VectorLegalizer::ExpandZERO_EXTEND_VECTOR_INREG`), blends-in the zeros, but as mentioned e.g. in b4bd0a40, there is no such thing for AArch64. So some of the shuffles that would be nicely lowered by `LowerVECTOR_SHUFFLE()`, e.g. into `ZIP1`, would now be unrecognizable after round-tripping through `ISD::ZERO_EXTEND_VECTOR_INREG` recognition & legalization. The most obvious solution is to just custom-lower `ISD::ZERO_EXTEND_VECTOR_INREG` as the `ZIP1`-with-zeros, like it would have been originally in that test case.
-
Roman Lebedev authored
Sometimes we end up with a shuffles in DAG that would be better represented as a `ISD::ZERO_EXTEND_VECTOR_INREG`, and a failure to do so causes suboptimal codegen in a number of cases, especially when we will then cast vector to scalar. I acknowledge, the test changes here are rather underwhelming, but as with all of codegen, it's always a yak shawing, and this is the most stripped down version of the patch that shows *some* effect without having insurmountable amount of fallout to deal with. The next change resolves this regression. The transformation will be extended in follow-ups.
-
Roman Lebedev authored
At least, they are equivalent to the `@vzipNoBlend`, which is lowered into zip1.
-
tlattner authored
Commit changes to the Code of Conduct that make it more clear regarding behavior outside of LLVM spaces that impact the safety of our community members. Discussion may be found here: https://discourse.llvm.org/t/code-of-conduct-changes-related-to-llvm-project-policy-changes/64197
-
Sanjay Patel authored
This was noted as a potential miscompile in the post-commit feedback for the patch that added this fold: d4493dd1
-
Sanjay Patel authored
I left a few of the existing undef tests in place for extra coverage and because one of those was noted as a miscompile in the post-commit feedback for d4493dd1, but we are transitioning to poison, so it is more valuable to test the expected IR going forward.
-
Michał Górny authored
Use `LINK_COMPONENTS` instead of manual `target_link_libraries` to link lit-cpuid to LLVM components. This ensures that dylib is used along with `LLVM_LINK_LLVM_DYLIB` rather than linking to component libraries that may not be installed. This fixes build failure on Gentoo after a dep on TargetParser component was added in f09cf34d. Differential Revision: https://reviews.llvm.org/D140671
-
Florian Hahn authored
This reverts commit 2656572d. It looks like CINT2017rate/502.gcc_r gets mis-compiled with LTO + PGO on AArch64 with function specialization.
-
Danila Malyutin authored
This transformation could've triggered a verifier assert if RegA and RegB were of different reg classes. Fix this by constraining as the comment for replaceRegWith suggests. Differential Revision: https://reviews.llvm.org/D140672
-
- Dec 26, 2022
-
-
Andrei Safronov authored
Add branch/jump/call/l32r instructions and fixups support. Add R_XTENSA_32/R_XTENSA_SLOT0_OP relocations in object files generation. Modify tests to support new instructions. Add tests for relocations and fixups. Differential Revision: https://reviews.llvm.org/D64836
-
Andrei Safronov authored
Differential Revision: https://reviews.llvm.org/D64835
-
Andrei Safronov authored
Add new subset of Core Instructions (not full yet). Add appropriate operands description, modify asm parser, printer and code emitter. Modify tests to support new instructions. Differential Revision: https://reviews.llvm.org/D64834
-
Andrei Safronov authored
Add printer for current instructions and operands subsets. Also add basic tests of the Xtensa instructions. Differential Revision: https://reviews.llvm.org/D64833
-
Andrei Safronov authored
Currently parse just described in *.td files Xtensa instructions and operands subsets. Differential Revision: https://reviews.llvm.org/D64832
-
Andrei Safronov authored
Differential Revision: https://reviews.llvm.org/D64831
-
Andrei Safronov authored
Add initial Xtensa.td file with target machine description. Add XtensaInstrInfo.td, currently describe just susbet of Core Instructions like ALU, Processor control, memory barrier and some move instructions. Add descriptions of the instructions formats(XtensaInstrInfo.td) and some immediate instruction operands(XtensaOperands.td). Add General Registers and Special Registers classes. Differential Revision: https://reviews.llvm.org/D64830
-
Andrei Safronov authored
Add Xtensa MCTargetDesc stub. Add XtensaTargetMachine and XtensaTargetInfo. Modify llib/Target/LLVMBuild.txt. Now Xtensa target could be builded as EXPERIMENTAL. Differential Revision: https://reviews.llvm.org/D64829
-
Andrei Safronov authored
Add file with Xtensa ELF relocations. Add Xtensa support to ELF.h, ELFObject.h and ELFYAML.cpp. Add simple test of Xtensa ELF representation in YAML. Differential Revision: https://reviews.llvm.org/D64827
-
Andrei Safronov authored
I'm sharing initial set of patches that adds LLVM backend for Xtensa architecture. It is based on this LLVM fork https://github.com/espressif/llvm-xtensa. I prepared patches by similar way like it was already successfully done for RISCV, i.e. incrementally add an initial MC layer for Xtensa by small chunks which could be reviewable. Differential Revision: https://reviews.llvm.org/D64826
-
WANG Xuerui authored
Seems the codegen was stale (the extra `ret` after the tail call should not be there, and indeed it is not emitted by the current code), plus the whitespaces are different from the update_llc_test_checks.py style. Simply regenerate it to fix the test failure. Differential Revision: https://reviews.llvm.org/D140670
-
Lin Runze authored
This is modeled after [[ https://reviews.llvm.org/D89788 | the RISCV GHC calling convention]] and matches [[ https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9292 | the corresponding GHC change ]]. Reviewed By: xen0n, wangleiat Differential Revision: https://reviews.llvm.org/D137495
-
Michał Górny authored
Explicitly pass triple to the test compiler to prevent failure when the host triple is 32-bit. This is the same solution as f74e3d2f, thanks to Joseph Huber for it.
-
Max Kazantsev authored
They were supposed to test inverted branches with OR condition, not AND. Fixed this now.
-
Max Kazantsev authored
This is a preparation step to support optimization of conditions that are not immediately ICmp.
-
Max Kazantsev authored
-
Vitaly Buka authored
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information" Revert "Fix lldb option handling since e953ae5b (part 2)" Revert "Fix lldb option handling since e953ae5b" GCC build hangs on this bot https://lab.llvm.org/buildbot/#/builders/37/builds/19104 compiling CMakeFiles/obj.clangBasic.dir/Targets/AArch64.cpp.d The bot uses GNU 11.3.0, but I can reproduce locally with gcc (Debian 12.2.0-3) 12.2.0. This reverts commit caa71355. This reverts commit 06b90e2e. This reverts commit e953ae5b.
-
eopXD authored
As topic, this commit reduces the for-loops with utilities of SmallVector. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D140661
-
Joseph Huber authored
We already have a tool called `amdgpu-arch` which returns the GPUs on the system. This is used to determine the default architecture when doing offloading. This patch introduces a similar tool `nvptx-arch`. Right now we use the detected GPU at compile time. This is unhelpful when building on a login node and moving execution to a compute node for example. This will allow us to better choose a default architecture when targeting NVPTX. Also we can probably use this with CMake's `native` setting for CUDA now. CUDA since 11.6 provides `__nvcc_device_query` which has a similar function but it is probably better to define this locally if we want to depend on it in clang. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D140433
-
Jojo R authored
This patch implements the T-Head vendor extensions (XTHeadVdot), which is documented here, it's based on standard vector extension v1.0: https://github.com/T-head-Semi/thead-extension-spec
-
Owen Anderson authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D140648
-
Owen Anderson authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D140656
-
Chen Zheng authored
Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D140544
-
Youling Tang authored
- GCC does not recognize $fcsr0, uses $r0 instead. - GCC does not implement __builtin_thread_pointer, which can be obtained directly through $tp. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D140545
-
Roman Lebedev authored
-
Roman Lebedev authored
Likewise as with legal types check, might as well not match if won't use.
-
Roman Lebedev authored
It will be needed in an upcoming patch to implement some shuffle combining.
-
Roman Lebedev authored
Adding zero-ext support isn't as straight-forward, and it's easier to to so in a new function, but this helper is useful there. This does not change any existing behaviour.
-