1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -early-cse -earlycse-debug-hash -S -o - %s | FileCheck %s
4 declare double @atan2(double, double) #0
5 define double @f_atan2() {
6 ; CHECK-LABEL: @f_atan2(
7 ; CHECK-NEXT: [[RES:%.*]] = tail call fast double @atan2(double 1.000000e+00, double 2.000000e+00)
8 ; CHECK-NEXT: ret double 0x3FDDAC6{{.+}}
10 %res = tail call fast double @atan2(double 1.0, double 2.0)
14 declare float @fmodf(float, float) #0
15 define float @f_fmodf() {
16 ; CHECK-LABEL: @f_fmodf(
17 ; CHECK-NEXT: ret float 1.000000e+00
19 %res = tail call fast float @fmodf(float 1.0, float 2.0)
23 declare float @remainderf(float, float) #0
24 define float @f_remainderf_fold1() {
25 ; CHECK-LABEL: @f_remainderf_fold1(
26 ; CHECK-NEXT: ret float 1.000000e+00
28 %res = tail call fast float @remainderf(float 1.0, float 2.0)
32 define float @f_remainderf_fold2() {
33 ; CHECK-LABEL: @f_remainderf_fold2(
34 ; CHECK-NEXT: ret float -5.000000e-01
36 %res = tail call fast float @remainderf(float 1.5, float 1.0)
40 define float @f_remainderf_nofold() {
41 ; CHECK-LABEL: @f_remainderf_nofold(
42 ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @remainderf(float 1.000000e+00, float 0.000000e+00)
43 ; CHECK-NEXT: ret float [[RES]]
45 %res = tail call fast float @remainderf(float 1.0, float 0.0)
49 declare double @remainder(double, double) #0
50 define double @f_remainder_fold1() {
51 ; CHECK-LABEL: @f_remainder_fold1(
52 ; CHECK-NEXT: ret double 1.000000e+00
54 %res = tail call fast double @remainder(double 1.0, double 2.0)
58 define double @f_remainder_fold2() {
59 ; CHECK-LABEL: @f_remainder_fold2(
60 ; CHECK-NEXT: ret double -5.000000e-01
62 %res = tail call fast double @remainder(double 1.5, double 1.0)
66 define double @f_remainder_nofold() {
67 ; CHECK-LABEL: @f_remainder_nofold(
68 ; CHECK-NEXT: [[RES:%.*]] = tail call fast double @remainder(double 1.000000e+00, double 0.000000e+00)
69 ; CHECK-NEXT: ret double [[RES]]
71 %res = tail call fast double @remainder(double 1.0, double 0.0)
75 declare double @pow(double, double) #0
76 define double @f_pow() {
77 ; CHECK-LABEL: @f_pow(
78 ; CHECK-NEXT: ret double 1.000000e+00
80 %res = tail call fast double @pow(double 1.0, double 2.0)
84 declare float @llvm.pow.f32(float, float)
85 define float @i_powf() {
86 ; CHECK-LABEL: @i_powf(
87 ; CHECK-NEXT: ret float 1.000000e+00
89 %res = tail call fast float @llvm.pow.f32(float 1.0, float 2.0)
93 declare double @llvm.powi.f64.i32(double, i32)
94 define double @i_powi() {
95 ; CHECK-LABEL: @i_powi(
96 ; CHECK-NEXT: ret double 1.000000e+00
98 %res = tail call fast double @llvm.powi.f64.i32(double 1.0, i32 2)
102 attributes #0 = { nofree nounwind willreturn }