// RUN: %swift -target x86_64-apple-darwin10 -emit-ir %s | FileCheck %s

// Make sure we use an intrinsic for functions such as sqrt
// CHECK: tail call float @llvm.sqrt.f32
func(f : Float) -> Float {
  return sqrt(f)
}

// CHECK: tail call float @llvm.sqrt.f64
func(f : Double) -> Double {
  return sqrt(f)
}

// RUN: %target-swift-frontend -target x86_64-apple-darwin10 -emit-ir %s | FileCheck %s

import Darwin

// Make sure we use an intrinsic for functions such as sqrt
// CHECK: call float @llvm.sqrt.f32
func test1(f : Float) -> Float {
  return sqrt(f)
}

// CHECK: call double @llvm.sqrt.f64
func test2(f : Double) -> Double {
  return _sqrt(f)
}

Fix test to import Darwin and use correct check lines
Fix test to import Darwin and use correct check lines

Swift SVN r18973
