xref: /llvm-project/llvm/test/Transforms/InstCombine/pow-to-sqrt.ll (revision de36d39e24249feabe18f845b1868a16b798110a)
1; RUN: opt < %s -passes=instcombine -S | FileCheck %s
2; This is a check to assure the attributes of `pow` do
3; not get passed to sqrt.
4
5define void @pow_to_sqrt(double %x) {
6; CHECK-LABEL: @pow_to_sqrt(
7; CHECK-NEXT: [[SQRT:%.*]] = call afn double @sqrt(double [[X:%.*]])
8; CHECK-NEXT: ret void
9;
10  %call = call afn double @pow(double %x, double 1.5)
11  ret void
12}
13
14declare double @pow(double noundef, double noundef)
15