Files
TheRock/compiler/amd-llvm/llvm/test/TableGen/SDNodeInfoEmitter/hw-mode.td
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

62 lines
1.8 KiB
TableGen

// RUN: llvm-tblgen -gen-sd-node-info -I %p/../../../include %s | FileCheck %s
include "llvm/Target/Target.td"
def MyTarget : Target;
def M1 : HwMode<[]>;
def M2 : HwMode<[]>;
def M3 : HwMode<[]>;
def VT1 : ValueTypeByHwMode<[M1], [i1]>;
def VT2 : ValueTypeByHwMode<[M2], [i2]>;
def VT3 : ValueTypeByHwMode<[M1, M2, M3, DefaultMode], [i1, i2, i4, i8]>;
def my_node_1 : SDNode<
"MyTargetISD::NODE_1",
SDTypeProfile<0, 5, [
SDTCVecEltisVT<0, VT3>,
SDTCisVT<1, i1>,
SDTCVecEltisVT<2, i2>,
SDTCisVT<3, VT1>,
SDTCVecEltisVT<4, VT2>,
]>
>;
def my_node_2 : SDNode<
"MyTargetISD::NODE_2",
SDTypeProfile<1, 2, [
SDTCVecEltisVT<0, VT3>,
SDTCisVT<1, i1>,
SDTCVecEltisVT<2, i2>,
]>
>;
def my_node_3 : SDNode<
"MyTargetISD::NODE_3",
SDTypeProfile<1, 0, [
SDTCisVT<0, VT3>,
]>
>;
// CHECK: static const VTByHwModePair MyTargetVTByHwModeTable[] = {
// CHECK-NEXT: /* 0 */ {0, MVT::i8}, {1, MVT::i1}, {2, MVT::i2}, {3, MVT::i4},
// CHECK-NEXT: /* 4 */ {1, MVT::i1},
// CHECK-NEXT: /* 5 */ {2, MVT::i2},
// CHECK-NEXT: };
// CHECK-EMPTY:
// CHECK-NEXT: static const SDTypeConstraint MyTargetSDTypeConstraints[] = {
// CHECK-NEXT: /* 0 */ {SDTCisVT, 0, 0, 4, 0},
// CHECK-NEXT: /* 1 */ {SDTCVecEltisVT, 4, 0, 1, 5},
// CHECK-SAME: {SDTCisVT, 3, 0, 1, 4},
// CHECK-SAME: {SDTCVecEltisVT, 2, 0, 0, MVT::i2},
// CHECK-SAME: {SDTCisVT, 1, 0, 0, MVT::i1},
// CHECK-SAME: {SDTCVecEltisVT, 0, 0, 4, 0},
// CHECK-NEXT: };
// CHECK-EMPTY:
// CHECK-NEXT: static const SDNodeDesc MyTargetSDNodeDescs[] = {
// CHECK-NEXT: {0, 5, 0, 0, 0, 1, 1, 5}, // NODE_1
// CHECK-NEXT: {1, 2, 0, 0, 0, 21, 3, 3}, // NODE_2
// CHECK-NEXT: {1, 0, 0, 0, 0, 41, 0, 1}, // NODE_3
// CHECK-NEXT: };