xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/pow-2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1; Test that the pow library call simplifier works correctly.
2;
3; RUN: opt < %s -instcombine -S | FileCheck %s
4
5declare float @pow(double, double)
6
7; Check that pow functions with the wrong prototype aren't simplified.
8
9define float @test_no_simplify1(double %x) {
10; CHECK-LABEL: @test_no_simplify1(
11  %retval = call float @pow(double 1.0, double %x)
12; CHECK-NEXT: call float @pow(double 1.000000e+00, double %x)
13  ret float %retval
14}
15