- Oct 12, 2022
-
-
Mehdi Amini authored
-
Jessica Paquette authored
This matches patterns of the form ``` (X op Y) == X ``` And transforms them to ``` Y == 0 ``` where appropriate. Example: https://godbolt.org/z/hfW811c7W Differential Revision: https://reviews.llvm.org/D135380
-
Philip Reames authored
The previous code used a APInt(1, 0) to represent the demanded elts of a scalable vector, and then ignored that argument if type was scalable. This was inconsistent with the UndefElts parameter which is set to either APInt(1, 0) or APInt(1,1) - that is, implicitly broadcast across all lanes. Particularly since the undef code relied on the DemandedElts parameter having bitwidth 1 to achieve that result! This change switches the demanded parameter to APInt(1,1), documents the broadcast semantics, and takes advantage of it to remove one special case for scalable vectors which is no longer required.
-
Xiang Li authored
A new EnumArgument ResourceKind is added for HLSLResourceAttr. This will be use to get resource kind instead of parse it from the type name. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D135335
-
- Oct 11, 2022
-
-
Slava Zakharin authored
Differential Revision: https://reviews.llvm.org/D135684
-
Alex Zinenko authored
-
Joe Nash authored
Make support more generic to support future instructions. Currently NFC. Reviewed By: foad, arsenm Differential Revision: https://reviews.llvm.org/D135678
-
Krzysztof Parzyszek authored
-
Nico Weber authored
Ran: git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format -
Pierre van Houtryve authored
Simply folds away bitcasts that cancel each other. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D135146
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D133638
-
Nikita Popov authored
-
Nico Weber authored
-
Philip Reames authored
Update comment, and add an assertion to check property expected by sole (non-test) caller. Remove tests which appear to have been copied from fixed vector tests, and whose demanded bits don't correspond to the way this interface is otherwise used.
-
Florian Hahn authored
LoopRotation may also fold basic blocks, so cached block dispositions also need to be dropped. Fixes #58291.
-
Nico Weber authored
-
Luke Drummond authored
`getFunctionParamOptimizedAlign` was being passed a null function argument when getting the callee of a bitcasted function symbol. This is because `CallBase::getCalledFunction` does not look through bitcasts. There is already code to handle this case in `NVPTXTargetLowering::getArgumentAlignment`, which is now hoisted into an NVPTX util. The alignment computation now gracefully handles computing alignment of virtual functions with a check for null.
-
David Spickett authored
Most of the paths to this never passed nullptr intentionally. Those that possibly could have were assuming it was not null elsehwere, so would have crashed. I've added asserts in those cases. At least one case was relying on GetAsMemoryData to return an error when it was given nullptr. So I've hoisted that error setting code out into the caller. Depends on D134963 Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D134965
-
Sanjay Patel authored
((Op1 * X) / Y) / Op1 --> X / Y https://alive2.llvm.org/ce/z/JYxWjA InstSimplify handles the more basic mul+div pattern with shared operand, but we don't seem to have any reassociation folds to handle cases where the common op is further away. This is a generalization of 9cff4711 and another transform derived from issue #58137.
-
Sanjay Patel authored
-
Adrian Kuegel authored
-
Anush Elangovan authored
This is another attempt at https://reviews.llvm.org/D110489. When build IREE we run into cases where we don't have / need LLVM_VERSION_* etc set. Compilation fails if it isn't an integer. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D135650
-
David Spickett authored
WriteRegister and WriteRegisterUnsigned were never pased nullptr, and only one of them appeared to handle it. Switch to ref to make the intent clear. Depends on D134962 Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D134963
-
Tobias Gysi authored
The revision adds a mapValue function to the Importer, which can be used in the MLIR builders to provide controlled accesses to the result mapping of the imported instructions. Additionally, the change allows us to avoid accessing a private member variable of the Importer class, which simplifies future refactorings that aim at factoring out a conversion interface (similar to the MLIR to LLVM translation). The revision also renames the variables used when emitting the MLIR builders to prepare the generalization to non-intrinsic instructions. In particular, it renames callInst to inst and it passes in the instruction arguments using an llvmOperands array rather than accessing the call arguments directly. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D135645
-
Nikita Popov authored
Instead of a flat list that includes the argument index, use a nested vector, where each inner vector is the attribute set for a single argument. This is more obvious and makes followup changes simpler.
-
Kai Stierand authored
Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D135555
-
Arthur O'Dwyer authored
This patch is the rebase and squash of three earlier patches. It supersedes all three of them. - D47111: experimental monotonic_buffer_resource. - D47358: experimental pool resources. - D47360: Copy std::experimental::pmr to std::pmr. The significant difference between this patch and the-sum-of-those-three is that this patch does not add `std::experimental::pmr::monotonic_buffer_resource` and so on. This patch simply adds the C++17 standard facilities, and leaves the `std::experimental` namespace entirely alone. Differential Revision: https://reviews.llvm.org/D89057
-
wanglei authored
Differential Revision: https://reviews.llvm.org/D135526
-
Max Kazantsev authored
Just to make the code more structured and easier to understand.
-
Max Kazantsev authored
-
Max Kazantsev authored
-
David Truby authored
This patch adds a cpowi function to the flang runtime, and switches to using that function instead of pgmath for complex number to integer power operations. Differential Revision: https://reviews.llvm.org/D134889
-
David Spickett authored
ReadRegister and ReadRegisterAsUnsigned are always passed valid pointers, so the parameter should be a ref to make the intent clear. Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D134962
-
Simon Tatham authored
pipeliner-preserve-ties.mir demonstrates a current bug in which the output of the Modulo Software Pipelining pass has left off a tie between operands in the conditional `t2ADDri` instruction. It should look like this: %19:rgpr = t2ADDri %1, 1, 1 /* CC::ne */, $cpsr, $noreg, implicit %1(tied-def 0) in which the final input operand is tied to the output, because that's the input that will become the output value if the conditionalized add instruction does not execute, and hence, must necessarily be whatever was in the output register beforehand. In the input to the pipeliner, those `tied-def` specifications are present and correct. But when the pipeliner clones MachineInstrs, it loses them. pipeliner-inlineasm.mir does not demonstrate any bug: the output is already correct, because of compensation code in the machine pipeliner that applies only to INLINEASM instructions. But no test previously exercised that code, so I add one now before making changes in that area. -
Alex Zinenko authored
Many tests wrap the piece of the IR related to the transform dialect into `transform.with_pdl_patterns` without actually using PDL patterns inside. Some of these are leftovers from migration to `structured.match` and some others are cargo cult, both are useless and pollute the tests. Reviewed By: guraypp Differential Revision: https://reviews.llvm.org/D135661
-
Weining Lu authored
Reference: https://gcc.gnu.org/onlinedocs/gccint/Machine-Constraints.html k: A memory operand whose address is formed by a base register and (optionally scaled) index register. m: A memory operand whose address is formed by a base register and offset that is suitable for use in instructions with the same addressing mode as st.w and ld.w. ZB: An address that is held in a general-purpose register. The offset is zero. ZC: A memory operand whose address is formed by a base register and offset that is suitable for use in instructions with the same addressing mode as ll.w and sc.w. Note: The INLINEASM SDNode flags in below tests are updated because the new introduced enum `Constraint_k` is added before `Constraint_m`. llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-inline-asm.ll llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-inline-asm.ll llvm/test/CodeGen/X86/callbr-asm-kill.mir This patch passes `ninja check-all` on a X86 machine with all official targets and the LoongArch target enabled. Differential Revision: https://reviews.llvm.org/D134638
-
Dmitry Preobrazhensky authored
Correct encoding of image_gather4h for GFX9; disable this instruction for SI, CI and VI. Differential Revision: https://reviews.llvm.org/D135605
-
Martin Storsjö authored
These are harmless for the unwinder - the unwinder doesn't need to handle them for being able to unwind correctly. Only add the opcodes when the branch target is in a SEH prologue; for jumptables e.g. within a function, we shouldn't add any SEH opcodes. Differential Revision: https://reviews.llvm.org/D135277
-
Martin Storsjö authored
This got documented upstream in https://github.com/MicrosoftDocs/cpp-docs/pull/4202. Differential Revision: https://reviews.llvm.org/D135275
-
Weining Lu authored
This reverts commit 6547565e. This breaks test: Preprocessor/init-loongarch.c
-