2018-08-14 23:21:13 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
2015-11-04 04:32:23 +08:00
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
|
2018-08-14 23:21:13 +08:00
|
|
|
define double @mypow(double %x, double %y) {
|
|
|
|
; CHECK-LABEL: @mypow(
|
|
|
|
; CHECK-NEXT: [[CALL:%.*]] = call double @exp(double [[X:%.*]])
|
|
|
|
; CHECK-NEXT: [[POW:%.*]] = call double @llvm.pow.f64(double [[CALL]], double [[Y:%.*]])
|
|
|
|
; CHECK-NEXT: ret double [[POW]]
|
|
|
|
;
|
2015-11-04 04:32:23 +08:00
|
|
|
%call = call double @exp(double %x)
|
|
|
|
%pow = call double @llvm.pow.f64(double %call, double %y)
|
|
|
|
ret double %pow
|
|
|
|
}
|
|
|
|
|
|
|
|
declare double @exp(double) #1
|
|
|
|
declare double @llvm.pow.f64(double, double)
|