[PATCH] D156107: ConstantFolding: Constant fold denormal inputs to canonicalize for IEEE

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 07:40:22 PDT 2023


foad accepted this revision.
foad added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1979
     if (DenormMode.Input == DenormalMode::Dynamic)
       return nullptr;
 
----------------
You could still fold this case if Src is positive and output mode is PreserveSign or PositiveZero.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1982
     // If we know if either input or output is flushed, we can fold.
     if ((DenormMode.Input == DenormalMode::Dynamic &&
          DenormMode.Output == DenormalMode::IEEE) ||
----------------
`DenormMode.Input == DenormalMode::Dynamic` is false here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156107/new/

https://reviews.llvm.org/D156107



More information about the llvm-commits mailing list