diff options
author | Philip Reames <listmail@philipreames.com> | 2017-12-27 01:30:12 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2017-12-27 01:30:12 +0000 |
commit | d43be2d8a96a9a756736f99f08fe3be1f85fdc7c (patch) | |
tree | b235bf9b89de0ba9fedac5752e36b407f366ce21 /test/Transforms | |
parent | 89623b4cd2a123d66c08cb0a20e7d06d792ea373 (diff) |
[instcombine] add powi(x, 2) -> x * x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/intrinsics.ll | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/intrinsics.ll b/test/Transforms/InstCombine/intrinsics.ll index c6f88fb9cf0..e0698f8b3b7 100644 --- a/test/Transforms/InstCombine/intrinsics.ll +++ b/test/Transforms/InstCombine/intrinsics.ll @@ -267,12 +267,17 @@ define void @powi(double %V, double *%P) { %C = tail call double @llvm.powi.f64(double %V, i32 1) nounwind store volatile double %C, double* %P + + %D = tail call double @llvm.powi.f64(double %V, i32 2) nounwind + store volatile double %D, double* %P ret void ; CHECK-LABEL: @powi( ; CHECK: %A = fdiv double 1.0{{.*}}, %V ; CHECK: store volatile double %A, ; CHECK: store volatile double 1.0 ; CHECK: store volatile double %V +; CHECK: %D = fmul double %V, %V +; CHECK: store volatile double %D } define i32 @cttz(i32 %a) { |