1 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 ; CHECK-NEXT: ret double 1.000000e+00
5 define double @zero(double %value) {
6 %res = call double @llvm.pow.f64(double %value, double 0.000000e+00)
10 ; CHECK-LABEL: @minus_zero(
11 ; CHECK-NEXT: ret double 1.000000e+00
12 define double @minus_zero(double %value) {
13 %res = call double @llvm.pow.f64(double %value, double -0.000000e+00)
17 ; CHECK-LABEL: @fast_zero(
18 ; CHECK-NEXT: ret double 1.000000e+00
19 define double @fast_zero(double %value) {
20 %res = call fast double @llvm.pow.f64(double %value, double 0.000000e+00)
24 ; CHECK-LABEL: @fast_minus_zero(
25 ; CHECK-NEXT: ret double 1.000000e+00
26 define double @fast_minus_zero(double %value) {
27 %res = call fast double @llvm.pow.f64(double %value, double -0.000000e+00)
31 ; CHECK-LABEL: @vec_zero(
32 ; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00>
33 define <2 x double> @vec_zero(<2 x double> %value) {
34 %res = call <2 x double> @llvm.pow.v2f64(<2 x double> %value, <2 x double> <double 0.000000e+00, double 0.000000e+00>)
38 ; CHECK-LABEL: @vec_minus_zero(
39 ; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00>
40 define <2 x double> @vec_minus_zero(<2 x double> %value) {
41 %res = call <2 x double> @llvm.pow.v2f64(<2 x double> %value, <2 x double> <double -0.000000e+00, double -0.000000e+00>)
45 ; CHECK-LABEL: @vec_fast_zero(
46 ; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00>
47 define <2 x double> @vec_fast_zero(<2 x double> %value) {
48 %res = call fast <2 x double> @llvm.pow.v2f64(<2 x double> %value, <2 x double> <double 0.000000e+00, double 0.000000e+00>)
52 ; CHECK-LABEL: @vec_fast_minus_zero(
53 ; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00>
54 define <2 x double> @vec_fast_minus_zero(<2 x double> %value) {
55 %res = call fast <2 x double> @llvm.pow.v2f64(<2 x double> %value, <2 x double> <double -0.000000e+00, double -0.000000e+00>)
59 declare double @llvm.pow.f64(double, double)
60 declare <2 x double> @llvm.pow.v2f64(<2 x double>, <2 x double>)