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 | cd13a663813f74a2d464387ad75072ec5b696644 (patch) | |
| tree | 5c725d816d3072a1ab5dadf64ea9fb3c9662b6b7 /llvm/test | |
| parent | 5000ba69d740c765a537c0a8d2e7990ff4f4f47c (diff) | |
| download | bcm5719-llvm-cd13a663813f74a2d464387ad75072ec5b696644.tar.gz bcm5719-llvm-cd13a663813f74a2d464387ad75072ec5b696644.zip | |
[instcombine] add powi(x, 2) -> x * x
llvm-svn: 321468
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/intrinsics.ll | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/intrinsics.ll b/llvm/test/Transforms/InstCombine/intrinsics.ll index c6f88fb9cf0..e0698f8b3b7 100644 --- a/llvm/test/Transforms/InstCombine/intrinsics.ll +++ b/llvm/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) { |

