ret float %rint
}
+define float @floor_trunc(float %x) {
+; CHECK-LABEL: @floor_trunc(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.trunc.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.floor.f32(float %x)
+ %r = call float @llvm.trunc.f32(float %a)
+ ret float %r
+}
+
+define float @floor_ceil(float %x) {
+; CHECK-LABEL: @floor_ceil(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.ceil.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.floor.f32(float %x)
+ %r = call float @llvm.ceil.f32(float %a)
+ ret float %r
+}
+
+define float @floor_round(float %x) {
+; CHECK-LABEL: @floor_round(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.round.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.floor.f32(float %x)
+ %r = call float @llvm.round.f32(float %a)
+ ret float %r
+}
+
+define float @floor_roundeven(float %x) {
+; CHECK-LABEL: @floor_roundeven(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.roundeven.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.floor.f32(float %x)
+ %r = call float @llvm.roundeven.f32(float %a)
+ ret float %r
+}
+
+define float @floor_nearbyint(float %x) {
+; CHECK-LABEL: @floor_nearbyint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.nearbyint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.floor.f32(float %x)
+ %r = call float @llvm.nearbyint.f32(float %a)
+ ret float %r
+}
+
+define float @floor_rint(float %x) {
+; CHECK-LABEL: @floor_rint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.rint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.floor.f32(float %x)
+ %r = call float @llvm.rint.f32(float %a)
+ ret float %r
+}
+
+define float @trunc_floor(float %x) {
+; CHECK-LABEL: @trunc_floor(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.trunc.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.floor.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.trunc.f32(float %x)
+ %r = call float @llvm.floor.f32(float %a)
+ ret float %r
+}
+
+define float @trunc_ceil(float %x) {
+; CHECK-LABEL: @trunc_ceil(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.trunc.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.ceil.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.trunc.f32(float %x)
+ %r = call float @llvm.ceil.f32(float %a)
+ ret float %r
+}
+
+define float @trunc_round(float %x) {
+; CHECK-LABEL: @trunc_round(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.trunc.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.round.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.trunc.f32(float %x)
+ %r = call float @llvm.round.f32(float %a)
+ ret float %r
+}
+
+define float @trunc_roundeven(float %x) {
+; CHECK-LABEL: @trunc_roundeven(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.trunc.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.roundeven.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.trunc.f32(float %x)
+ %r = call float @llvm.roundeven.f32(float %a)
+ ret float %r
+}
+
+define float @trunc_nearbyint(float %x) {
+; CHECK-LABEL: @trunc_nearbyint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.trunc.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.nearbyint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.trunc.f32(float %x)
+ %r = call float @llvm.nearbyint.f32(float %a)
+ ret float %r
+}
+
+define float @trunc_rint(float %x) {
+; CHECK-LABEL: @trunc_rint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.trunc.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.rint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.trunc.f32(float %x)
+ %r = call float @llvm.rint.f32(float %a)
+ ret float %r
+}
+
+define float @ceil_floor(float %x) {
+; CHECK-LABEL: @ceil_floor(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.floor.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.ceil.f32(float %x)
+ %r = call float @llvm.floor.f32(float %a)
+ ret float %r
+}
+
+define float @ceil_trunc(float %x) {
+; CHECK-LABEL: @ceil_trunc(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.trunc.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.ceil.f32(float %x)
+ %r = call float @llvm.trunc.f32(float %a)
+ ret float %r
+}
+
+define float @ceil_round(float %x) {
+; CHECK-LABEL: @ceil_round(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.round.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.ceil.f32(float %x)
+ %r = call float @llvm.round.f32(float %a)
+ ret float %r
+}
+
+define float @ceil_roundeven(float %x) {
+; CHECK-LABEL: @ceil_roundeven(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.roundeven.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.ceil.f32(float %x)
+ %r = call float @llvm.roundeven.f32(float %a)
+ ret float %r
+}
+
+define float @ceil_nearbyint(float %x) {
+; CHECK-LABEL: @ceil_nearbyint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.nearbyint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.ceil.f32(float %x)
+ %r = call float @llvm.nearbyint.f32(float %a)
+ ret float %r
+}
+
+define float @ceil_rint(float %x) {
+; CHECK-LABEL: @ceil_rint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.rint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.ceil.f32(float %x)
+ %r = call float @llvm.rint.f32(float %a)
+ ret float %r
+}
+
+define float @round_floor(float %x) {
+; CHECK-LABEL: @round_floor(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.round.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.floor.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.round.f32(float %x)
+ %r = call float @llvm.floor.f32(float %a)
+ ret float %r
+}
+
+define float @round_trunc(float %x) {
+; CHECK-LABEL: @round_trunc(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.round.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.trunc.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.round.f32(float %x)
+ %r = call float @llvm.trunc.f32(float %a)
+ ret float %r
+}
+
+define float @round_ceil(float %x) {
+; CHECK-LABEL: @round_ceil(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.round.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.ceil.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.round.f32(float %x)
+ %r = call float @llvm.ceil.f32(float %a)
+ ret float %r
+}
+
+define float @round_roundeven(float %x) {
+; CHECK-LABEL: @round_roundeven(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.round.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.roundeven.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.round.f32(float %x)
+ %r = call float @llvm.roundeven.f32(float %a)
+ ret float %r
+}
+
+define float @round_nearbyint(float %x) {
+; CHECK-LABEL: @round_nearbyint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.round.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.nearbyint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.round.f32(float %x)
+ %r = call float @llvm.nearbyint.f32(float %a)
+ ret float %r
+}
+
+define float @round_rint(float %x) {
+; CHECK-LABEL: @round_rint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.round.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.rint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.round.f32(float %x)
+ %r = call float @llvm.rint.f32(float %a)
+ ret float %r
+}
+
+define float @roundeven_floor(float %x) {
+; CHECK-LABEL: @roundeven_floor(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.roundeven.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.floor.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.roundeven.f32(float %x)
+ %r = call float @llvm.floor.f32(float %a)
+ ret float %r
+}
+
+define float @roundeven_trunc(float %x) {
+; CHECK-LABEL: @roundeven_trunc(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.roundeven.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.trunc.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.roundeven.f32(float %x)
+ %r = call float @llvm.trunc.f32(float %a)
+ ret float %r
+}
+
+define float @roundeven_ceil(float %x) {
+; CHECK-LABEL: @roundeven_ceil(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.roundeven.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.ceil.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.roundeven.f32(float %x)
+ %r = call float @llvm.ceil.f32(float %a)
+ ret float %r
+}
+
+define float @roundeven_round(float %x) {
+; CHECK-LABEL: @roundeven_round(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.roundeven.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.round.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.roundeven.f32(float %x)
+ %r = call float @llvm.round.f32(float %a)
+ ret float %r
+}
+
+define float @roundeven_nearbyint(float %x) {
+; CHECK-LABEL: @roundeven_nearbyint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.roundeven.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.nearbyint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.roundeven.f32(float %x)
+ %r = call float @llvm.nearbyint.f32(float %a)
+ ret float %r
+}
+
+define float @roundeven_rint(float %x) {
+; CHECK-LABEL: @roundeven_rint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.roundeven.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.rint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.roundeven.f32(float %x)
+ %r = call float @llvm.rint.f32(float %a)
+ ret float %r
+}
+
+define float @nearbyint_floor(float %x) {
+; CHECK-LABEL: @nearbyint_floor(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.nearbyint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.floor.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.nearbyint.f32(float %x)
+ %r = call float @llvm.floor.f32(float %a)
+ ret float %r
+}
+
+define float @nearbyint_trunc(float %x) {
+; CHECK-LABEL: @nearbyint_trunc(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.nearbyint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.trunc.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.nearbyint.f32(float %x)
+ %r = call float @llvm.trunc.f32(float %a)
+ ret float %r
+}
+
+define float @nearbyint_ceil(float %x) {
+; CHECK-LABEL: @nearbyint_ceil(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.nearbyint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.ceil.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.nearbyint.f32(float %x)
+ %r = call float @llvm.ceil.f32(float %a)
+ ret float %r
+}
+
+define float @nearbyint_round(float %x) {
+; CHECK-LABEL: @nearbyint_round(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.nearbyint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.round.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.nearbyint.f32(float %x)
+ %r = call float @llvm.round.f32(float %a)
+ ret float %r
+}
+
+define float @nearbyint_roundeven(float %x) {
+; CHECK-LABEL: @nearbyint_roundeven(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.nearbyint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.roundeven.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.nearbyint.f32(float %x)
+ %r = call float @llvm.roundeven.f32(float %a)
+ ret float %r
+}
+
+define float @nearbyint_rint(float %x) {
+; CHECK-LABEL: @nearbyint_rint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.nearbyint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.rint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.nearbyint.f32(float %x)
+ %r = call float @llvm.rint.f32(float %a)
+ ret float %r
+}
+
+define float @rint_floor(float %x) {
+; CHECK-LABEL: @rint_floor(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.rint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.floor.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.rint.f32(float %x)
+ %r = call float @llvm.floor.f32(float %a)
+ ret float %r
+}
+
+define float @rint_trunc(float %x) {
+; CHECK-LABEL: @rint_trunc(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.rint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.trunc.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.rint.f32(float %x)
+ %r = call float @llvm.trunc.f32(float %a)
+ ret float %r
+}
+
+define float @rint_ceil(float %x) {
+; CHECK-LABEL: @rint_ceil(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.rint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.ceil.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.rint.f32(float %x)
+ %r = call float @llvm.ceil.f32(float %a)
+ ret float %r
+}
+
+define float @rint_round(float %x) {
+; CHECK-LABEL: @rint_round(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.rint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.round.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.rint.f32(float %x)
+ %r = call float @llvm.round.f32(float %a)
+ ret float %r
+}
+
+define float @rint_roundeven(float %x) {
+; CHECK-LABEL: @rint_roundeven(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.rint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.roundeven.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.rint.f32(float %x)
+ %r = call float @llvm.roundeven.f32(float %a)
+ ret float %r
+}
+
+define float @rint_nearbyint(float %x) {
+; CHECK-LABEL: @rint_nearbyint(
+; CHECK-NEXT: [[A:%.*]] = call float @llvm.rint.f32(float [[X:%.*]])
+; CHECK-NEXT: [[R:%.*]] = call float @llvm.nearbyint.f32(float [[A]])
+; CHECK-NEXT: ret float [[R]]
+;
+ %a = call float @llvm.rint.f32(float %x)
+ %r = call float @llvm.nearbyint.f32(float %a)
+ ret float %r
+}
+
declare float @llvm.floor.f32(float) #0
declare float @llvm.trunc.f32(float) #0
declare float @llvm.ceil.f32(float) #0