|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 |
2 | 2 | ; RUN: opt < %s -passes=instcombine -S | FileCheck %s |
3 | 3 |
|
4 | | -define float @tgammaf_const() { |
5 | | -; CHECK-LABEL: define float @tgammaf_const() { |
| 4 | +define float @tgammaf_in_range() { |
| 5 | +; CHECK-LABEL: define float @tgammaf_in_range() { |
6 | 6 | ; CHECK-NEXT: ret float 0x479A216280000000 |
7 | 7 | ; |
8 | 8 | %r = call float @tgammaf(float 34.0) |
9 | 9 | ret float %r |
10 | 10 | } |
11 | 11 |
|
12 | | -define double @tgamma_const() { |
13 | | -; CHECK-LABEL: define double @tgamma_const() { |
| 12 | +define double @tgamma_in_range() { |
| 13 | +; CHECK-LABEL: define double @tgamma_in_range() { |
14 | 14 | ; CHECK-NEXT: ret double 0x605166C698CF183B |
15 | 15 | ; |
16 | 16 | %r = call double @tgamma(double 100.0) |
17 | 17 | ret double %r |
18 | 18 | } |
19 | 19 |
|
20 | | -define float @tgammaf_const_overflow() { |
21 | | -; CHECK-LABEL: define float @tgammaf_const_overflow() { |
| 20 | +define float @tgammaf_const_left_range() { |
| 21 | +; CHECK-LABEL: define float @tgammaf_const_left_range() { |
| 22 | +; CHECK-NEXT: [[R:%.*]] = call float @tgammaf(float 0x3810000000000000) |
| 23 | +; CHECK-NEXT: ret float [[R]] |
| 24 | +; |
| 25 | + %r = call float @tgammaf(float 0x3810000000000000) |
| 26 | + ret float %r |
| 27 | +} |
| 28 | + |
| 29 | +define double @tgamma_const_left_range() { |
| 30 | +; CHECK-LABEL: define double @tgamma_const_left_range() { |
| 31 | +; CHECK-NEXT: [[R:%.*]] = call double @tgamma(double 0x10000000000000) |
| 32 | +; CHECK-NEXT: ret double [[R]] |
| 33 | +; |
| 34 | + %r = call double @tgamma(double 0x0010000000000000) |
| 35 | + ret double %r |
| 36 | +} |
| 37 | + |
| 38 | +define float @tgammaf_const_right_range() { |
| 39 | +; CHECK-LABEL: define float @tgammaf_const_right_range() { |
22 | 40 | ; CHECK-NEXT: [[R:%.*]] = call float @tgammaf(float 3.600000e+01) |
23 | 41 | ; CHECK-NEXT: ret float [[R]] |
24 | 42 | ; |
25 | 43 | %r = call float @tgammaf(float 36.0) |
26 | 44 | ret float %r |
27 | 45 | } |
28 | 46 |
|
29 | | -define double @tgamma_const_overflow() { |
30 | | -; CHECK-LABEL: define double @tgamma_const_overflow() { |
| 47 | +define double @tgamma_const_right_range() { |
| 48 | +; CHECK-LABEL: define double @tgamma_const_right_range() { |
31 | 49 | ; CHECK-NEXT: [[R:%.*]] = call double @tgamma(double 1.720000e+02) |
32 | 50 | ; CHECK-NEXT: ret double [[R]] |
33 | 51 | ; |
|
0 commit comments