[SimplifyLibCalls] Don't depend on a called function having a name, it might be an...
[oota-llvm.git] / test / Transforms / InstCombine / sincospi.ll
index f49fb35cb76aa5f8cce1620fc1b59d5aa2bcdea8..10342c50096179034d21c94b07b623fe266942fa 100644 (file)
@@ -90,3 +90,12 @@ define double @test_constant_f64() {
 ; CHECK-NO-SINCOS: call double @__sinpi
 ; CHECK-NO-SINCOS: call double @__cospi
 }
+
+define double @test_fptr(double (double)* %fptr, double %p1) {
+       %sin = call double @__sinpi(double %p1) #0
+       %cos = call double %fptr(double %p1)
+       %res = fadd double %sin, %cos
+       ret double %res
+; CHECK-LABEL: @test_fptr
+; CHECK: __sinpi
+}