2015-11-19 07:21:32 +08:00
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
|
2016-01-13 03:06:35 +08:00
|
|
|
define double @pow_half(double %x) {
|
|
|
|
%pow = call fast double @llvm.pow.f64(double %x, double 5.000000e-01)
|
2015-11-19 07:21:32 +08:00
|
|
|
ret double %pow
|
|
|
|
}
|
|
|
|
|
2016-01-13 03:06:35 +08:00
|
|
|
; CHECK-LABEL: define double @pow_half(
|
|
|
|
; CHECK-NEXT: %sqrt = call fast double @sqrt(double %x)
|
|
|
|
; CHECK-NEXT: ret double %sqrt
|
2015-11-19 07:21:32 +08:00
|
|
|
|
|
|
|
declare double @llvm.pow.f64(double, double)
|
2016-01-13 03:06:35 +08:00
|
|
|
|