[PATCH] D137858: ConstantFolding: Constant fold some canonicalizes
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 12:34:01 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1966
+ if (DenormMode == DenormalMode::getIEEE())
+ return nullptr;
+
----------------
jcranmer-intel wrote:
> Denormal in IEEE denormal mode should be canonical, right? Or are you using this mode to assume "it's dynamic, so we don't know if it's canonical or not" (in which case, add a comment to this effect)?
Yes. This isn't a strictfp intrinsic, so it's not considering the dynamic mode at all.
I think this should fold the denormal, but if anything is going to break, it would be this. I was mostly worried about things like x87 unnormal values, but now it's just not touching those. I'll probably post a follow up patch to fold here in the future
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137858/new/
https://reviews.llvm.org/D137858
More information about the llvm-commits
mailing list