#
8ba2cbff |
| 22-Jun-2022 |
Guillaume Chatelet <gchatelet@google.com> |
[NFC] Remove dead code
|
#
4c5f10ae |
| 21-Jun-2022 |
Nabeel Omer <Nabeel.Omer@sony.com> |
Revert rGe6ccb57bb3f6b761f2310e97fd6ca99eff42f73e "[SLP] Add cost model for `llvm.powi.*` intrinsics"
This reverts commit e6ccb57bb3f6b761f2310e97fd6ca99eff42f73e.
|
#
e6ccb57b |
| 20-Jun-2022 |
Nabeel Omer <Nabeel.Omer@sony.com> |
[SLP] Add cost model for `llvm.powi.*` intrinsics
This patch adds handling for the llvm.powi.* intrinsics in BasicTTIImplBase::getIntrinsicInstrCost() and improves vectorization. Closes #53887.
Dif
[SLP] Add cost model for `llvm.powi.*` intrinsics
This patch adds handling for the llvm.powi.* intrinsics in BasicTTIImplBase::getIntrinsicInstrCost() and improves vectorization. Closes #53887.
Differential Revision: https://reviews.llvm.org/D128172
show more ...
|
#
7a47ee51 |
| 21-Jun-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Don't use Optional::getValue (NFC)
|
#
0916d96d |
| 21-Jun-2022 |
Kazu Hirata <kazu@google.com> |
Don't use Optional::hasValue (NFC)
|
#
e0e687a6 |
| 20-Jun-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Don't use Optional::hasValue (NFC)
|
#
129b531c |
| 19-Jun-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use value_or instead of getValueOr (NFC)
|
#
654a835c |
| 15-Jun-2022 |
Paul Robinson <paul.robinson@sony.com> |
[PS5] Trap after noreturn calls, with special case for stack-check-fail
|
#
5a293d21 |
| 13-Jun-2022 |
Guillaume Chatelet <gchatelet@google.com> |
[NFC][Alignment] Use getAlign in SelectionDAGBuilder
|
#
95083fa3 |
| 10-Jun-2022 |
Guillaume Chatelet <gchatelet@google.com> |
[NFC] Remove deadcode
|
#
38637ee4 |
| 07-Jun-2022 |
Guillaume Chatelet <gchatelet@google.com> |
[clang] Add support for __builtin_memset_inline
In the same spirit as D73543 and in reply to https://reviews.llvm.org/D126768#3549920 this patch is adding support for `__builtin_memset_inline`.
The
[clang] Add support for __builtin_memset_inline
In the same spirit as D73543 and in reply to https://reviews.llvm.org/D126768#3549920 this patch is adding support for `__builtin_memset_inline`.
The idea is to get support from the compiler to easily write efficient memory function implementations.
This patch could be split in two: - one for the LLVM part adding the `llvm.memset.inline.*` intrinsics. - and another one for the Clang part providing the instrinsic as a builtin.
Differential Revision: https://reviews.llvm.org/D126903
show more ...
|
#
d897a14c |
| 02-Jun-2022 |
Kai Nacke <kai.nacke@de.ibm.com> |
[SystemZ] Fix check for zero size when lowering memcmp.
During lowering of memcmp/bcmp, the check for a size of 0 is done in 2 different ways. In rare cases this can lead to a crash in SystemZSelect
[SystemZ] Fix check for zero size when lowering memcmp.
During lowering of memcmp/bcmp, the check for a size of 0 is done in 2 different ways. In rare cases this can lead to a crash in SystemZSelectionDAGInfo::EmitTargetCodeForMemcmp(). The root cause is that SelectionDAGBuilder::visitMemCmpBCmpCall() checks for a constant int value which is not yet evaluated. When the value is turned into a SDValue, then the evaluation is done and results in a ConstantSDNode. But EmitTargetCodeForMemcmp() expects the special case of 0 length to be handled, which results in an assertion.
The fix is to turn the value into a SDValue, so that both functions use the same check.
Reviewed By: uweigand
Differential Revision: https://reviews.llvm.org/D126900
show more ...
|
#
00999fb6 |
| 13-May-2022 |
Yeting Kuo <yeting.kuo@sifive.com> |
[SelectionDAGBuilder] Pass fast math flags to most of VP SDNodes.
The patch does not pass math flags to float VPCmpIntrinsics because LLParser could not identify float VPCmpIntrinsics as FPMathOpera
[SelectionDAGBuilder] Pass fast math flags to most of VP SDNodes.
The patch does not pass math flags to float VPCmpIntrinsics because LLParser could not identify float VPCmpIntrinsics as FPMathOperators.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D125600
show more ...
|
#
7dd05ba9 |
| 08-Apr-2022 |
Paul Walker <paul.walker@arm.com> |
[SelectionDAG] Remove duplicate "is scaled" information from gather/scatter SDNodes.
During early gather/scatter enablement two different approaches were taken to represent scaled indices:
* A Scal
[SelectionDAG] Remove duplicate "is scaled" information from gather/scatter SDNodes.
During early gather/scatter enablement two different approaches were taken to represent scaled indices:
* A Scale operand whereby byte_offsets = Index * Scale * An IndexType whereby byte_offsets = Index * sizeof(MemVT.ElementType)
Having multiple representations is bad as shown by this patch which fixes instances where the two are out of sync. The dedicated scale operand is more flexible and pervasive so this patch removes the UNSCALED values from IndexType. This means all indices are scaled but the scale can be one, hence unscaled. SDNodes now use the scale operand to answer the "isScaledIndex" question.
I toyed with the idea of keeping the UNSCALED enums and helper functions but because they will have no uses and force SDNodes to validate the set of supported values I figured it's best to remove them. We can re-add them if there's a real need. For similar reasons I've kept the IndexType enum when a bool could be used as I think being explicitly looks better.
Depends On D123347
Differential Revision: https://reviews.llvm.org/D123381
show more ...
|
#
027c728f |
| 27-Apr-2022 |
Nikita Popov <npopov@redhat.com> |
[SelectionDAGBuilder] Don't create MGATHER/MSCATTER with Scale != ElemSize
This is an alternative to D124530. In getUniformBase() only create scales that match the gather/scatter element size. If ta
[SelectionDAGBuilder] Don't create MGATHER/MSCATTER with Scale != ElemSize
This is an alternative to D124530. In getUniformBase() only create scales that match the gather/scatter element size. If targets also support other scales, then they can produce those scales in target DAG combines. This is what X86 already does (as long as the resulting scale would be 1, 2, 4 or 8).
This essentially restores the pre-opaque-pointer state of things.
Fixes https://github.com/llvm/llvm-project/issues/55021.
Differential Revision: https://reviews.llvm.org/D124605
show more ...
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
170a9031 |
| 10-Oct-2021 |
Serge Pavlov <sepavloff@gmail.com> |
Intrinsic for checking floating point class
This change introduces a new intrinsic, `llvm.is.fpclass`, which checks if the provided floating-point number belongs to any of the the specified value cl
Intrinsic for checking floating point class
This change introduces a new intrinsic, `llvm.is.fpclass`, which checks if the provided floating-point number belongs to any of the the specified value classes. The intrinsic implements the checks made by C standard library functions `isnan`, `isinf`, `isfinite`, `isnormal`, `issubnormal`, `issignaling` and corresponding IEEE-754 operations.
The primary motivation for this intrinsic is the support of strict FP mode. In this mode using compare instructions or other FP operations is not possible, because if the value is a signaling NaN, floating-point exception `Invalid` is raised, but the aforementioned functions must never raise exceptions.
Currently there are two solutions for this problem, both are implemented partially. One of them is using integer operations to implement the check. It was implemented in https://reviews.llvm.org/D95948 for `isnan`. It solves the problem of exceptions, but offers one solution for all targets, although some can do the check in more efficient way.
The other, implemented in https://reviews.llvm.org/D96568, introduced a hook 'clang::TargetCodeGenInfo::testFPKind', which injects a target specific code into IR to implement `isnan` and some other functions. It is convenient for targets that have dedicated instruction to determine FP data class. However using target-specific intrinsic complicates analysis and can prevent some optimizations.
A special intrinsic for value class checks allows representing data class tests with enough flexibility. During IR transformations it represents the check in target-independent way and saves it from undesired transformations. In the instruction selector it allows efficient lowering depending on the used target and mode.
This implementation is an extended variant of `llvm.isnan` introduced in https://reviews.llvm.org/D104854. It is limited to minimal intrinsic support. Target-specific treatment will be implemented in separate patches.
Differential Revision: https://reviews.llvm.org/D112025
show more ...
|
#
9727c77d |
| 25-Apr-2022 |
David Green <david.green@arm.com> |
[NFC] Rename Instrinsic to Intrinsic
|
#
8591328e |
| 17-Apr-2022 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Intrinsics: Mark llvm.eh.sjlj.callsite argument as immarg
The assert in SelectionDAG implies that it is
|
#
0c44115e |
| 13-Apr-2022 |
Paul Walker <paul.walker@arm.com> |
[SVE] Add support for non-element-type sized scaling when lowering MGATHER/MSCATTER.
The lowering code did not use the scale operand of MGATHER/MSCATTER nodes, but instead assumed scaled indices wer
[SVE] Add support for non-element-type sized scaling when lowering MGATHER/MSCATTER.
The lowering code did not use the scale operand of MGATHER/MSCATTER nodes, but instead assumed scaled indices were always scaled based on the element type of the memory type. This patch adds the missing support by rewritting the nodes as unscaled variants.
Differential Revision: https://reviews.llvm.org/D123670
show more ...
|
#
46f83cae |
| 22-Mar-2022 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
[InlineAsm] Add support for address operands ("p").
This patch adds support for inline assembly address operands using the "p" constraint on X86 and SystemZ.
This was in fact broken on X86 (see exa
[InlineAsm] Add support for address operands ("p").
This patch adds support for inline assembly address operands using the "p" constraint on X86 and SystemZ.
This was in fact broken on X86 (see example at https://reviews.llvm.org/D110267, Nov 23).
These operands should probably be treated the same as memory operands by CodeGenPrepare, which have been commented with "TODO" there.
Review: Xiang Zhang and Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D122220
show more ...
|
#
2ce25628 |
| 11-Apr-2022 |
Craig Topper <craig.topper@sifive.com> |
[RISCV][SelectionDAG] Add a hook to sign extend i32 ConstantInt operands of phis on RV64.
Materializing constants on RISCV is simpler if the constant is sign extended from i32. By default i32 consta
[RISCV][SelectionDAG] Add a hook to sign extend i32 ConstantInt operands of phis on RV64.
Materializing constants on RISCV is simpler if the constant is sign extended from i32. By default i32 constant operands of phis are zero extended.
This patch adds a hook to allow RISCV to override this for i32. We have an existing isSExtCheaperThanZExt, but it operates on EVT which we don't have at these places in the code.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D122951
show more ...
|
#
18106b99 |
| 07-Apr-2022 |
Fraser Cormack <fraser@codeplay.com> |
[VP] Explicitly map from VP intrinsic to ISD opcode
This patch aims to overcome an issue in these mappings where, when an ISD node was registered with BEGIN_REGISTER_VP_SDNODE but outwidth the scope
[VP] Explicitly map from VP intrinsic to ISD opcode
This patch aims to overcome an issue in these mappings where, when an ISD node was registered with BEGIN_REGISTER_VP_SDNODE but outwidth the scope of a pair of BEGIN_REGISTER_VP_INTRINSIC/END_REGISTER_VP_INTRINSIC macros, the switch cases fell apart. This in particular happened with VP_SETCC, where we'd end up with something along the lines of:
case Intrinsic::vp_fcmp: break; case Intrinsic::vp_icmp: break; ResOpc = ISD::VP_SETCC; case Intrinsic::vp_store: ...
To remedy this, we introduce a special-purpose mapping macro which can map any number of VP intrinsic opcodes to an ISD opcode.
As a result, we no longer need to special-case the mapping from vp.icmp and vp.fcmp to VP_SETCC, as the new helper macro does it for us.
Thanks to @craig.topper for noticing this and to @rogfer01 for the idea.
Reviewed By: rogfer01
Differential Revision: https://reviews.llvm.org/D123324
show more ...
|
#
6be5e875 |
| 30-Mar-2022 |
Fraser Cormack <fraser@codeplay.com> |
[RISCV][VP] Add basic RVV codegen for vp.icmp
This patch adds the minimum required to successfully lower vp.icmp via the new ISD::VP_SETCC node to RVV instructions.
Regular ISD::SETCC goes through
[RISCV][VP] Add basic RVV codegen for vp.icmp
This patch adds the minimum required to successfully lower vp.icmp via the new ISD::VP_SETCC node to RVV instructions.
Regular ISD::SETCC goes through a lot of canonicalization which targets may rely on which has not hereto been ported to VP_SETCC. It also supports expansion of individual condition codes and a non-boolean return type. Support for all of that will follow in later patches.
In the case of RVV this largely isn't a problem as the vector integer comparison instructions are plentiful enough that it can lower all VP_SETCC nodes on legal integer vectors except for boolean vectors, which regular SETCC folds away immediately into logical operations.
Floating-point VP_SETCC operations aren't as well supported in RVV and the backend relies on condition code expansion, so support for those operations will come in later patches.
Portions of this code were taken from the VP reference patches.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D122743
show more ...
|
#
e24f5348 |
| 01-Apr-2022 |
Michael Gottesman <mgottesman@apple.com> |
[debug-info] As an NFC commit, refactor EmitFuncArgumentDbgValue so that it can be extended to support llvm.dbg.addr.
The reason why I am making this change is that before this commit, EmitFuncArgum
[debug-info] As an NFC commit, refactor EmitFuncArgumentDbgValue so that it can be extended to support llvm.dbg.addr.
The reason why I am making this change is that before this commit, EmitFuncArgumentDbgValue relied on a boolean flag IsDbgDeclare both to signal that a DBG_VALUE should be made to be indirect /and/ that the original intrinsic was a dbg.declare. This is no longer always true if we add support for handling dbg.addr since we will have an indirect DBG_VALUE that is a different intrinsic from dbg.declare.
With that in mind, in this NFC patch, we prepare for future fixes by introducing a 3 case-enum argument to EmitFuncArgumentDbgValue that allows the caller to explicitly specify how the argument's DBG_VALUE should be emitted. This then allows us to turn the indirect checks into a != FuncArgumentDbgValueKind::Value and prepare us for a future where we add support here for llvm.dbg.addr directly.
rdar://83957028
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D122945
show more ...
|
#
4a8665e2 |
| 31-Mar-2022 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
SelectionDAG: Avoid some uses of getPointerTy
Avoids use of the default address space parameter, and avoids some assumptions about the incoming address space.
|