diff options
| author | whitequark <whitequark@whitequark.org> | 2017-01-25 09:32:30 +0000 |
|---|---|---|
| committer | whitequark <whitequark@whitequark.org> | 2017-01-25 09:32:30 +0000 |
| commit | 16f1e5f1cade241372b545b5addca9e6867497ed (patch) | |
| tree | b38d974c06728a999a63865d4bbe724ffb51cae0 /llvm/test/Transforms | |
| parent | 20caee95e1aacb604ed1f7f946debeb58b793c8e (diff) | |
| download | bcm5719-llvm-16f1e5f1cade241372b545b5addca9e6867497ed.tar.gz bcm5719-llvm-16f1e5f1cade241372b545b5addca9e6867497ed.zip | |
Mark @llvm.powi.* as safe to speculatively execute.
Floating point intrinsics in LLVM are generally not speculatively
executed, since most of them are defined to behave the same as libm
functions, which set errno.
However, the @llvm.powi.* intrinsics do not correspond to any libm
function, and lacks any defined error handling semantics in LangRef.
It most certainly does not alter errno.
llvm-svn: 293041
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/LICM/hoist-round.ll | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/test/Transforms/LICM/hoist-round.ll b/llvm/test/Transforms/LICM/hoist-round.ll index 9c6a3a180b5..87a7050668d 100644 --- a/llvm/test/Transforms/LICM/hoist-round.ll +++ b/llvm/test/Transforms/LICM/hoist-round.ll @@ -18,6 +18,7 @@ target datalayout = "E-m:e-p:32:32-i8:8:8-i16:16:16-i64:32:32-f64:32:32-v64:32:3 ; CHECK: call float @llvm.copysign.f32 ; CHECK: call float @llvm.minnum.f32 ; CHECK: call float @llvm.maxnum.f32 +; CHECK: call float @llvm.powi.f32 ; CHECK: for.body: define void @test(float %arg1, float %arg2) { @@ -40,7 +41,8 @@ for.body: %tmp.8 = call float @llvm.copysign.f32(float %tmp.7, float %arg2) %tmp.9 = call float @llvm.minnum.f32(float %tmp.8, float %arg2) %tmp.10 = call float @llvm.maxnum.f32(float %tmp.9, float %arg2) - call void @consume(float %tmp.10) + %tmp.11 = call float @llvm.powi.f32(float %tmp.10, i32 4) + call void @consume(float %tmp.11) %IND.new = add i32 %IND, 1 br label %for.head @@ -60,3 +62,4 @@ declare float @llvm.fabs.f32(float) declare float @llvm.copysign.f32(float, float) declare float @llvm.minnum.f32(float, float) declare float @llvm.maxnum.f32(float, float) +declare float @llvm.powi.f32(float, i32) |

