[llvm] [LLVM] Slay undead copysign code (PR #111269)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 5 22:36:33 PDT 2024


================
@@ -438,7 +442,15 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
     break;
   }
   case Intrinsic::copysign: {
-    ReplaceFPIntrinsicWithCall(CI, "copysignf", "copysign", "copysignl");
+    switch (CI->getArgOperand(0)->getType()->getTypeID()) {
+    default:
+      assert(false && "only need a copysign libcall for arch-specific floats");
----------------
workingjubilee wrote:

`report_fatal_error` sounds good to me. I just hadn't thought terribly hard about error-handling aside from "hm, this change might let weird IR flow downstream, maybe this spot which serves as a backstop for such should assert more".

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


More information about the llvm-commits mailing list