[PATCH] D118928: [FPEnv][InstSimplify] Fold fsub X, +0 ==> X
    Serge Pavlov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Feb  7 03:06:02 PST 2022
    
    
  
sepavloff added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:5133
 
+  // fsub X, +0 ==> X
+  if (canIgnoreSNaN(ExBehavior, FMF))
----------------
What if `X==+0` and rounding is downward? In this case `fsub X, +0` should produce `-0.0` (https://en.wikipedia.org/wiki/Signed_zero#Arithmetic).
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118928/new/
https://reviews.llvm.org/D118928
    
    
More information about the llvm-commits
mailing list