- May 06, 2024
-
-
Chen Zheng authored
This reverts commit 28869a70.
-
Michael Flanders authored
Adds more FP test macros for the upcoming test adds for #61092 and the issues opened from it: #88768, #88769, #88770, #88771, #88772. Fix bug in `{EXPECT,ASSERT}_FP_EXCEPTION`. `EXPECT_FP_EXCEPTION(0)` seems to be used to test that an exception did not happen, but it always does `EXPECT_GE(... & 0, 0)` which never fails. Update and refactor tests that break after the above bug fix. An interesting way things broke after the above change is that `ForceRoundingMode` and `quick_get_round()` were raising the inexact exception, breaking a lot of the `atan*` tests. The changes for all files other than `FPMatcher.h` and `libc/test/src/math/smoke/RoundToIntegerTest.h` should have the same semantics as before. For `RoundToIntegerTest.h`, lines 56-58 before the changes do not always hold since this test is used for functions with different exception and errno behavior like `lrint` and `lround`. I've deleted those lines for now, but tests for those cases should be added for the different nearest int functions to account for this. Adding @nickdesaulniers for review. -
Danny Mösch authored
Fixes #90285.
-
martinboehme authored
This relands #90348 with a fix for a [buildbot failure](https://lab.llvm.org/buildbot/#/builders/216/builds/38446) caused by the test being run with `-fno-rtti`.
-
Florian Hahn authored
Pre-commit tests for an upcoming patch.
-
Chris authored
An `emitc.expression` can only yield a single result, but some operations which have the `CExpression` trait can have multiple results, which can result in a crash when applying the `fold-expressions` pass. This change adds a check for the single-result condition and a simple test.
-
Yuanqiang Liu authored
-
Florian Hahn authored
-
Michael Kruse authored
Plugins are not loaded without the -cc1 phase. Do not report them when running on an assembly file or when linking. Many build tools add these options to all driver invocations, including LLVM's build system. Fixes #88173
-
Leandro Lupori authored
Fixes https://github.com/llvm/llvm-project/issues/78936
-
Leandro Lupori authored
Handle implicit firstprivate DSAs on task generating constructs. Fixes https://github.com/llvm/llvm-project/issues/64480
-
Jie Fu authored
llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:3582:13: error: unused function 'isBlendOrUndef' [-Werror,-Wunused-function] static bool isBlendOrUndef(ArrayRef<int> Mask) { ^ 1 error generated. -
Jie Fu authored
llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:40081:21: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] for (int I = 0; I != NumElts; ++I) { ~ ^ ~~~~~~~ 1 error generated. -
Xing Xue authored
The destructors generated by the legacy IBM `xlclang++` compiler can take 1 or 2 arguments and the differences were handled by type `cast` where it is needed. Clang now treats the `cast` here as an error after https://github.com/llvm/llvm-project/commit/999d4f840777bf8de26d45947192aa0728edc0fb landed with `-Xextra -Werror`. The issue had been worked around by using `#pragma GCC diagnostic push/pop`. This patch defines 2 separate destructor types for 1 argument and 2 arguments respectively so `cast` is not needed.
-
Hans Wennborg authored
Followup to #89727
-
Simon Pilgrim authored
If we don't demand the same element from both single source shuffles (permutes), then attempt to blend the sources together first and then perform a merged permute. For vXi16 blends we have to be careful as these are much more likely to involve byte/word vector shuffles that will result in the creation of additional shuffle instructions. This fold might be worth it for VSELECT with constant masks on AVX512 targets, but I haven't investigated this yet, but I've tried to write combineBlendOfPermutes so to be prepared for this. The PR34592 -O0 regression is an unfortunate failure to cleanup with a later pass that calls SimplifyDemandedElts like the -O3 does - I'm not sure how worried we should be tbh.
-
Ulrich Weigand authored
Change definition of expandBitCastI128ToF128 and expandBitCastF128ToI128 to allow for simplified use in atomic load/store. Update logic to split 128-bit loads and stores in DAGCombine to also handle the f128 case where appropriate. This fixes the regressions introduced by recent atomic load/store patches.
-
Simon Pilgrim authored
Noticed while investigating GFNI per-element vector shifts (we can form SHL but not SRL/SRA) Alive2: https://alive2.llvm.org/ce/z/fSH-rf
-
WANG Rui authored
-
Timm Bäder authored
-
WANG Rui authored
-
hev authored
Referring to RISC-V, adding an MI level pass to optimize *W instructions for LoongArch. First it removes unneeded sext(addi.w rd, rs, 0) instructions. Either because the sign extended bits aren't consumed or because the input was already sign extended by an earlier instruction. Then: 1. Unless explicit disabled or the target prefers instructions with W suffix, it removes the -w suffix from opw instructions whenever all users are dependent only on the lower word of the result of the instruction. The cases handled are: * addi.w because it helps reduce test differences between LA32 and LA64 w/o being a pessimization. 2. Or if explicit enabled or the target prefers instructions with W suffix, it adds the W suffix to the instruction whenever all users are dependent only on the lower word of the result of the instruction. The cases handled are: * add.d/addi.d/sub.d/mul.d. * slli.d with imm < 32. * ld.d/ld.wu.
-
Timm Bäder authored
We need to use InitField here, not SetField.
-
Sameer Sahasrabuddhe authored
This is really a workaround to allow control flow lowering in the presence of convergence control tokens. Control-flow intrinsics in LLVM IR are convergent because they indirectly represent the wave CFG, i.e., sets of threads that are "converged" or "execute in lock-step". But they exist during a small window in the lowering process, inserted after the structurizer and then translated to equivalent MIR pseudos. So rather than create convergence tokens for these builtins, we simply mark them as not convergent. The corresponding MIR pseudos are marked as having side effects, which is sufficient to prevent optimizations without having to mark them as convergent.
-
Yingwei Zheng authored
Proof: https://alive2.llvm.org/ce/z/iRnJ4i Fixes https://github.com/llvm/llvm-project/issues/91127.
-
Pavel Labath authored
lldb already mostly(*) tracks this information. This just makes it available to the SB users. (*) It does not do that for typedefs right now see llvm.org/pr90958
-
Matt Arsenault authored
This reverts commit a415b4df. Modify the instruction in place to transform it into a REG_SEQUENCE, which is what other implementations of foldImmediate do. Also start erasing the def instruction if there are no other uses. Fixes #91110.
-
Jay Foad authored
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Mehdi Amini authored
Reverts llvm/llvm-project#90546 This broke some bots, seems like some toolchain don’t consider the implicit move here.
-
Serge Pavlov authored
Previously treatment of the attribute `optnone` was modified in https://github.com/llvm/llvm-project/pull/85605 ([clang] Set correct FPOptions if attribute 'optnone' presents). As a side effect FPContract was disabled for optnone. It created unneeded divergence with the behavior of -O0, which enables this optimization. In the discussion https://github.com/llvm/llvm-project/pull/85605#issuecomment-2089350379 it was pointed out that FP contraction should be enabled even if all optimizations are turned off, otherwise results of calculations would be different. This change enables FPContract at optnone.
-
Matt Arsenault authored
Revert "Revert 4 last AMDGPU commits to unbreak Windows bots" This reverts commit 0d493ed2. MSVC does not like constexpr on the definition after an extern declaration of a global.
-
xiaoleis-nv authored
This pull request removes unnecessary move in the return statement to suppress compilation warnings. Co-authored-by:Xiaolei Shi <xiaoleis@nvidia.com>
-
Luke Lau authored
All GPR registers will still be virtual at this stage, so update the test to reflect that.
-
martinboehme authored
The existing code was full of comments about how we assume this is always the case, but it's not mandated by the standard, and there is code out there that returns a different type. So check that the result type is in fact the same as the destination type before attempting to copy to the result. To make sure that we don't bail out in more cases than intended, I've extended existing tests to verify that in the common case, we do return the destination object (by reference or value, as the case may be).
-
Yeting Kuo authored
Previously `.option arch` denied extenions are not belongs to RISC-V features. But experimental features have experimental- prefix, so `.option arch` can not serve for experimental extension. This patch uses the features of extensions to identify extension existance.
-
Chuanqi Xu authored
This relands 6c311046. The patch was reverted due to incorrectly introduced alignment. And the patch was re-commited after fixing the alignment issue. Following off are the original message: This is part of "no transitive change" patch series, "no transitive source location change". I talked this with @Bigcheese in the tokyo's WG21 meeting. The idea comes from @jyknight posted on LLVM discourse. That for: ``` // A.cppm export module A; ... // B.cppm export module B; import A; ... //--- C.cppm export module C; import C; ``` Almost every time A.cppm changes, we need to recompile `B`. Due to we think the source location is significant to the semantics. But it may be good if we can avoid recompiling `C` if the change from `A` wouldn't change the BMI of B. This patch only cares source locations. So let's focus on source location's example. We can see the full example from the attached test. ``` //--- A.cppm export module A; export templa...
-
Luke Lau authored
-
Owen Pan authored
Fixes #90966.
-