1; RUN: opt < %s -instcombine -S | FileCheck %s 2 3; CHECK-LABEL: @zero( 4; CHECK-NEXT: ret double 1.000000e+00 5define double @zero(double %value) { 6 %res = call double @llvm.pow.f64(double %value, double 0.000000e+00) 7 ret double %res 8} 9 10; CHECK-LABEL: @minus_zero( 11; CHECK-NEXT: ret double 1.000000e+00 12define double @minus_zero(double %value) { 13 %res = call double @llvm.pow.f64(double %value, double -0.000000e+00) 14 ret double %res 15} 16 17; CHECK-LABEL: @fast_zero( 18; CHECK-NEXT: ret double 1.000000e+00 19define double @fast_zero(double %value) { 20 %res = call fast double @llvm.pow.f64(double %value, double 0.000000e+00) 21 ret double %res 22} 23 24; CHECK-LABEL: @fast_minus_zero( 25; CHECK-NEXT: ret double 1.000000e+00 26define double @fast_minus_zero(double %value) { 27 %res = call fast double @llvm.pow.f64(double %value, double -0.000000e+00) 28 ret double %res 29} 30 31; CHECK-LABEL: @vec_zero( 32; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00> 33define <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>) 35 ret <2 x double> %res 36} 37 38; CHECK-LABEL: @vec_minus_zero( 39; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00> 40define <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>) 42 ret <2 x double> %res 43} 44 45; CHECK-LABEL: @vec_fast_zero( 46; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00> 47define <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>) 49 ret <2 x double> %res 50} 51 52; CHECK-LABEL: @vec_fast_minus_zero( 53; CHECK-NEXT: ret <2 x double> <double 1.000000e+00, double 1.000000e+00> 54define <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>) 56 ret <2 x double> %res 57} 58 59declare double @llvm.pow.f64(double, double) 60declare <2 x double> @llvm.pow.v2f64(<2 x double>, <2 x double>) 61