[llvm] [SimplifyLibCalls] Directly canonicalize fminimum_num to intrinsic (PR #180555)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 01:38:56 PST 2026


================
@@ -1942,6 +1942,14 @@ static Value *replaceUnaryCall(CallInst *CI, IRBuilderBase &B,
   return copyFlags(*CI, NewCall);
 }
 
+static Value *replaceBinaryCall(CallInst *CI, IRBuilderBase &B,
+                                Intrinsic::ID IID) {
+  Value *NewCall = B.CreateBinaryIntrinsic(IID, CI->getArgOperand(0),
+                                           CI->getArgOperand(1), CI);
+  NewCall->takeName(CI);
+  return copyFlags(*CI, NewCall);
----------------
nikic wrote:

Yeah, it looks like nearly all of SLC does not preserve metadata. Some parts try to preserve attributes, but not metadata.

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


More information about the llvm-commits mailing list