diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:31:22 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:31:22 +0000 |
commit | 1e7804dbd25b8dbf534c850355d70ad215206f4b (patch) | |
tree | dba00119388b84f9f44e6ec5e9129f807fd79ca3 /test/Transforms/InstCombine/intrinsics.ll | |
parent | 571945e6affd20b19264ec22495da418d0fbdbb4 (diff) |
Notes
Diffstat (limited to 'test/Transforms/InstCombine/intrinsics.ll')
-rw-r--r-- | test/Transforms/InstCombine/intrinsics.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/intrinsics.ll b/test/Transforms/InstCombine/intrinsics.ll index fda4386e9439e..135e7772eea90 100644 --- a/test/Transforms/InstCombine/intrinsics.ll +++ b/test/Transforms/InstCombine/intrinsics.ll @@ -4,6 +4,7 @@ declare %overflow.result @llvm.uadd.with.overflow.i8(i8, i8) declare %overflow.result @llvm.umul.with.overflow.i8(i8, i8) +declare double @llvm.powi.f64(double, i32) nounwind readonly define i8 @test1(i8 %A, i8 %B) { %x = call %overflow.result @llvm.uadd.with.overflow.i8(i8 %A, i8 %B) @@ -77,3 +78,24 @@ define i8 @test6(i8 %A, i1* %overflowPtr) { ; CHECK-NEXT: store i1 false, i1* %overflowPtr ; CHECK-NEXT: ret i8 %A } + + +define void @powi(double %V, double *%P) { +entry: + %A = tail call double @llvm.powi.f64(double %V, i32 -1) nounwind + volatile store double %A, double* %P + + %B = tail call double @llvm.powi.f64(double %V, i32 0) nounwind + volatile store double %B, double* %P + + %C = tail call double @llvm.powi.f64(double %V, i32 1) nounwind + volatile store double %C, double* %P + ret void +; CHECK: @powi +; CHECK: %A = fdiv double 1.0{{.*}}, %V +; CHECK: volatile store double %A, +; CHECK: volatile store double 1.0 +; CHECK: volatile store double %V +} + + |