summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/pow-3.ll
blob: 1c5cf910a8afb0112d6f7b50290939ebac1cd948 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
; Test that the pow won't get simplified to sqrt(fabs) when they are not available.
;
; RUN: opt < %s -disable-simplify-libcalls -instcombine -S | FileCheck %s

declare double @llvm.pow.f64(double %Val, double %Power)

define double @test_simplify_unavailable(double %x) {
; CHECK-LABEL: @test_simplify_unavailable(
  %retval = call double @llvm.pow.f64(double %x, double 0.5)
; CHECK-NEXT: call double @llvm.pow.f64(double %x, double 5.000000e-01)
  ret double %retval
}