mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
2920a71663
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167815 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
}
|