- Aug 09, 2021
-
-
Craig Topper authored
This enables the fneg and fabs combines we have for FMV_X_ANYEXTW_RV64.
-
Craig Topper authored
This should be testing the custom ISD nodes we use for passing half values in GPRs. We should optimize these to integer operations, but we currently don't.
-
Craig Topper authored
Previously we converted ISD condition codes to integers and stored them directly in our MIR instructions. The ISD enum kind of belongs to SelectionDAG so that seems like incorrect layering. This patch instead uses a CondCode node on RISCV::SELECT_CC until isel and then converts it from ISD encoding to a RISCV specific value. This value can be converted to/from the RISCV branch opcodes in the RISCV namespace. My larger motivation is to possibly support a microarchitectural feature of some CPUs where a short forward branch over a single instruction can be predicated internally. This will require a new pseudo instruction for select that needs to carry a branch condition and live probably until RISCVExpandPseudos. At that point it can be expanded to control flow without other instructions ending up in the predicated basic block. Using an ISD encoding in RISCVExpandPseudos doesn't seem like correct layering. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D107400
-
Craig Topper authored
This is the data to be stored so it should be an input. To keep operand order similar between loads and stores, move the temp register to the first dest operand of floating point loads. Rework the assembler code accordingly. This doesn't have any functional effect because this Pseudo is only used by the assembler which doesn't use ins/outs. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D107309
-
Min-Yih Hsu authored
Update disassembler test case to reflect the changes on ADD/ADDA instruction separation.
-
Sam McCall authored
This allows vscode to find it as a diagnostic quickfix for -Wswitch. While here, group the code into chunks and add a couple more comments.
-
- Aug 08, 2021
-
-
Kazu Hirata authored
The last use was removed on Dec 21, 2018 in commit c3f30a7f.
-
Dimitry Andric authored
On FreeBSD, the `environ` symbol is undefined at link time for shared libraries, but resolved by the dynamic linker at runtime. Therefore, allow the symbol to be undefined when creating a shared library, by using the `--allow-shlib-undefined` linker flag, instead of `-z defs` (a.k.a `--no-undefined`). Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D107698
-
Dimitry Andric authored
Instead, include `<cstdlib>` which is the canonical header containing the declaration of `alloca()`. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D107699
-
Dorit Nuzman authored
Teach LV to use masked-store to support interleave-store-group with gaps (instead of scatters/scalarization). The symmetric case of using masked-load to support interleaved-load-group with gaps was introduced a while ago, by https://reviews.llvm.org/D53668; This patch completes the store-scenario leftover from D53668, and solves PR50566. Reviewed by: Ayal Zaks Differential Revision: https://reviews.llvm.org/D104750
-
Min-Yih Hsu authored
Previously ADD & ADDA (as well as SUB & SUBA) instructions are mixed together, which not only violated Motorola assembly's syntax but also made asm parsing more difficult. This patch separates these two kinds of instructions migrate rest of the tests from test/CodeGen/M68k/Encoding/Arithmetic to test/MC/M68k/Arithmetic. Note that we observed minor regressions on codegen quality: Sometimes isel uses ADD instead of ADDA even the latter can lead to shorter sequence of code. This issue implies that some isel patterns might need to be updated.
-
Min-Yih Hsu authored
Change `-elf-output-style` to `--elf-output-style` to reflect the recent changes on short/long CLI options in LLVM binary utils.
-
Craig Topper authored
-
Craig Topper authored
The fcvt fp to integer instructions saturate if their input is infinity or out of range, but the instructions produce a maximum integer for nan instead of 0 required for the ISD opcodes. This means we can use the instructions to do the saturating conversion, but we'll need to fix up the nan case at the end. We can probably improve the i8 and i16 default codegen as well, but I'll leave that for a follow up. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D107230
-
Jonas Devlieghere authored
Move Objective-C constants into ObjCConstants.h and share them between Cocoa and AppleObjCTypeEncodingParser. Differential revision: https://reviews.llvm.org/D107679
-
Nikita Popov authored
The MemorySSA-based implementation has been enabled for a few months (since D94376). This patch drops the old MDA-based implementation entirely. I've kept this to only the basic cleanup of dropping various conditions -- the code could be further cleaned up now that there is only one implementation. Differential Revision: https://reviews.llvm.org/D102113
-
Rainer Orth authored
Linking `libclang.so` is currently broken on Solaris: ld: fatal: option --version-script requires option -z gnu-version-script-compat to be specified While Solaris `ld` supports a considerable subset of `--version-script`, there are some elements of the syntax that aren't. The fix is equivalent to D78510 <https://reviews.llvm.org/D78510>. Additionally, use of C-style comments is a GNU extension that can easily be avoided by using `#` as comment character, which is supported by GNU `ld`, `gold`, and `lld`. Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D107559
-
Krishna authored
In this patch, the "nnan" requirement is removed for the canonicalization of select with fcmp to fabs. (i) FSub logic: Remove check for nnan flag presence in fsub. Example: https://alive2.llvm.org/ce/z/751svg (fsub). (ii) FNeg logic: Remove check for the presence of nnan and nsz flag in fneg. Example: https://alive2.llvm.org/ce/z/a_fsdp (fneg). Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D106872
-
Ye Luo authored
OpenMP specification Tasking Terminology target task :A mergeable and untied task that ... Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D107686
-
- Aug 07, 2021
-
-
Craig Topper authored
-
Craig Topper authored
The IR for pmuldq/pmuludq intrinsics uses a sext_inreg/zext_inreg pattern on the inputs. Ideally we pattern match these away during isel. It is possible for LICM or other middle end optimizations to separate the extend from the mul. This prevents SelectionDAG from removing it or depending on how the extend is lowered, we may not be able to generate an AssertSExt/AssertZExt in the mul basic block. This will prevent pmuldq/pmuludq from being formed at all. This patch teaches shouldSinkOperands to recognize this so that CodeGenPrepare will clone the extend into the same basic block as the mul. Fixes PR51371. Differential Revision: https://reviews.llvm.org/D107689
-
Craig Topper authored
-
Kazu Hirata authored
The corresponding function definition was removed on Apr 23, 2016 in commit a59d3e5a.
-
Roman Lebedev authored
Instead of expanding it ourselves, we can just forward to `?ext(vector_reduce_add(<n x i1>))`, as per alive2: https://alive2.llvm.org/ce/z/ymz7zE (self) https://alive2.llvm.org/ce/z/eKu2v2 (skipped zext) https://alive2.llvm.org/ce/z/c3BXgc (skipped sext)
-
Roman Lebedev authored
Now that we canonicalize low bit splatting to the form we were emitting here ourselves, emit simpler IR that will be canonicalized later. See 1e801439 for proofs: https://alive2.llvm.org/ce/z/MjCm5W (self) https://alive2.llvm.org/ce/z/kgqF4M (skipped zext) https://alive2.llvm.org/ce/z/pgy3HP (skipped sext)
-
Roman Lebedev authored
Both patterns are equivalent (https://alive2.llvm.org/ce/z/jfCViF), so we should have a preference. It seems like mask+negation is better than two shifts.
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Christudasan Devadasan authored
Allow the folding even if there is an intervening bitcast. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D106667
-
Florian Hahn authored
After refactoring the phi recipes, we can now iterate over all header phis in a VPlan to detect reductions when it comes to fixing them up when tail folding. This reduces the coupling with the cost model & legal by using the information directly available in VPlan. It also removes a call to getOrAddVPValue, which references the original IR value which may become outdated after VPlan transformations. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D100102
-
Andrea Di Biagio authored
This is related to PR51392. Before this patch, the timeline view was rounding doubles to the first decimal, using a logic similar to this: ``` double AverageTime = (double)Input / CumulativeExecutions; double Result = floor((AverageTime * 10) + 0.5) / 10 ``` Here, Input and CumulativeExecutions are both unsigned integers. The last operation is what effectively performs the rounding of AverageTime. PR51392 has been raised because - under specific -m32 configurations of GCC - one of the timeline tests reports slighlty different values (due to a different rounding choice). This patch tries to minimise the propagation of floating-point error by hoisting the multiply by 10, so that it is performed on the unsigned. ``` double AverageTime = (double)(Input * 10) / CumulativeExecutions; floor(AverageTime + 0.5) / 10 ``` So we are trading a floating point multiply for a integer multiply (which can be expanded using a simple MUL or using an `ADD + LEA` sequence). This decrease in floating point operations executed should also help with decreasing the error in the computation.. Strictly speaking, that computation will always be potentially subject to error (depending on what values are passed in input). However, this patch should improve the situation and make bug like PR51392 less frequent.
-
Simon Atanasyan authored
-
Simon Atanasyan authored
This patch enables compressed input sections on big-endian targets by checking the target endianness and selecting an appropriate `Chdr` structure. Fixes PR51369 Differential Revision: https://reviews.llvm.org/D107635
-
Amara Emerson authored
We should use MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval() instead of eraseFromParent(). We should probably use that in other places too but fix this issue which affects clang bootstrap builds for now.
-
Roger Ferrer Ibanez authored
We were using an OpaqueValueExpr allocated on the stack to store the size of a VLA. Because the VLASizeMap in CodegenFunction uses the address of the expression to avoid recomputing VLAs, we were accidentally reusing an earlier llvm::Value. This led to invalid LLVM IR. This is a temporary solution until VLASizeMap can be pushed and popped based on the context. Differential Revision: https://reviews.llvm.org/D107666
-
Nemanja Ivanovic authored
This commit adds the isnan intrinsic and provides a default expansion for it in the SDAG. However, it makes the assumption that types it operates on are IEEE-compliant types. This is not always the case. An example of that is PPC "double double" which has a representation that - Does not need to conform to IEEE requirements for isnan as it is not an IEEE-compliant type - Does not have a representation that allows for straightforward reinterpreting as an integer and use of integer operations The result was that this commit broke __builtin_isnan for ppc_fp128 making many valid numeric values report a NaN. This patch simply changes the expansion to always expand to unordered comparison (regardless of whether FP exceptions are tracked). This is inline with previous semantics.
-
Matt Jacobson authored
Reviewed by: benshi001 Differential Revision: https://reviews.llvm.org/D107672
-
Roland McGrath authored
The _zx_vmar_root_self function is not a system call but a libc function declared in a separate header. Reviewed By: gulfem Differential Revision: https://reviews.llvm.org/D107616
-
Jonas Devlieghere authored
Upstream support for NSConstantArray, NSConstantIntegerNumber, NSConstant{Float,Double}Number and NSConstantDictionary. We would've upstreamed this earlier but testing it requires -fno-constant-nsnumber-literals, -fno-constant-nsarray-literals and -fno-constant-nsdictionary-literals which haven't been upstreamed yet. As a temporary workaround use the system compiler (xcrun clang) for the constant variant of the tests. I'm just upstreaming this. The patch and the tests were all authored by Fred Riss. Differential revision: https://reviews.llvm.org/D107660 -
Sterling Augustine authored
This reverts commit 34d78b6a. This breaks build bots witha missing file: /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/Language/ObjC/Cocoa.cpp:10:10: fatal error: 'objc/runtime.h' file not found
-