[llvm] [CodeGenPrepare] Reverse the canonicalization of isInf/isNanOrInf (PR #81572)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 03:59:11 PDT 2024


================
@@ -1943,6 +1943,30 @@ static bool swapICmpOperandsToExposeCSEOpportunities(CmpInst *Cmp) {
   return false;
 }
 
+static bool foldFCmpToFPClassTest(CmpInst *Cmp) {
+  FCmpInst *FCmp = dyn_cast<FCmpInst>(Cmp);
+  if (!FCmp)
+    return false;
+
+  // Reverse the canonicalization if it is a FP class test
----------------
dtcxzyw wrote:

Done.

https://github.com/llvm/llvm-project/pull/81572


More information about the llvm-commits mailing list