xref: /llvm-project/llvm/test/Transforms/InstCombine/win-fdim.ll (revision 3645c64d87a0e4576c1195281efa005e90b529b7)
1*3645c64dSbraw-lee; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2*3645c64dSbraw-lee; RUN: opt %s -passes=instcombine -S -mtriple=i386-pc-windows-msvc | FileCheck %s --check-prefixes=MSVC19
3*3645c64dSbraw-lee
4*3645c64dSbraw-leedefine double @fdim_double() {
5*3645c64dSbraw-lee; MSVC19-LABEL: define double @fdim_double() {
6*3645c64dSbraw-lee; MSVC19-NEXT:    ret double 2.500000e+00
7*3645c64dSbraw-lee;
8*3645c64dSbraw-lee  %dim = call double @fdim(double 10.5, double 8.0)
9*3645c64dSbraw-lee  ret double %dim
10*3645c64dSbraw-lee}
11*3645c64dSbraw-lee
12*3645c64dSbraw-lee;fdimf is not supported by windows
13*3645c64dSbraw-leedefine float @fdim_float() {
14*3645c64dSbraw-lee; MSVC19-LABEL: define float @fdim_float() {
15*3645c64dSbraw-lee; MSVC19-NEXT:    [[DIM:%.*]] = call float @fdimf(float 1.500000e+00, float 8.000000e+00)
16*3645c64dSbraw-lee; MSVC19-NEXT:    ret float [[DIM]]
17*3645c64dSbraw-lee;
18*3645c64dSbraw-lee  %dim = call float @fdimf(float 1.500000e+00, float 8.0)
19*3645c64dSbraw-lee  ret float %dim
20*3645c64dSbraw-lee}
21*3645c64dSbraw-lee
22*3645c64dSbraw-lee;fdiml is not supported by windows
23*3645c64dSbraw-leedefine fp128 @fdim_long() {
24*3645c64dSbraw-lee; MSVC19-LABEL: define fp128 @fdim_long() {
25*3645c64dSbraw-lee; MSVC19-NEXT:    [[DIM:%.*]] = call fp128 @fdiml(fp128 0xL00000000000000000000000000000000, fp128 0xL00000000000000000000000000000000)
26*3645c64dSbraw-lee; MSVC19-NEXT:    ret fp128 [[DIM]]
27*3645c64dSbraw-lee;
28*3645c64dSbraw-lee  %dim = call fp128 @fdiml(fp128  0xL00000000000000000000000000000000 , fp128 0xL00000000000000000000000000000000)
29*3645c64dSbraw-lee  ret fp128 %dim
30*3645c64dSbraw-lee}
31*3645c64dSbraw-lee
32*3645c64dSbraw-leedeclare double @fdim(double, double) #0
33*3645c64dSbraw-leedeclare float @fdimf(float, float) #0
34*3645c64dSbraw-leedeclare fp128 @fdiml(fp128, fp128) #0
35*3645c64dSbraw-lee
36*3645c64dSbraw-leeattributes #0 = { memory(none) }
37