Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/Attributor/nofpclass-powi.ll
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

507 lines
25 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
declare float @llvm.powi.f32.i32(float, i32)
declare float @llvm.powi.f32.i64(float, i64)
declare <2 x float> @llvm.powi.v2f32.v2i32(<2 x float>, <2 x i32>)
declare <4 x float> @llvm.powi.v4f32.i32(<4 x float>, i32)
define float @ret_powi_f32(float %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32
; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1:[0-9]+]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float [[ARG0]], i32 [[ARG1]]) #[[ATTR6:[0-9]+]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_i64(float %arg0, i64 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_i64
; CHECK-SAME: (float [[ARG0:%.*]], i64 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i64(float [[ARG0]], i64 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i64(float %arg0, i64 %arg1)
ret float %call
}
define <2 x float> @ret_powi_v2f32(<2 x float> %arg0, <2 x i32> %arg1) #0 {
; CHECK-LABEL: define <2 x float> @ret_powi_v2f32
; CHECK-SAME: (<2 x float> [[ARG0:%.*]], <2 x i32> [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret <2 x float> [[CALL]]
;
%call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> %arg1)
ret <2 x float> %call
}
define float @ret_powi_f32_odd_constant(float %arg0) #0 {
; CHECK-LABEL: define float @ret_powi_f32_odd_constant
; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float [[ARG0]], i32 noundef 3) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 3)
ret float %call
}
define float @ret_powi_f32_even_constant(float %arg0) #0 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_even_constant
; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float [[ARG0]], i32 noundef 4) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 4)
ret float %call
}
define float @ret_powi_f32_0(float %arg0) #0 {
; CHECK-LABEL: define nofpclass(inf zero sub nnorm) float @ret_powi_f32_0
; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf zero sub nnorm) float @llvm.powi.f32.i32(float [[ARG0]], i32 noundef 0) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 0)
ret float %call
}
define float @ret_powi_f32_0_no_snan(float nofpclass(snan) %arg0) #0 {
; CHECK-LABEL: define nofpclass(nan inf zero sub nnorm) float @ret_powi_f32_0_no_snan
; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan inf zero sub nnorm) float @llvm.powi.f32.i32(float nofpclass(snan) [[ARG0]], i32 noundef 0) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 0)
ret float %call
}
define float @ret_powi_f32_0_no_qnan(float nofpclass(qnan) %arg0) #0 {
; CHECK-LABEL: define nofpclass(inf zero sub nnorm) float @ret_powi_f32_0_no_qnan
; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf zero sub nnorm) float @llvm.powi.f32.i32(float nofpclass(qnan) [[ARG0]], i32 noundef 0) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 0)
ret float %call
}
define float @ret_powi_f32_0_no_nan(float nofpclass(nan) %arg0) #0 {
; CHECK-LABEL: define nofpclass(nan inf zero sub nnorm) float @ret_powi_f32_0_no_nan
; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan inf zero sub nnorm) float @llvm.powi.f32.i32(float nofpclass(nan) [[ARG0]], i32 noundef 0) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 0)
ret float %call
}
define float @ret_powi_f32_1(float nofpclass(snan) %arg0) #0 {
; CHECK-LABEL: define nofpclass(snan) float @ret_powi_f32_1
; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan) float @llvm.powi.f32.i32(float nofpclass(snan) [[ARG0]], i32 noundef 1) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 1)
ret float %call
}
define float @ret_powi_f32_neg1(float nofpclass(snan) %arg0) #0 {
; CHECK-LABEL: define nofpclass(snan) float @ret_powi_f32_neg1
; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan) float @llvm.powi.f32.i32(float nofpclass(snan) [[ARG0]], i32 noundef -1) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 -1)
ret float %call
}
define float @ret_powi_f32_no_snan(float nofpclass(snan) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(snan) float @ret_powi_f32_no_snan
; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan) float @llvm.powi.f32.i32(float nofpclass(snan) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_qnan(float nofpclass(qnan) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_no_qnan
; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(qnan) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_nan(float nofpclass(nan) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(nan) float @ret_powi_f32_no_nan
; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.powi.f32.i32(float nofpclass(nan) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_inf(float nofpclass(inf) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_no_inf
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(inf) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_finite_exp_one(float nofpclass(inf) %arg0) #0 {
; CHECK-LABEL: define nofpclass(inf) float @ret_powi_f32_finite_exp_one
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.powi.f32.i32(float nofpclass(inf) [[ARG0]], i32 noundef 1) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 1)
ret float %call
}
define float @ret_powi_f32_finite_exp_two(float nofpclass(nan inf) %arg0) #0 {
; CHECK-LABEL: define nofpclass(nan ninf nzero nsub nnorm) float @ret_powi_f32_finite_exp_two
; CHECK-SAME: (float nofpclass(nan inf) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(nan inf) [[ARG0]], i32 noundef 2) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 2)
ret float %call
}
define float @ret_powi_f32_normal_exp_neg_one(float nofpclass(inf zero sub) %arg0) #0 {
; CHECK-LABEL: define nofpclass(inf) float @ret_powi_f32_normal_exp_neg_one
; CHECK-SAME: (float nofpclass(inf zero sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.powi.f32.i32(float nofpclass(inf zero sub) [[ARG0]], i32 noundef -1) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 -1)
ret float %call
}
define float @ret_powi_f32_inf_or_nan_exp_neg_one(float nofpclass(zero norm sub) %arg0) #0 {
; CHECK-LABEL: define nofpclass(inf) float @ret_powi_f32_inf_or_nan_exp_neg_one
; CHECK-SAME: (float nofpclass(zero sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.powi.f32.i32(float nofpclass(zero sub norm) [[ARG0]], i32 noundef -1) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 -1)
ret float %call
}
define float @ret_powi_f32_zero_or_nan_exp_nonnegative(float nofpclass(inf norm sub) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(inf) float @ret_powi_f32_zero_or_nan_exp_nonnegative
; CHECK-SAME: (float nofpclass(inf sub norm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[NONNEG:%.*]] = and i32 [[ARG1]], 2147483647
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.powi.f32.i32(float nofpclass(inf sub norm) [[ARG0]], i32 [[NONNEG]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%nonneg = and i32 %arg1, 2147483647
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %nonneg)
ret float %call
}
define float @ret_powi_f32_no_nan_inf(float nofpclass(nan inf) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(nan) float @ret_powi_f32_no_nan_inf
; CHECK-SAME: (float nofpclass(nan inf) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.powi.f32.i32(float nofpclass(nan inf) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_nan__arg1_non0(float nofpclass(nan) %arg0, i32 range(i32 1, 256) %arg1) #0 {
; CHECK-LABEL: define nofpclass(nan) float @ret_powi_f32_no_nan__arg1_non0
; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]], i32 range(i32 1, 256) [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.powi.f32.i32(float nofpclass(nan) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_nan_no_zero__arg1_non0(float nofpclass(nan zero) %arg0, i32 range(i32 1, 256) %arg1) #0 {
; CHECK-LABEL: define nofpclass(nan) float @ret_powi_f32_no_nan_no_zero__arg1_non0
; CHECK-SAME: (float nofpclass(nan zero) [[ARG0:%.*]], i32 range(i32 1, 256) [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.powi.f32.i32(float nofpclass(nan zero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_nan_no_zero__arg1__ieee(float nofpclass(nan zero) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(nan) float @ret_powi_f32_no_nan_no_zero__arg1__ieee
; CHECK-SAME: (float nofpclass(nan zero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.powi.f32.i32(float nofpclass(nan zero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_nan_no_zero__arg1__daz(float nofpclass(nan zero) %arg0, i32 %arg1) #1 {
; CHECK-LABEL: define nofpclass(nan) float @ret_powi_f32_no_nan_no_zero__arg1__daz
; CHECK-SAME: (float nofpclass(nan zero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2:[0-9]+]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.powi.f32.i32(float nofpclass(nan zero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_no_nan_no_zero_nosub__arg1__daz(float nofpclass(nan zero sub) %arg0, i32 %arg1) #1 {
; CHECK-LABEL: define nofpclass(nan) float @ret_powi_f32_no_nan_no_zero_nosub__arg1__daz
; CHECK-SAME: (float nofpclass(nan zero sub) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.powi.f32.i32(float nofpclass(nan zero sub) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define <2 x float> @ret_powi_v2f32_even_nonsplat(<2 x float> %arg0) #0 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) <2 x float> @ret_powi_v2f32_even_nonsplat
; CHECK-SAME: (<2 x float> [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> noundef <i32 2, i32 4>) #[[ATTR6]]
; CHECK-NEXT: ret <2 x float> [[CALL]]
;
%call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> <i32 2, i32 4>)
ret <2 x float> %call
}
define <2 x float> @ret_powi_v2f32_odd_nonsplat(<2 x float> %arg0) #0 {
; CHECK-LABEL: define <2 x float> @ret_powi_v2f32_odd_nonsplat
; CHECK-SAME: (<2 x float> [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> noundef <i32 3, i32 4>) #[[ATTR6]]
; CHECK-NEXT: ret <2 x float> [[CALL]]
;
%call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> <i32 3, i32 4>)
ret <2 x float> %call
}
define float @ret_powi_f32_masked_to_even(float %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_masked_to_even
; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[KNOWN_EVEN:%.*]] = and i32 [[ARG1]], -2
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float [[ARG0]], i32 [[KNOWN_EVEN]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%known.even = and i32 %arg1, -2
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %known.even)
ret float %call
}
define float @ret_powi_f32_masked_to_even_extrabits(float %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_masked_to_even_extrabits
; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[KNOWN_EVEN:%.*]] = and i32 [[ARG1]], -4
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float [[ARG0]], i32 [[KNOWN_EVEN]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%known.even = and i32 %arg1, -4
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %known.even)
ret float %call
}
define <2 x float> @ret_powi_v2f32_masked_to_even(<2 x float> %arg0, <2 x i32> %arg1) #0 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) <2 x float> @ret_powi_v2f32_masked_to_even
; CHECK-SAME: (<2 x float> [[ARG0:%.*]], <2 x i32> [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[KNOWN_EVEN:%.*]] = and <2 x i32> [[ARG1]], splat (i32 -2)
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> [[KNOWN_EVEN]]) #[[ATTR6]]
; CHECK-NEXT: ret <2 x float> [[CALL]]
;
%known.even = and <2 x i32> %arg1, <i32 -2, i32 -2>
%call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> %known.even)
ret <2 x float> %call
}
define float @ret_powi_f32_noneg(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_noneg
; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noneg_nonzero(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero
; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noneg_nozero(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_noneg_nozero
; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_nonzero(float nofpclass(nzero) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_nonzero
; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(nzero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_nopzero(float nofpclass(pzero) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_nopzero
; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(pzero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noneg_ftz_daz(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #1 {
; CHECK-LABEL: define float @ret_powi_f32_noneg_ftz_daz
; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noneg_nonzero_ftz_daz(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #1 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero_ftz_daz
; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noneg_nonzero_ftpz_dapz(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #2 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero_ftpz_dapz
; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR3:[0-9]+]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noninf_nonnorm(float nofpclass(ninf nnorm) %arg0, i32 %arg1) #0 {
; CHECK-LABEL: define float @ret_powi_f32_noninf_nonnorm
; CHECK-SAME: (float nofpclass(ninf nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noninf_nonnorm_ftz_daz(float nofpclass(ninf nnorm) %arg0, i32 %arg1) #1 {
; CHECK-LABEL: define float @ret_powi_f32_noninf_nonnorm_ftz_daz
; CHECK-SAME: (float nofpclass(ninf nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noneg_ftz_ieee(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #3 {
; CHECK-LABEL: define float @ret_powi_f32_noneg_ftz_ieee
; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR4:[0-9]+]] {
; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define float @ret_powi_f32_noneg_nonzero_ftz_ieee(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #3 {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero_ftz_ieee
; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR4]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)
ret float %call
}
define <4 x float> @powi_v4f32_i32(<4 x float> %arg0, i32 %arg1) {
; CHECK-LABEL: define <4 x float> @powi_v4f32_i32
; CHECK-SAME: (<4 x float> [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR5:[0-9]+]] {
; CHECK-NEXT: [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret <4 x float> [[POWI]]
;
%powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg0, i32 %arg1)
ret <4 x float> %powi
}
define <4 x float> @powi_v4f32_i32_nozero(<4 x float> nofpclass(zero) %arg0, i32 %arg1) {
; CHECK-LABEL: define <4 x float> @powi_v4f32_i32_nozero
; CHECK-SAME: (<4 x float> nofpclass(zero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR5]] {
; CHECK-NEXT: [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> nofpclass(zero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]
; CHECK-NEXT: ret <4 x float> [[POWI]]
;
%powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg0, i32 %arg1)
ret <4 x float> %powi
}
define <4 x float> @powi_v4f32_i32_constint_even(<4 x float> %arg) {
; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) <4 x float> @powi_v4f32_i32_constint_even
; CHECK-SAME: (<4 x float> [[ARG:%.*]]) #[[ATTR5]] {
; CHECK-NEXT: [[POWI:%.*]] = call nofpclass(ninf nzero nsub nnorm) <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG]], i32 noundef 4) #[[ATTR6]]
; CHECK-NEXT: ret <4 x float> [[POWI]]
;
%powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg, i32 4)
ret <4 x float> %powi
}
define <4 x float> @powi_v4f32_i32_constint_odd(<4 x float> %arg) {
; CHECK-LABEL: define <4 x float> @powi_v4f32_i32_constint_odd
; CHECK-SAME: (<4 x float> [[ARG:%.*]]) #[[ATTR5]] {
; CHECK-NEXT: [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG]], i32 noundef 3) #[[ATTR6]]
; CHECK-NEXT: ret <4 x float> [[POWI]]
;
%powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg, i32 3)
ret <4 x float> %powi
}
define <4 x float> @powi_v4f32_i32_regression(<4 x float> %arg) {
; CHECK-LABEL: define nofpclass(nzero) <4 x float> @powi_v4f32_i32_regression
; CHECK-SAME: (<4 x float> [[ARG:%.*]]) #[[ATTR5]] {
; CHECK-NEXT: [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG]], i32 noundef 4) #[[ATTR6]]
; CHECK-NEXT: [[USER:%.*]] = fsub <4 x float> [[POWI]], splat (float 1.000000e+00)
; CHECK-NEXT: ret <4 x float> [[USER]]
;
%powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg, i32 4)
%user = fsub <4 x float> %powi, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
ret <4 x float> %user
}
attributes #0 = { denormal_fpenv(ieee|ieee) }
attributes #1 = { denormal_fpenv(preservesign) }
attributes #2 = { denormal_fpenv(positivezero|positivezero) }
attributes #3 = { denormal_fpenv(preservesign|ieee) }
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; TUNIT: {{.*}}