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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 22:24:58 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
----------------
arsenm wrote:

This change wasn't made? 

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


More information about the llvm-commits mailing list