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/lib/Analysis | |
| 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/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 73455a87c9f..dc8de6d58a3 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -3339,6 +3339,10 @@ bool llvm::isSafeToSpeculativelyExecute(const Value *V, case Intrinsic::rint: case Intrinsic::round: return true; + // These intrinsics do not correspond to any libm function, and + // do not set errno. + case Intrinsic::powi: + return true; // TODO: are convert_{from,to}_fp16 safe? // TODO: can we list target-specific intrinsics here? default: break; |

