Files
TheRock/compiler/amd-llvm/mlir/test/Target/LLVMIR/nvvm/permute_valid.mlir
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

65 lines
2.4 KiB
MLIR

// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
// CHECK-LABEL: @test_prmt_default
llvm.func @test_prmt_default(%sel: i32, %lo: i32, %hi: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt(i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}})
%result = nvvm.prmt #nvvm.permute_mode<default> %sel, %lo, %hi : i32
llvm.return %result : i32
}
// CHECK-LABEL: @test_prmt_f4e
llvm.func @test_prmt_f4e(%pos: i32, %lo: i32, %hi: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt.f4e(i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}})
%result = nvvm.prmt #nvvm.permute_mode<f4e> %pos, %lo, %hi : i32
llvm.return %result : i32
}
// CHECK-LABEL: @test_prmt_b4e
llvm.func @test_prmt_b4e(%pos: i32, %lo: i32, %hi: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt.b4e(i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}})
%result = nvvm.prmt #nvvm.permute_mode<b4e> %pos, %lo, %hi : i32
llvm.return %result : i32
}
// CHECK-LABEL: @test_prmt_rc8
llvm.func @test_prmt_rc8(%sel: i32, %val: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt.rc8(i32 %{{.*}}, i32 %{{.*}})
%result = nvvm.prmt #nvvm.permute_mode<rc8> %sel, %val : i32
llvm.return %result : i32
}
// CHECK-LABEL: @test_prmt_ecl
llvm.func @test_prmt_ecl(%sel: i32, %val: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt.ecl(i32 %{{.*}}, i32 %{{.*}})
%result = nvvm.prmt #nvvm.permute_mode<ecl> %sel, %val : i32
llvm.return %result : i32
}
// CHECK-LABEL: @test_prmt_ecr
llvm.func @test_prmt_ecr(%sel: i32, %val: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt.ecr(i32 %{{.*}}, i32 %{{.*}})
%result = nvvm.prmt #nvvm.permute_mode<ecr> %sel, %val : i32
llvm.return %result : i32
}
// CHECK-LABEL: @test_prmt_rc16
llvm.func @test_prmt_rc16(%sel: i32, %val: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt.rc16(i32 %{{.*}}, i32 %{{.*}})
%result = nvvm.prmt #nvvm.permute_mode<rc16> %sel, %val : i32
llvm.return %result : i32
}
// CHECK-LABEL: @test_prmt_mixed
llvm.func @test_prmt_mixed(%sel: i32, %lo: i32, %hi: i32) -> i32 {
// CHECK: call i32 @llvm.nvvm.prmt(i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}})
%r1 = nvvm.prmt #nvvm.permute_mode<default> %sel, %lo, %hi : i32
// CHECK: call i32 @llvm.nvvm.prmt.rc8(i32 %{{.*}}, i32 %{{.*}})
%r2 = nvvm.prmt #nvvm.permute_mode<rc8> %sel, %r1 : i32
// CHECK: call i32 @llvm.nvvm.prmt.f4e(i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}})
%r3 = nvvm.prmt #nvvm.permute_mode<f4e> %lo, %r2, %sel : i32
llvm.return %r3 : i32
}