[llvm] [InstCombine] Fix `frexp(frexp(x)) -> frexp(x)` fold (PR #138837)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 7 02:51:03 PDT 2025


================
@@ -3799,6 +3799,18 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
     }
     break;
   }
+  case Intrinsic::frexp: {
+    Value *X;
+    // Frexp is idempotent with the added complication of the struct return.
----------------
arsenm wrote:

Adjust the comment for the integer result

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


More information about the llvm-commits mailing list