1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/InstCombine/pow-sqrt.ll
Sanjay Patel 489a46e98d [LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, 0.5) calls
Also, propagate the FMF to the newly created sqrt() call.

llvm-svn: 257503
2016-01-12 19:06:35 +00:00

14 lines
354 B
LLVM

; RUN: opt < %s -instcombine -S | FileCheck %s
define double @pow_half(double %x) {
%pow = call fast double @llvm.pow.f64(double %x, double 5.000000e-01)
ret double %pow
}
; CHECK-LABEL: define double @pow_half(
; CHECK-NEXT: %sqrt = call fast double @sqrt(double %x)
; CHECK-NEXT: ret double %sqrt
declare double @llvm.pow.f64(double, double)