[PATCH] D72930: [FEnv] Constfold some unary constrained operations
    Kevin P. Neal via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jan 17 10:32:31 PST 2020
    
    
  
kpn added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1773
+    if (IntrinsicID == Intrinsic::experimental_constrained_nearbyint ||
+        IntrinsicID == Intrinsic::experimental_constrained_rint) {
+      APFloat::roundingMode RM = APFloat::rmNearestTiesToEven;
----------------
I thought rint could raise an inexact exception?
Also, what happens if we don't know the floating point environment because of FENV_ACCESS=ON and no other math flags or math #pragmas have been given? Shouldn't the infrastructure for that go into clang first?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72930/new/
https://reviews.llvm.org/D72930
    
    
More information about the llvm-commits
mailing list