CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
44 lines
1.6 KiB
TableGen
44 lines
1.6 KiB
TableGen
// RUN: llvm-tblgen %s -gen-global-isel -optimize-match-table=true -I %p/../../../include -I %p/../Common | FileCheck %s
|
|
|
|
include "llvm/Target/Target.td"
|
|
include "GlobalISelEmitterCommon.td"
|
|
|
|
def InstThreeOperands : I<(outs GPR32:$dst), (ins GPR32:$src0, GPR32:$src1, GPR32:$src2), []>;
|
|
|
|
class ThreeOpFrag<SDPatternOperator op1, SDPatternOperator op2> : PatFrag<
|
|
(ops node:$x, node:$y, node:$z),
|
|
(op2 (op1 node:$x, node:$y), node:$z),
|
|
[{
|
|
return Operands[0] && Operands[1] && Operands[2];
|
|
}]> {
|
|
let PredicateCodeUsesOperands = 1;
|
|
let GISelPredicateCode = [{
|
|
return Operands[0] && Operands[1] && Operands[2];
|
|
}];
|
|
}
|
|
|
|
def ptradd_commutative : PatFrags<(ops node:$src0, node:$src1),
|
|
[(ptradd node:$src0, node:$src1), (ptradd node:$src1, node:$src0)]>;
|
|
|
|
// ptradd_commutative has two PatFrags, therefore there are two ways how the
|
|
// below pattern could match. Both require checking the C++ predicate, but that
|
|
// check cannot be hoisted because it relies on recorded operands, which differ
|
|
// between the PatFrags. This is inspired by a similar construct in the AMDGPU
|
|
// backend.
|
|
|
|
// CHECK: GIM_Try, /*On fail goto*//*Label 1*/
|
|
// CHECK: GIM_RecordNamedOperand
|
|
// CHECK: GIM_RecordNamedOperand
|
|
// CHECK: GIM_RecordNamedOperand
|
|
// CHECK: GIM_CheckCxxInsnPredicate
|
|
// CHECK: // Label 1
|
|
// CHECK: GIM_Try, /*On fail goto*//*Label 2*/
|
|
// CHECK: GIM_RecordNamedOperand
|
|
// CHECK: GIM_RecordNamedOperand
|
|
// CHECK: GIM_RecordNamedOperand
|
|
// CHECK: GIM_CheckCxxInsnPredicate
|
|
// CHECK: // Label 2
|
|
def : Pat <(i32 (ThreeOpFrag<shl, ptradd_commutative> GPR32:$src0, GPR32:$src1, GPR32:$src2)),
|
|
(InstThreeOperands GPR32:$src0, GPR32:$src1, GPR32:$src2)> ;
|
|
|