brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.4 KiB · 13d6545 Raw
222 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt < %s -passes=instcombine -mtriple x86_64-unknown-linux-gnu -S | FileCheck %s3 4define float @erff_const() {5; CHECK-LABEL: define float @erff_const() {6; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 5.000000e-01)7; CHECK-NEXT:    ret float 0x3FE0A7EF600000008;9  %r = call float @erff(float 5.000000e-01)10  ret float %r11}12 13define double @erf_const() {14; CHECK-LABEL: define double @erf_const() {15; CHECK-NEXT:    [[R:%.*]] = call double @erf(double -5.000000e-01)16; CHECK-NEXT:    ret double 0xBFE0A7EF5C18EDD217;18  %r = call double @erf(double -5.000000e-01)19  ret double %r20}21 22define float @erff_zero() {23; CHECK-LABEL: define float @erff_zero() {24; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0.000000e+00)25; CHECK-NEXT:    ret float 0.000000e+0026;27  %r = call float @erff(float 0.000000e+00)28  ret float %r29}30 31define double @erf_zero() {32; CHECK-LABEL: define double @erf_zero() {33; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0.000000e+00)34; CHECK-NEXT:    ret double 0.000000e+0035;36  %r = call double @erf(double 0.000000e+00)37  ret double %r38}39 40define float @erff_neg_zero() {41; CHECK-LABEL: define float @erff_neg_zero() {42; CHECK-NEXT:    [[R:%.*]] = call float @erff(float -0.000000e+00)43; CHECK-NEXT:    ret float -0.000000e+0044;45  %r = call float @erff(float -0.000000e+00)46  ret float %r47}48 49define double @erf_neg_zero() {50; CHECK-LABEL: define double @erf_neg_zero() {51; CHECK-NEXT:    [[R:%.*]] = call double @erf(double -0.000000e+00)52; CHECK-NEXT:    ret double -0.000000e+0053;54  %r = call double @erf(double -0.000000e+00)55  ret double %r56}57 58define float @erff_inf() {59; CHECK-LABEL: define float @erff_inf() {60; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0x7FF0000000000000)61; CHECK-NEXT:    ret float [[R]]62;63  %r = call float @erff(float 0x7FF0000000000000)64  ret float %r65}66 67define double @erf_inf() {68; CHECK-LABEL: define double @erf_inf() {69; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0x7FF0000000000000)70; CHECK-NEXT:    ret double [[R]]71;72  %r = call double @erf(double 0x7FF0000000000000)73  ret double %r74}75 76define float @erff_inf_memory_none() {77; CHECK-LABEL: define float @erff_inf_memory_none() {78; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0x7FF0000000000000) #[[ATTR1:[0-9]+]]79; CHECK-NEXT:    ret float [[R]]80;81  %r = call float @erff(float 0x7FF0000000000000) readnone82  ret float %r83}84 85define double @erf_inf_memory_none() {86; CHECK-LABEL: define double @erf_inf_memory_none() {87; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0x7FF0000000000000) #[[ATTR1]]88; CHECK-NEXT:    ret double [[R]]89;90  %r = call double @erf(double 0x7FF0000000000000) readnone91  ret double %r92}93 94define float @erff_neg_inf() {95; CHECK-LABEL: define float @erff_neg_inf() {96; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0xFFF0000000000000)97; CHECK-NEXT:    ret float [[R]]98;99  %r = call float @erff(float 0xFFF0000000000000)100  ret float %r101}102 103define double @erf_neg_inf() {104; CHECK-LABEL: define double @erf_neg_inf() {105; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0xFFF0000000000000)106; CHECK-NEXT:    ret double [[R]]107;108  %r = call double @erf(double 0xFFF0000000000000)109  ret double %r110}111 112define float @erff_neg_inf_memory_none() {113; CHECK-LABEL: define float @erff_neg_inf_memory_none() {114; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0xFFF0000000000000) #[[ATTR1]]115; CHECK-NEXT:    ret float [[R]]116;117  %r = call float @erff(float 0xFFF0000000000000) readnone118  ret float %r119}120 121define double @erf_neg_inf_memory_none() {122; CHECK-LABEL: define double @erf_neg_inf_memory_none() {123; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0xFFF0000000000000) #[[ATTR1]]124; CHECK-NEXT:    ret double [[R]]125;126  %r = call double @erf(double 0xFFF0000000000000) readnone127  ret double %r128}129 130define float @erff_nan() {131; CHECK-LABEL: define float @erff_nan() {132; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0x7FF8000000000000)133; CHECK-NEXT:    ret float [[R]]134;135  %r = call float @erff(float 0x7FF8000000000000)136  ret float %r137}138 139define double @erf_nan() {140; CHECK-LABEL: define double @erf_nan() {141; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0x7FF8000000000000)142; CHECK-NEXT:    ret double [[R]]143;144  %r = call double @erf(double 0x7FF8000000000000)145  ret double %r146}147 148define float @erff_nan_memory_none() {149; CHECK-LABEL: define float @erff_nan_memory_none() {150; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0x7FF8000000000000) #[[ATTR1]]151; CHECK-NEXT:    ret float [[R]]152;153  %r = call float @erff(float 0x7FF8000000000000) readnone154  ret float %r155}156 157define double @erf_nan_memory_none() {158; CHECK-LABEL: define double @erf_nan_memory_none() {159; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0x7FF8000000000000) #[[ATTR1]]160; CHECK-NEXT:    ret double [[R]]161;162  %r = call double @erf(double 0x7FF8000000000000) readnone163  ret double %r164}165 166define float @erff_poison() {167; CHECK-LABEL: define float @erff_poison() {168; CHECK-NEXT:    [[R:%.*]] = call float @erff(float poison)169; CHECK-NEXT:    ret float [[R]]170;171  %r = call float @erff(float poison)172  ret float %r173}174 175define double @erf_poison() {176; CHECK-LABEL: define double @erf_poison() {177; CHECK-NEXT:    [[R:%.*]] = call double @erf(double poison)178; CHECK-NEXT:    ret double [[R]]179;180  %r = call double @erf(double poison)181  ret double %r182}183 184define float @erff_const_strictfp() {185; CHECK-LABEL: define float @erff_const_strictfp() {186; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 5.000000e-01) #[[ATTR2:[0-9]+]]187; CHECK-NEXT:    ret float [[R]]188;189  %r = call float @erff(float 5.000000e-01) strictfp190  ret float %r191}192 193define double @erf_const_strictfp() {194; CHECK-LABEL: define double @erf_const_strictfp() {195; CHECK-NEXT:    [[R:%.*]] = call double @erf(double -5.000000e-01) #[[ATTR2]]196; CHECK-NEXT:    ret double [[R]]197;198  %r = call double @erf(double -5.000000e-01) strictfp199  ret double %r200}201 202define float @erff_nan_strictfp() {203; CHECK-LABEL: define float @erff_nan_strictfp() {204; CHECK-NEXT:    [[R:%.*]] = call float @erff(float 0x7FF8000000000000) #[[ATTR2]]205; CHECK-NEXT:    ret float [[R]]206;207  %r = call float @erff(float 0x7FF8000000000000) strictfp208  ret float %r209}210 211define double @erf_nan_strictfp() {212; CHECK-LABEL: define double @erf_nan_strictfp() {213; CHECK-NEXT:    [[R:%.*]] = call double @erf(double 0x7FF8000000000000) #[[ATTR2]]214; CHECK-NEXT:    ret double [[R]]215;216  %r = call double @erf(double 0x7FF8000000000000) strictfp217  ret double %r218}219 220declare float @erff(float) willreturn221declare double @erf(double) willreturn222