- Oct 20, 2023
-
-
Tobias Stadler authored
Eliding the vReg to NZCV conversion instruction for G_UADDE/... is illegal if it causes the carry generating instruction to become dead because ISel will just remove the dead instruction. I accidentally introduced this here: https://reviews.llvm.org/D153164. As far as I can tell, this is not exposed on the default clang settings, because on O0 there is always a G_AND between boolean defs and uses, so the optimization doesn't apply. Thus, when I tried to commit https://reviews.llvm.org/D159140, which removes these G_ANDs on O0, I broke some UBSan tests. We fix this by recursively selecting the previous (NZCV-setting) instruction before continuing selection for the current instruction.
-
Stanislav Mekhanoshin authored
-
alfredfo authored
See-also: https://github.com/llvm/llvm-project/pull/69548
-
Florian Hahn authored
At the moment, all alloc-like functions are assumed to return non-null pointers, if their return value is only used in a compare. This is based on being allowed to substitute the allocation function with one that doesn't fail to allocate the required memory. aligned_alloc however must also return null if the required alignment cannot be satisfied, so I don't think the same reasoning as above can be applied to it. This patch adds a bail-out for aligned_alloc calls to isAllocSiteRemovable.
-
Haowei authored
This patch addresses the missed review comment from PR #67063. It renames LIT flag "--disable-gtest-sharding" to "--no-gtest-sharding" and corrects the code style issue.
-
Jonas Devlieghere authored
-
Arthur Eubanks authored
Otherwise you will likely get crashes.
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
bjacob authored
This function was returning failure when any of the intersection sets was empty, but this is actually legitimate in "matrix times vector" cases, where some of the operands have lower dimensionality, implying unit-dimension semantics for the "missing" dimensions. Example: ```mlir func.func @transpose_extend_batch_matmul( %vec: tensor<32x128xi16>, %mat: tensor<11008x32x128xi4>) -> tensor<11008x32xi32> { %c0_i32 = arith.constant 0 : i32 %cst_0 = arith.constant 0.000000e+00 : f32 %0 = tensor.empty() : tensor<11008x32xi32> %1 = linalg.fill ins(%c0_i32 : i32) outs(%0 : tensor<11008x32xi32>) -> tensor<11008x32xi32> %2 = tensor.empty() : tensor<11008xf32> %3 = linalg.fill ins(%cst_0 : f32) outs(%2 : tensor<11008xf32>) -> tensor<11008xf32> %batch_matmul_result = linalg.generic {indexing_maps = [affine_map<(d0, d1, d2) -> (d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1, d2)>, affine_map<(d0, d1, d2) -> (d0, d1)>], iterator_types = ["parallel", "parallel", "reduction"]} ins(%vec, %mat : tensor<32x128xi16>, tensor<11008x32x128xi4>) outs(%1 : tensor<11008x32xi32>) { ^bb0(%in: i16, %in_3: i4, %out: i32): %19 = arith.extsi %in : i16 to i32 %20 = arith.extui %in_3 : i4 to i32 %21 = arith.muli %19, %20 : i32 %22 = arith.addi %21, %out : i32 linalg.yield %22 : i32 } -> tensor<11008x32xi32> return %batch_matmul_result : tensor<11008x32xi32> } ``` Here, we were returning failure because `ac` is empty. With this PR, we return this useful information: ``` batch: [ 1 ] m: [ ] n: [ 0 ] k: [ 2 ] ``` -
Yaxun (Sam) Liu authored
Regression caused by e880e8ae Due to aux-target mismatch. Add -target option to fix aux-target. https://lab.llvm.org/buildbot/#/builders/230/builds/20138
-
Jonas Devlieghere authored
Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/
-
Alex Langford authored
In ef762e5e7292, I shifted around where errors were reported when failing to parse and/or validate DWARFUnitHeaders. When we are doing so in DWARFContext::fixupIndex, the actual error message isn't prefixed with `warning:` like it would be elsewhere (because of the way `logAllUnhandledErrors` is implemented).
-
Luke Lau authored
Previously we were just matching against a fixed list of VP intrinsics that we knew couldn't be speculated, but we can reuse the logic in isSafeToSpeculativelyExecuteWithOpcode. This also allows speculation in more cases, e.g. when the divisor is known to be non-zero. Unfortunately we can't reuse the exact same function call for VP intrinsics with functional intrinsics instead of opcodes, because isSafeToSpeculativelyExecute needs an instruction that already exists. So this just copies the logic by peeking into the function attributes of the intrinsic.
-
Caroline Concatto authored
As described in: https://github.com/ARM-software/acle/pull/257 Patch by: Kerry McLaughlin <kerry.mclaughlin@arm.com> Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D151461
-
Konstantin Zhuravlyov authored
- Be explicit about which program resource register is supported by which target - RSRC1 - FP16_OVFL is GFX9+ - WGP_MODE is GFX10+ - MEM_ORDERED is GFX10+ - FWD_PROGRESS is GFX10+ - RSRC3 - INST_PREF_SIZE is GFX11+ - TRAP_ON_START is GFX11+ - TRAP_ON_END is GFX11+ - IMAGE_OP is GFX11+ - Do not emit GFX11+ fields when disassembling GFX10 code objects - Tighten enforcement of reserved bits in disassembler --------- Co-authored-by:Konstantin Zhuravlyov <kzhuravl@amd.com>
-
Yinying Li authored
Updates: 1. Verification of block sparsity. 2. Verification of singleton level type can only follow compressed or loose_compressed levels. And all level types after singleton should be singleton. 3. Added getBlockSize function. 4. Added an invalid encoding test for an incorrect lvlToDim map that user provides.
-
Thurston Dang authored
stack-uas.c and stack-history-length.c both have -hwasan-record-stack-history=libcall, which makes the stack base tag fully randomized. They may therefore sometimes have a zero tag for a stack allocated variable, resulting in a false negative (https://github.com/llvm/llvm-project/issues/69221#issuecomment-1767322411). This patch applies the same workaround as used for deep-recursion.c (https://github.com/llvm/llvm-project/commit/aa4dfd3736dd1c2e0263eacd09bd613c5784ea73) and stack-uar.c (https://github.com/llvm/llvm-project/commit/ddf1de20a3f7db3bca1ef6ba7e6cbb90aac5fd2d): have two adjacent stack-allocated variables, and use whichever is not zero-tagged. These are the last remaining test cases that use -hwasan-record-stack-history=libcall. stack-uas flakiness spotted in the wild: https://lab.llvm.org/buildbot/#/builders/269/builds/549/steps/11/logs/stdio stack-history-length: https://lab.llvm.org/buildbot/#/builders/269/builds/537 Co-authored-by:
Thurston Dang <thurston@google.com>
-
Alexey Bataev authored
-
Caroline Concatto authored
As described in: https://github.com/ARM-software/acle/pull/257 Patch by: David Sherwood <david.sherwood@arm.com> Reviewed By: dtemirbulatov Differential Revision: https://reviews.llvm.org/D151439
-
Benjamin Maxwell authored
This is just a slight specialization of `TypesMatchWith` that returns success if an optional parameter is missing. There may be other places this could help e.g.: https://github.com/llvm/llvm-project/blob/eb21049b4b904b072679ece60e73c6b0dc0d1ebf/mlir/include/mlir/Dialect/X86Vector/X86Vector.td#L58-L59 ...but I'm leaving those to avoid some churn. This constraint will be handy for us in some later patches, it's a formalization of a short circuiting trick with the `comparator` of the `TypesMatchWith` constraint (devised for #69195). ``` TypesMatchWith< "padding type matches element type of result (if present)", "result", "padding", "::llvm::cast<VectorType>($_self).getElementType()", // This returns true if no padding is present, or it's present with a type that matches the element type of `result`. "!getPadding() || std::equal_to<>()"> ``` This is a little non-obvious, so after this patch you can instead do: ``` OptionalTypesMatchWith< "padding type matches element type of result (if present)", "result", "padding", "::llvm::cast<VectorType>($_self).getElementType()"> ```
-
- Oct 19, 2023
-
-
Yaxun (Sam) Liu authored
clang-cl is a driver mode that accepts options of MSVC cl.exe as a drop-in replacement for cl.exe. Currently clang-cl accepts mixed clang style options and cl style options. To let clang-cl accept a clang-style option, just need to add visibility CLOption to that option. Currently nvcc can pass cl style options to cl.exe, which allows nvcc to compile C++ and CUDA programs with mixed nvcc and cl style options. On the other hand, clang cannot use mixed clang and cl style options to compile CUDA/HIP programs. This patch add visibility CLOption to options needed to compile CUDA/HIP programs. This allows clang-cl to compile CUDA/HIP programs with mixed clang and cl style options.
-
Matt Arsenault authored
It's not a verifier enforced property that implicit_def may only have one operand. Fixes assertions after the coalescer implicit-defs to preserve super register liveness to arbitrary instructions. For some reason I'm unable to reproduce this as a MIR test running only the allocator for the x86 test. Not sure it's worth keeping around.
-
Valentin Clement (バレンタイン クレメン) authored
Instead of raising an error for a misplaced `end loop directive`, just warn about it and ignore it. This directive is an extension and is optional.
-
Jay Foad authored
Teach the LiveIntervals path in isPlainlyKilled to handle physical registers, to get equivalent functionality with the LiveVariables path. Test this by adding -early-live-intervals RUN lines to a handful of tests that would fail without this.
-
Caroline Concatto authored
Patch by : David Sherwood <david.sherwood@arm.com> As described in: https://github.com/ARM-software/acle/pull/257 Reviewed By: kmclaughlin Differential Revision: https://reviews.llvm.org/D151433
-
Pete Steinfeld authored
The update stems from the discussion in https://discourse.llvm.org/t/adding-flang-specific-header-files-to-clang/72442 This is my second attempt at this. My first attempt was in pull request #68756. I decided to put ISO_Fortran_binding.h in a place where it would be accessible with the include: "#include<ISO_Fortran_binding.h>" rather than "#include<fortran/ISO_Fortran_binding.h>" because this is what gfortran implements. Note that the file is also installed into ".../include/flang", so if a user wanted to access the file from a compiler other than clang, it would be available. I added a test in ".../flang/test/Examples". To make the test work, I also needed to put ISO_Fortran_binding.h into the build area. Although the flang project depends on clang, clang may not always be available in a flang build. For example, when building just the "check-flang" target, the "clang" executable may not be available at the time the new test gets run. To account for this, I made the test's script check for the existence of the "clang" executable. If "clang" is not available, it simply prints "PASS". If it is available, it fully builds and executes the test. On success, this will also print "PASS"
-
JackAKirk authored
Now all wmma store builtins have src param marked const. Reviewers: Tra
-
Nikita Popov authored
-
lntue authored
Clean up usage of `DECLARE_SPECIAL_CONSTANTS` in global scope.
-
Lei Huang authored
The check for dladdr1 for shared libc is too strict. Depending on how the system is setup we sometimes pick up the none generic lib name with the version string in it. Update check to for libc to account for version string.
-
Pierre van Houtryve authored
Solves #68315
-
Florian Hahn authored
-
Michael Klemm authored
[libomptarget][OpenMP] Initial implementation of omp_target_memset() and omp_target_memset_async() (#68706) Implement a slow-path version of omp_target_memset*() There is a TODO to implement a fast path that uses an on-device kernel instead of the host-based memory fill operation. This may require some additional plumbing to have kernels in libomptarget.so
-
Joseph Huber authored
Summary: The `libcgpu.a` file provides its own implementation of `__assert_fail`. This adds a test to make sure it's usable in OpenMP offloading as expected. Currently this requires linking `libcgpu.a` before the OpenMP device RTL however. We also disable the test on the CPU as the format of the string will be different.
-
Timm Bäder authored
For this code: struct O { int &&j; }; O o1(0); The generated AST for the initializer of o1 is: VarDecl 0x62100006ab08 <array.cpp:119:3, col:9> col:5 o1 'O':'O' parenlistinit `-ExprWithCleanups 0x62100006b250 <col:7, col:9> 'O':'O' `-CXXParenListInitExpr 0x62100006b210 <col:7, col:9> 'O':'O' `-MaterializeTemporaryExpr 0x62100006b1f0 <col:8> 'int' xvalue `-IntegerLiteral 0x62100006abd0 <col:8> 'int' 0 Before this patch, we create a local temporary variable for the MaterializeTemporaryExpr and destroy it again when destroying the EvalEmitter we create to interpret the initializer. However, since O::j is a reference, this reference now points to a local variable that doesn't exist anymore. Differential Revision: https://reviews.llvm.org/D156453 -
Simon Pilgrim authored
[DAG] canCreateUndefOrPoison - remove AssertSext/AssertZext assumption that they never create undef/poison We need to assume that we generate poison if the assertions failed Fixes #66603
-
Simon Pilgrim authored
-
Timm Bäder authored
-
Igor Kirillov authored
-