- Sep 01, 2023
-
-
Podchishchaeva, Mariya authored
Fixes https://github.com/llvm/llvm-project/issues/64987 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D159279
-
David Green authored
This adds some more extensive test coverage for frem through global isel, making sure that vector types are all scalarized and all fp16 become f32 libcalls.
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Younan Zhang authored
We're expecting a SubstitutionDiagnostic in diagnoseUnsatisfiedRequirement if the status of ExprRequirement is SubstFailure. Previously, the Requirement was created with Expr on SubstFailure by mistake, which could lead to the assertion failure in the subsequent diagnosis. Fixes https://github.com/clangd/clangd/issues/1726 Fixes https://github.com/llvm/llvm-project/issues/64723 Fixes https://github.com/llvm/llvm-project/issues/64172 In addition, this patch also fixes an invalid test from D129499. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D158061
-
Elvina Yakubova authored
Since the issue with trap value is fixed in D158191, it now should pass on both platforms. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D158899
-
David Spickett authored
Fixes #65157 07c215e8 added some extra logging which compiles ok with clang but not msvc. Use LLVM_PRETTY_FUNCTION to fix that. Fix suggested by Carlos Alberto Enciso.
-
Job Noorman authored
As discussed in D159266, for some instructions it's impossible to know statically if they will load/store (e.g., predicated instructions). Therefore, mayLoad/mayStore are more appropriate names.
-
Job Noorman authored
`MCInstrDesc` provides the `mayLoad` and `mayStore` flags that seem appropriate to use as a target-independent way to implement `isLoad` and `isStore`. I believe this is currently good enough to use for the RISC-V target as well. I've provided a test for this that checks the generated dyno stats (which seems to be the only thing both `isLoad` and `isStore` are used for). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D159266
-
Ingo Müller authored
This reverts a feature introduced in commit 2a5d4974. The goal of that commit was to allow `StringAttr`s to by used transparently wherever Python `str`s are expected. But, as the tests in https://reviews.llvm.org/D159182 reveal, pybind11 doesn't do this conversion based on `__str__` automatically, unlike for the other types introduced in the commit above. At the same time, changing `__str__` breaks the symmetry with other attributes of `print(attr)` printing the assembly of the attribute, so the change probably has more disadvantages than advantages. Reviewed By: springerm, rkayaith Differential Revision: https://reviews.llvm.org/D159255
-
Noah Goldstein authored
Bug was introduced in: https://reviews.llvm.org/D157807 The prior logic assumed that the information from the knownbits returned from analyzing the `icmp` and its operands in the context basicblock would be consistent. This is not necessarily the case if we are analyzing deadcode. For example with `(icmp sgt (select cond, 0, 1), -1)`. If we take knownbits for the `select` using knownbits from the operator, we will know the signbit is zero. If we are analyzing a not-taken from based on the `icmp` (deadcode), we will also "know" that the `select` must be negative (signbit is one). This will result in a conflict in knownbits. The fix is to just give up on analying the phi-node if its deadcode. We 1) don't want to waste time continuing to analyze it and 2) will be removing it (and its dependencies) later. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D158960
-
Adrian Kuegel authored
Prefer to use empty() instead of checking size().
-
Fangrui Song authored
This patch amends D151590 to not error for unlaimed TargetSpecific options for `-x assembler` input files. This input type causes Driver to construct tools::ClangAs (-fintegrated-as) or other assemblers (e.g. tools::gnutools::Assembler) Their ConstructJobs methods, unlike Clang::ConstructJobs, claim very few options. If an option is unclaimed, it either leads to a -Wunused-command-line-argument warning or an error (if `TargetSpecific` is set): ``` % clang '-###' --target=aarch64 -mbranch-protection=bti -c a.s clang: error: unsupported option '-mbranch-protection=' for target 'aarch64' ``` It seems that downgrading the diagnostic to warning is most useful as many users use CFLAGS even for `.s` files: ``` clang --target=aarch64 -mbranch-protection=bti -S a.c clang --target=aarch64 -mbranch-protection=bti -c a.s ``` I decide not to suppress the warning so that -Wunused-command-line-argument lovers still get a warning, and help projects use proper ASFLAGS/CFLAGS/etc. Note: `-mbranch-protection=bti a.S` currently has no warning as `-x assembler-with-cpp` instructs clangDriver to select tools::Clang and claim most options. Revert D159010 to demonstrate that we emit a warning for -mfpmath= for `-x assembler` input. Modify my AIX cleanup cd18efb6 to add an err_drv_unsupported_opt_for_target. Reviewed By: thesamesam Differential Revision: https://reviews.llvm.org/D159173
-
Venkata Ramanaiah Nalamothu authored
Reviewed By: DavidSpickett, MaskRay Differential Revision: https://reviews.llvm.org/D158971
-
Chen Zheng authored
Reviewed By: qiucf Differential Revision: https://reviews.llvm.org/D159052
-
Cullen Rhodes authored
This was introduced before the Optional directive and uses Variadic, but it's really optional. Reviewed By: nicolasvasilache, benmxwl-arm, dcaballe Differential Revision: https://reviews.llvm.org/D159259
-
Amara Emerson authored
Now that in an earlier commit we adopt the heuristics for SDAG's expansion of 32/64b fpimms to either GPR materializations or CP load, we can also improve the localizer to also understand the same heuristics. This avoids localizing expensive immediates as that increases code size. The combination of these two changes results in minor improvements in CTMark -Os, and bigger improvements in some other cases.
-
Amara Emerson authored
This just mimics what the SDAG backend does.
-
Konstantin Varlamov authored
This is to prevent a GCC warning ( https://github.com/llvm/llvm-project/issues/65132). It looks like `__at_first` is always assigned before it's used, but all other member variables of this struct are initialized in the constructor, so there is no reason not to initialize `__at_first` as well. Differential Revision: https://reviews.llvm.org/D159249
-
Vitaly Buka authored
Usually pointer tag will match tag in the shadow, so we can keep inlining this check keeping the rest in outlined part. It imroves performance by about 25%, but increases code size by 30%. Existing outlining reduces performance by 30%, but saves code size by 80%. So we still significantly reduce code size with minimal performance loss. Reviewed By: fmayer Differential Revision: https://reviews.llvm.org/D159172
-
Jonas Devlieghere authored
The disassembler prints to the formatted_raw_ostream passed to createAsmStreamer. The Out stream argument is unused.
-
Craig Topper authored
If the high and low 32 bits are the same, we try to use (ADD X, (SLLI X, 32)) but that only works if bit 31 is clear since the low 32 bits will be sign extended. If we have Zba we can use add.uw to zero the sign extended bits. Reviewed By: reames, wangpc Differential Revision: https://reviews.llvm.org/D159253
-
Wael Yehia authored
because matrix intrinsics lowering happens at link time in ThinLTO. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D153583
-
wangpc authored
We don't have pseudos with this postfix anymore. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D159269
-
Jim Lin authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
A direct call to a function casted to a different type is still not really an address taken event. We allow the user to opt out of these now. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D159149
-
Craig Topper authored
Use StPat instead.
-
Arthur Eubanks authored
To simplify D150297. We should be looking at OpFlags more. Relanding after fix in https://reviews.llvm.org/D159297, hopefully now this is actually NFC. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D157907
-
Shilei Tian authored
In `__kmp_get_global_thread_id`, if the gtid mode is 1, after getting the gtid from TLS, it will store the gtid value to the thread stack maintained in the thread descriptor. However, `__kmp_get_global_thread_id` can be called when the library is destructed, after the corresponding thread info has been release. This will cause a segment fault. This can happen on an Intel-based Mac. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D159324
-
Heejin Ahn authored
There was no space in `((void *)0)` before D158709. This can cause downstream warnings in case other libraries define `NULL` as `((void*)0)`, which is the case for [[ https://www.musl-libc.org/ | musl ]]. (see `NULL` definition in https://git.musl-libc.org/cgit/musl/tree/include/stdio.h) When a macro is redefined, if the content is the same it is fine, but if it is different even in terms of a single space, clang warns: ``` ../musl/include/stdio.h:37:9: error: 'NULL' macro redefined [-Werror,-Wmacro-redefined] 37 | #define NULL ((void*)0) | ^ ``` The old code didn't have the space and it had been fine for many years, so I think there's no risk in removing it. The linter seems to prefer the space in there, but I think it has a risk of causing warnings or even errors for downstream users. Reviewed By: iana Differential Revision: https://reviews.llvm.org/D159312
-
Francis Visoiu Mistrih authored
For vector * scalar + vector, we emit `fmuladd` directly from clang. This enables it also for matrix * scalar + matrix. rdar://113967122 Differential Revision: https://reviews.llvm.org/D158883
-
dingfei authored
Add import of type-related nodes: - bitIntType - constantMatrixType - dependentAddressSpaceType - dependentBitIntType - dependentSizedMatrixType - dependentVectorType - objcTypeParamDecl - objcTypeParamType - pipeType - vectorType Reviewed By: balazske Differential Revision: https://reviews.llvm.org/D158948
-
Artem Dergachev authored
It started to fail in a flaky manner a few days ago on GreenDragon buildbots (i.e. x86_64-darwin). I didn't track down the root cause but LSan isn't actually supported on darwin anyway, so UNSUPPORTED seems appropriate. Prior art: 3ff080b5.
-
Mircea Trofin authored
Also removed them from the header. They are there for test-only. This simplifies further refactoring (as well as code comprehension) Differential Revision: https://reviews.llvm.org/D159308
-
wlei authored
Address feedback in https://reviews.llvm.org/D158817. Since `extractProbe` can be used for both calliste and BB probe, we can leverage this to unify the callsite handling code. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D159169
-
Matt Arsenault authored
Technically increases the number of instructions if the result isn't cast back to float. Even in this case it's still probably a better canonical form since it enables FP value tracking. https://reviews.llvm.org/D151939
-
Matt Arsenault authored
In the past we sort of pretended float might be implementable as a non-IEEE type but that never realistically would work. Exotic FP types would need to be added to the IR. Turning these into FP operations enables FP tracking optimizations. https://reviews.llvm.org/D151937
-
Matt Arsenault authored
This is a resurrection of D18874. This was previously wrong with fneg conflated with fsub, but we now have a proper fneg instruction. Additionally, I think it is now clearer that IR float=IEEE float, and a different bit layout would require adding a different IR type. https://reviews.llvm.org/D151934
-
Matt Arsenault authored
-