mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
a191db7d99
This patch migrates the math library call simplifications from the simplify-libcalls pass into the instcombine library call simplifier. I have typically migrated just one simplifier at a time, but the math simplifiers are interdependent because: 1. CosOpt, PowOpt, and Exp2Opt all depend on UnaryDoubleFPOpt. 2. CosOpt, PowOpt, Exp2Opt, and UnaryDoubleFPOpt all depend on the option -enable-double-float-shrink. These two factors made migrating each of these simplifiers individually more of a pain than it would be worth. So, I migrated them all together. llvm-svn: 167815
15 lines
427 B
LLVM
15 lines
427 B
LLVM
; 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) {
|
|
; CHECK: @test_no_simplify1
|
|
%retval = call float @pow(double 1.0, double %x)
|
|
; CHECK-NEXT: call float @pow(double 1.000000e+00, double %x)
|
|
ret float %retval
|
|
}
|