-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
-
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
+; RUN: opt < %s -instcombine -S -mtriple x86_64-unknown-linux-gnu | FileCheck %s --check-prefixes=CHECK,YARP
+; RUN: opt < %s -instcombine -S -mtriple x86_64-pc-win32 | FileCheck %s --check-prefixes=CHECK,NOPE
; Check for and against shrinkage when using the
; unsafe-fp-math function attribute on a math lib
define float @acosh_test1(float %f) {
; CHECK-LABEL: @acosh_test1(
-; CHECK-NEXT: [[ACOSHF:%.*]] = call fast float @acoshf(float [[F:%.*]])
-; CHECK-NEXT: ret float [[ACOSHF]]
+; YARP-NEXT: [[ACOSHF:%.*]] = call fast float @acoshf(float [[F:%.*]])
+; YARP-NEXT: ret float [[ACOSHF]]
+; NOPE: [[ACOSHF:%.*]] = call fast double @acosh(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @acosh(double %conv)
define float @asinh_test1(float %f) {
; CHECK-LABEL: @asinh_test1(
-; CHECK-NEXT: [[ASINHF:%.*]] = call fast float @asinhf(float [[F:%.*]])
-; CHECK-NEXT: ret float [[ASINHF]]
+; YARP-NEXT: [[ASINHF:%.*]] = call fast float @asinhf(float [[F:%.*]])
+; YARP-NEXT: ret float [[ASINHF]]
+; NOPE: [[ASINHF:%.*]] = call fast double @asinh(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @asinh(double %conv)
define float @atanh_test1(float %f) {
; CHECK-LABEL: @atanh_test1(
-; CHECK-NEXT: [[ATANHF:%.*]] = call fast float @atanhf(float [[F:%.*]])
-; CHECK-NEXT: ret float [[ATANHF]]
+; YARP-NEXT: [[ATANHF:%.*]] = call fast float @atanhf(float [[F:%.*]])
+; YARP-NEXT: ret float [[ATANHF]]
+; NOPE: [[ATANHF:%.*]] = call fast double @atanh(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @atanh(double %conv)
define float @cbrt_test1(float %f) {
; CHECK-LABEL: @cbrt_test1(
-; CHECK-NEXT: [[CBRTF:%.*]] = call fast float @cbrtf(float [[F:%.*]])
-; CHECK-NEXT: ret float [[CBRTF]]
+; YARP-NEXT: [[CBRTF:%.*]] = call fast float @cbrtf(float [[F:%.*]])
+; YARP-NEXT: ret float [[CBRTF]]
+; NOPE: [[CBRTF:%.*]] = call fast double @cbrt(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @cbrt(double %conv)
define float @expm1_test1(float %f) {
; CHECK-LABEL: @expm1_test1(
-; CHECK-NEXT: [[EXPM1F:%.*]] = call fast float @expm1f(float [[F:%.*]])
-; CHECK-NEXT: ret float [[EXPM1F]]
+; YARP-NEXT: [[EXPM1F:%.*]] = call fast float @expm1f(float [[F:%.*]])
+; YARP-NEXT: ret float [[EXPM1F]]
+; NOPE: [[EXPM1F:%.*]] = call fast double @expm1(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @expm1(double %conv)
define float @log1p_test1(float %f) {
; CHECK-LABEL: @log1p_test1(
-; CHECK-NEXT: [[LOG1PF:%.*]] = call fast float @log1pf(float [[F:%.*]])
-; CHECK-NEXT: ret float [[LOG1PF]]
+; YARP-NEXT: [[LOG1PF:%.*]] = call fast float @log1pf(float [[F:%.*]])
+; YARP-NEXT: ret float [[LOG1PF]]
+; NOPE: [[LOG1PF:%.*]] = call fast double @log1p(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @log1p(double %conv)
define float @log2_test1(float %f) {
; CHECK-LABEL: @log2_test1(
-; CHECK-NEXT: [[LOG2F:%.*]] = call fast float @log2f(float [[F:%.*]])
-; CHECK-NEXT: ret float [[LOG2F]]
+; YARP-NEXT: [[LOG2F:%.*]] = call fast float @log2f(float [[F:%.*]])
+; YARP-NEXT: ret float [[LOG2F]]
+; NOPE: [[LOG2F:%.*]] = call fast double @log2(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @log2(double %conv)
define float @logb_test1(float %f) {
; CHECK-LABEL: @logb_test1(
-; CHECK-NEXT: [[LOGBF:%.*]] = call fast float @logbf(float [[F:%.*]])
-; CHECK-NEXT: ret float [[LOGBF]]
+; YARP-NEXT: [[LOGBF:%.*]] = call fast float @logbf(float [[F:%.*]])
+; YARP-NEXT: ret float [[LOGBF]]
+; NOPE: [[LOGBF:%.*]] = call fast double @logb(double [[F:%.*]])
;
%conv = fpext float %f to double
%call = call fast double @logb(double %conv)