blob: 9305a02e4e44749269bd9455e5b9ece3223f38c1 [file] [log] [blame]
; 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.trunc.f32(float)
declare ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128)
define float @ret_trunc(float %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc
; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_noinf(float nofpclass(inf) %arg0) {
; CHECK-LABEL: define nofpclass(inf sub) float @ret_trunc_noinf
; CHECK-SAME: (float nofpclass(inf sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nopinf(float nofpclass(pinf) %arg0) {
; CHECK-LABEL: define nofpclass(pinf sub) float @ret_trunc_nopinf
; CHECK-SAME: (float nofpclass(pinf sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_noninf(float nofpclass(ninf) %arg0) {
; CHECK-LABEL: define nofpclass(ninf sub) float @ret_trunc_noninf
; CHECK-SAME: (float nofpclass(ninf sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonan(float nofpclass(nan) %arg0) {
; CHECK-LABEL: define nofpclass(nan sub) float @ret_trunc_nonan
; CHECK-SAME: (float nofpclass(nan sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_noqnan(float nofpclass(qnan) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_noqnan
; CHECK-SAME: (float nofpclass(qnan sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nosnan(float nofpclass(snan) %arg0) {
; CHECK-LABEL: define nofpclass(snan sub) float @ret_trunc_nosnan
; CHECK-SAME: (float nofpclass(snan sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nozero(float nofpclass(zero) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nozero
; CHECK-SAME: (float nofpclass(zero sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nopzero(float nofpclass(pzero) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopzero
; CHECK-SAME: (float nofpclass(pzero sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonzero(float nofpclass(nzero) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonzero
; CHECK-SAME: (float nofpclass(nzero sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonorm(float nofpclass(norm) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonorm
; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonnorm(float nofpclass(nnorm) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonnorm
; CHECK-SAME: (float nofpclass(sub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nopnorm(float nofpclass(pnorm) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm
; CHECK-SAME: (float nofpclass(sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonsub(float nofpclass(nsub) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonsub
; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nopsub(float nofpclass(psub) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopsub
; CHECK-SAME: (float nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonorm_nosub(float nofpclass(norm sub) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonorm_nosub
; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm_nopsub
; CHECK-SAME: (float nofpclass(sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonnorm_nonsub
; CHECK-SAME: (float nofpclass(sub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm_nonsub
; CHECK-SAME: (float nofpclass(sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define ppc_fp128 @ret_trunc_ppcf128(ppc_fp128 %arg0) {
; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_trunc_ppcf128
; CHECK-SAME: (ppc_fp128 nofpclass(sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret ppc_fp128 [[CALL]]
;
%call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
ret ppc_fp128 %call
}
define ppc_fp128 @ret_trunc_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) {
; CHECK-LABEL: define nofpclass(inf sub) ppc_fp128 @ret_trunc_noinf_ppcf128
; CHECK-SAME: (ppc_fp128 nofpclass(inf sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret ppc_fp128 [[CALL]]
;
%call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
ret ppc_fp128 %call
}
define ppc_fp128 @ret_trunc_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) {
; CHECK-LABEL: define nofpclass(pinf sub) ppc_fp128 @ret_trunc_nopinf_ppcf128
; CHECK-SAME: (ppc_fp128 nofpclass(pinf sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret ppc_fp128 [[CALL]]
;
%call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
ret ppc_fp128 %call
}
define ppc_fp128 @ret_trunc_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) {
; CHECK-LABEL: define nofpclass(ninf sub) ppc_fp128 @ret_trunc_noninf_ppcf128
; CHECK-SAME: (ppc_fp128 nofpclass(ninf sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret ppc_fp128 [[CALL]]
;
%call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
ret ppc_fp128 %call
}
define ppc_fp128 @ret_trunc_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) {
; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_trunc_nonan_ppcf128
; CHECK-SAME: (ppc_fp128 nofpclass(nan sub) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret ppc_fp128 [[CALL]]
;
%call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0)
ret ppc_fp128 %call
}
define float @ret_trunc_nopzero_nopnorm(float nofpclass(pzero pnorm) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopzero_nopnorm
; CHECK-SAME: (float nofpclass(pzero sub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nonzero_nonnorm(float nofpclass(nzero nnorm) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonzero_nonnorm
; CHECK-SAME: (float nofpclass(nzero sub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
define float @ret_trunc_nozero_nonorm(float nofpclass(zero norm) %arg0) {
; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nozero_nonorm
; CHECK-SAME: (float nofpclass(zero sub norm) [[ARG0:%.*]]) #[[ATTR1]] {
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]]
; CHECK-NEXT: ret float [[CALL]]
;
%call = call float @llvm.trunc.f32(float %arg0)
ret float %call
}
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; TUNIT: {{.*}}