- Jun 17, 2022
-
-
Matthias Springer authored
This change changes the bufferization so that it utilizes the new TensorCopyInsertion pass. One-Shot Bufferize no longer calls the One-Shot Analysis. Instead, it relies on the TensorCopyInsertion pass to make the entire IR fully inplacable. The `bufferize` implementations of all ops are simplified; they no longer have to account for out-of-place bufferization decisions. These were already materialized in the IR in the form of `bufferization.alloc_tensor` ops during the TensorCopyInsertion pass. Differential Revision: https://reviews.llvm.org/D127652
-
Jay Foad authored
-
lorenzo chelini authored
-
Tiehu Zhang authored
TTI::prefersVectorizedAddressing() try to vectorize the addresses that lead to loads. For aarch64, only gather/scatter (supported by SVE) can deal with vectors of addresses. This patch specializes the hook for AArch64, to return true only when we enable SVE. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D124612
-
Kadir Cetinkaya authored
Fixes https://github.com/clangd/clangd/issues/1158 Differential Revision: https://reviews.llvm.org/D127863
-
Nikita Popov authored
In addition to division by zero, signed division also traps for SignedMin / -1. This was handled in isSafeToSpeculativelyExecute(), but not in Constant::canTrap().
-
Alex Zinenko authored
The 'emit_c_wrappers' option in the FuncToLLVM conversion requests C interface wrappers to be emitted for every builtin function in the module. While this has been useful to bootstrap the interface, it is problematic in the longer term as it may unintentionally affect the functions that should retain their existing interface, e.g., libm functions obtained by lowering math operations (see D126964 for an example). Since D77314, we have a finer-grain control over interface generation via an attribute that avoids the problem entirely. Remove the 'emit_c_wrappers' option. Introduce the '-llvm-request-c-wrappers' pass that can be run in any pipeline that needs blanket emission of functions to annotate all builtin functions with the attribute before performing the usual lowering that accounts for the attribute. Reviewed By: chelini Differential Revision: https://reviews.llvm.org/D127952
-
Guillaume Chatelet authored
-
Cullen Rhodes authored
-
Alexander Potapenko authored
Let -fsanitize-memory-param-retval be used together with -fsanitize=kernel-memory, so that it can be applied when building the Linux kernel. Also add clang/test/CodeGen/kmsan-param-retval.c to ensure that -fsanitize-memory-param-retval eliminates shadow accesses for parameters marked as undef. Reviewed By: eugenis, vitalybuka Differential Revision: https://reviews.llvm.org/D127860
-
Sven van Haastregt authored
Some of the atomic_fetch_add and atomic_fetch_sub overloads intended for atomic_half types accidentally had an atomic_float parameter.
-
Nikita Popov authored
-
Muhammad Omair Javaid authored
This patch marks following tests as XFAIL for Arm/Ubuntu Jammy 22.04: test_lldb_process_load_and_unload_commands test_load_unload
-
Benjamin Kramer authored
Revert "Reland "Reland "Reland "[X86][RFC] Enable `_Float16` type support on X86 following the psABI"""" This reverts commit 04a3d5f3. I see two more issues: - uitofp/sitofp from i32/i64 to half now generates __floatsihf/__floatdihf, which exists in neither compiler-rt nor libgcc - This crashes when legalizing the bitcast: ``` ; RUN: llc < %s -mcpu=skx define void @main.45(ptr nocapture readnone %retval, ptr noalias nocapture readnone %run_options, ptr noalias nocapture readnone %params, ptr noalias nocapture readonly %buffer_table, ptr noalias nocapture readnone %status, ptr noalias nocapture readnone %prof_counters) local_unnamed_addr { entry: %fusion = load ptr, ptr %buffer_table, align 8 %0 = getelementptr inbounds ptr, ptr %buffer_table, i64 1 %Arg_1.2 = load ptr, ptr %0, align 8 %1 = getelementptr inbounds ptr, ptr %buffer_table, i64 2 %Arg_0.1 = load ptr, ptr %1, align 8 %2 = load half, ptr %Arg_0.1, align 8 %3 = bitcast half %2 to i16 %4 = and i16 %3, 32767 %5 = icmp eq i16 %4, 0 %6 = and i16 %3, -32768 %broadcast.splatinsert = insertelement <4 x half> poison, half %2, i64 0 %broadcast.splat = shufflevector <4 x half> %broadcast.splatinsert, <4 x half> poison, <4 x i32> zeroinitializer %broadcast.splatinsert9 = insertelement <4 x i16> poison, i16 %4, i64 0 %broadcast.splat10 = shufflevector <4 x i16> %broadcast.splatinsert9, <4 x i16> poison, <4 x i32> zeroinitializer %broadcast.splatinsert11 = insertelement <4 x i16> poison, i16 %6, i64 0 %broadcast.splat12 = shufflevector <4 x i16> %broadcast.splatinsert11, <4 x i16> poison, <4 x i32> zeroinitializer %broadcast.splatinsert13 = insertelement <4 x i16> poison, i16 %3, i64 0 %broadcast.splat14 = shufflevector <4 x i16> %broadcast.splatinsert13, <4 x i16> poison, <4 x i32> zeroinitializer %wide.load = load <4 x half>, ptr %Arg_1.2, align 8 %7 = fcmp uno <4 x half> %broadcast.splat, %wide.load %8 = fcmp oeq <4 x half> %broadcast.splat, %wide.load %9 = bitcast <4 x half> %wide.load to <4 x i16> %10 = and <4 x i16> %9, <i16 32767, i16 32767, i16 32767, i16 32767> %11 = icmp eq <4 x i16> %10, zeroinitializer %12 = and <4 x i16> %9, <i16 -32768, i16 -32768, i16 -32768, i16 -32768> %13 = or <4 x i16> %12, <i16 1, i16 1, i16 1, i16 1> %14 = select <4 x i1> %11, <4 x i16> %9, <4 x i16> %13 %15 = icmp ugt <4 x i16> %broadcast.splat10, %10 %16 = icmp ne <4 x i16> %broadcast.splat12, %12 %17 = or <4 x i1> %15, %16 %18 = select <4 x i1> %17, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>, <4 x i16> <i16 1, i16 1, i16 1, i16 1> %19 = add <4 x i16> %18, %broadcast.splat14 %20 = select i1 %5, <4 x i16> %14, <4 x i16> %19 %21 = select <4 x i1> %8, <4 x i16> %9, <4 x i16> %20 %22 = bitcast <4 x i16> %21 to <4 x half> %23 = select <4 x i1> %7, <4 x half> <half 0xH7E00, half 0xH7E00, half 0xH7E00, half 0xH7E00>, <4 x half> %22 store <4 x half> %23, ptr %fusion, align 16 ret void } ``` llc: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:977: void (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode *): Assertion `(TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) == TargetLowering::TypeLegal || Op.getOpcode() == ISD::TargetConstant || Op.getOpcode() == ISD::Register) && "Unexpected illegal type!"' failed.
-
Javier Alvarez authored
From [class.copy.ctor]: ``` A non-template constructor for class X is a copy constructor if its first parameter is of type X&, const X&, volatile X& or const volatile X&, and either there are no other parameters or else all other parameters have default arguments (9.3.4.7). A copy/move constructor for class X is trivial if it is not user-provided and if: - class X has no virtual functions (11.7.3) and no virtual base classes (11.7.2), and - the constructor selected to copy/move each direct base class subobject is trivial, and - or each non-static data member of X that is of class type (or array thereof), the constructor selected to copy/move that member is trivial; otherwise the copy/move constructor is non-trivial. ``` So `T(T&) = default`; should be trivial assuming that the previous provisions are met. This works in GCC, but not in Clang at the moment: https://godbolt.org/z/fTGe71b6P Reviewed By: royjacobson Differential Revision: https://reviews.llvm.org/D127593
-
ping.deng authored
Reviewed By: benshi001, sunshaoce Differential Revision: https://reviews.llvm.org/D127721
-
Fangrui Song authored
GNU ld has a hack that defaults to -X (--discard-locals) in the emulation file `riscvelf.em`. The recommended way, as gcc/config/arm does, is to let the compiler driver pass -X to ld. (The motivation is likely to discard a plethora of `.L` symbols due to linker relaxation.) lld default to --discard-none. To make clang+lld match GNU ld's behavior, pass -X to ld. Note: GNU ld has a special rule to treat ld -r -s as ld -r -S -x. With -X, driver `-r -Wl,-s` will behave as ld `-r -S -X`. This removes fewer symbols than `-r -S -x` but is safe. Differential Revision: https://reviews.llvm.org/D127826
-
Xiang Li authored
Add more feature to tableGen backend gen-dxil-operation. It will generate getOpCodeProperty, getOpCodeClassName and getOpCodeName when build DirectX target. Each of these functions has a table which generate based on DXIL operations. These generated functions will replace the manually written functions which used for query DXIL operation information. Reviewed By: bogner Differential Revision: https://reviews.llvm.org/D125520
-
Fangrui Song authored
llvm-objdump will be changed to default to disassemble all instructions. Add --mattr=-{sve,sve2,sme} to keep the desired testing. -
Mingming Liu authored
option to the machine-block-placement-stats. Differential Revision: https://reviews.llvm.org/D128019
-
Mingming Liu authored
Revert "[MachineBlockPlacementStats] Add check for `-filter-print-funcs` option to machine-block-placement stats." This reverts commit 46d45df4. Going to add differential revision link to commit message and re-commit.
-
Mingming Liu authored
[MachineBlockPlacementStats] Add check for `-filter-print-funcs` option to machine-block-placement stats.
-
Phoebe Wang authored
Fix the crash on lowering X86ISD::FCMP.
-
Jonas Devlieghere authored
Remove the LogHandler::Create functions. Except for the StreamHandler they were just forwarding their arguments to std::make_shared.
-
Jez Ng authored
I realized we'd forgotten to cover this case (though our existing behavior is indeed correct / matches ld64's). Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D128025
-
Jacques Pienaar authored
Disable warning for deprecation in test of deprecated feature. Also remove additional test of deprecated feature from TestOps.td.
-
Jacques Pienaar authored
* Split ops into X_graph variants as discussed; * Remove tokens from non-Graph region variants and rely on side-effect modelling there while removing side-effect modelling from Graph variants and relying on explicit ordering there; * Make tokens required to be produced by Graph variants - but kept explicit token type specification given previous discussion on this potentially being configurable in future; This results in duplicating some code. I considered adding helper functions but decided against adding an abstraction there early given size of duplication and creating accidental coupling. Differential Revision: https://reviews.llvm.org/D127813
-
Lian Wang authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D127825
-
Jacques Pienaar authored
Where a constraint also has a def, emit the def only to avoid duplicate output (and def has more complete info). Also move attributes and types to the end rather than some on top and some at end. Differential Revision: https://reviews.llvm.org/D127823
-
Lian Wang authored
Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D127939
-
Lian Wang authored
Reviewed By: victor-eds, frasercrmck Differential Revision: https://reviews.llvm.org/D127946
-
Lang Hames authored
This is a first step towards allowing programs to pre-link against the ORC runtime, which would allow us to move some code that is currently in the LLVM OrcTarget library into the ORC runtime instead. The C API header has limited utility as-is, but serves as a minimal first step and provides clients with tools for interacting with wrapper functions. Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D127324
-
Matt Arsenault authored
-
Maryam Moghadas authored
PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions This patch is the last prerequisite to switch the default behaviour to -fno-lax-vector-conversions in the future. The first path ;D124093; fixed the altivec implicit castings. Reviewed By: amyk Differential Revision: https://reviews.llvm.org/D126540
-
Lei Huang authored
Add defines and undefines of the __XL_COMPAT_ALTIVEC__ to ensure consistent results regardless of the default for this macro.
-
Jennifer Yu authored
Differential Revision: https://reviews.llvm.org/D127454
-
LiaoChunyu authored
fix isConstantAddr defined but not used Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D127959
-
LLVM GN Syncbot authored
-
Matt Arsenault authored
-
Matt Arsenault authored
-