• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -S < %s -instcombine | FileCheck %s
3
4target triple = "x86_64"
5
6define double @pow_exp(double %x, double %y) {
7; CHECK-LABEL: @pow_exp(
8; CHECK-NEXT:    [[MUL:%.*]] = fmul fast double [[X:%.*]], [[Y:%.*]]
9; CHECK-NEXT:    [[EXP:%.*]] = call fast double @llvm.exp.f64(double [[MUL]])
10; CHECK-NEXT:    ret double [[EXP]]
11;
12  %A = alloca i1
13  %call = call fast double @exp(double %x) #1
14  %pow = call fast double @llvm.pow.f64(double %call, double %y)
15  %C1 = fcmp ule double %call, %pow
16  store i1 %C1, i1* %A
17  ret double %pow
18}
19
20declare double @exp(double)
21
22declare double @llvm.pow.f64(double, double) #0
23
24attributes #0 = { nounwind readnone speculatable }
25attributes #1 = { nounwind readnone }
26