xref: /llvm-project/llvm/test/Transforms/InstCombine/pow-2.ll (revision acdc419c897f8a9414c7a00c8908ac32312afee2)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; Test that the pow library call simplifier works correctly.
3;
4; RUN: opt < %s -passes=instcombine -S | FileCheck %s
5
6declare float @pow(double, double)
7
8; Check that pow functions with the wrong prototype aren't simplified.
9
10define float @test_no_simplify1(double %x) {
11; CHECK-LABEL: @test_no_simplify1(
12; CHECK-NEXT:    [[RETVAL:%.*]] = call float @pow(double 1.000000e+00, double [[X:%.*]])
13; CHECK-NEXT:    ret float [[RETVAL]]
14;
15  %retval = call float @pow(double 1.0, double %x)
16  ret float %retval
17}
18
19