1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=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: ret double 0x3FDDAC6{{.+}}
9 %res = tail call fast double @atan2(double 1.0, double 2.0)
13 declare float @fmodf(float, float) #0
14 define float @f_fmodf() {
15 ; CHECK-LABEL: @f_fmodf(
16 ; CHECK-NEXT: ret float 1.000000e+00
18 %res = tail call fast float @fmodf(float 1.0, float 2.0)
22 declare float @remainderf(float, float) #0
23 define float @f_remainderf_fold1() {
24 ; CHECK-LABEL: @f_remainderf_fold1(
25 ; CHECK-NEXT: ret float 1.000000e+00
27 %res = tail call fast float @remainderf(float 1.0, float 2.0)
31 define float @f_remainderf_fold2() {
32 ; CHECK-LABEL: @f_remainderf_fold2(
33 ; CHECK-NEXT: ret float -5.000000e-01
35 %res = tail call fast float @remainderf(float 1.5, float 1.0)
39 define float @f_remainderf_nofold() {
40 ; CHECK-LABEL: @f_remainderf_nofold(
41 ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @remainderf(float 1.000000e+00, float 0.000000e+00)
42 ; CHECK-NEXT: ret float [[RES]]
44 %res = tail call fast float @remainderf(float 1.0, float 0.0)
48 declare double @remainder(double, double) #0
49 define double @f_remainder_fold1() {
50 ; CHECK-LABEL: @f_remainder_fold1(
51 ; CHECK-NEXT: ret double 1.000000e+00
53 %res = tail call fast double @remainder(double 1.0, double 2.0)
57 define double @f_remainder_fold2() {
58 ; CHECK-LABEL: @f_remainder_fold2(
59 ; CHECK-NEXT: ret double -5.000000e-01
61 %res = tail call fast double @remainder(double 1.5, double 1.0)
65 define double @f_remainder_nofold() {
66 ; CHECK-LABEL: @f_remainder_nofold(
67 ; CHECK-NEXT: [[RES:%.*]] = tail call fast double @remainder(double 1.000000e+00, double 0.000000e+00)
68 ; CHECK-NEXT: ret double [[RES]]
70 %res = tail call fast double @remainder(double 1.0, double 0.0)
74 declare double @pow(double, double) #0
75 define double @f_pow() {
76 ; CHECK-LABEL: @f_pow(
77 ; CHECK-NEXT: ret double 1.000000e+00
79 %res = tail call fast double @pow(double 1.0, double 2.0)
83 declare float @llvm.pow.f32(float, float)
84 define float @i_powf() {
85 ; CHECK-LABEL: @i_powf(
86 ; CHECK-NEXT: ret float 1.000000e+00
88 %res = tail call fast float @llvm.pow.f32(float 1.0, float 2.0)
92 declare double @llvm.powi.f64.i32(double, i32)
93 define double @i_powi() {
94 ; CHECK-LABEL: @i_powi(
95 ; CHECK-NEXT: ret double 1.000000e+00
97 %res = tail call fast double @llvm.powi.f64.i32(double 1.0, i32 2)
101 attributes #0 = { nofree nounwind willreturn }