2012-11-13 12:16:17 +08:00
|
|
|
; Test that the pow library call simplifier works correctly.
|
|
|
|
;
|
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
|
|
|
|
declare float @pow(double, double)
|
|
|
|
|
|
|
|
; Check that pow functions with the wrong prototype aren't simplified.
|
|
|
|
|
|
|
|
define float @test_no_simplify1(double %x) {
|
2013-07-14 09:42:54 +08:00
|
|
|
; CHECK-LABEL: @test_no_simplify1(
|
2012-11-13 12:16:17 +08:00
|
|
|
%retval = call float @pow(double 1.0, double %x)
|
|
|
|
; CHECK-NEXT: call float @pow(double 1.000000e+00, double %x)
|
|
|
|
ret float %retval
|
|
|
|
}
|