[llvm] [InstCombine] Remove transformation on call instruction where return value need void to non-void conversion (PR #98536)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 09:03:54 PDT 2024


================
@@ -4071,9 +4071,7 @@ bool InstCombinerImpl::transformConstExprCastCall(CallBase &Call) {
       if (Callee->isDeclaration())
         return false;   // Cannot transform this return value.
 
-      if (!Caller->use_empty() &&
-          // void -> non-void is handled specially
-          !NewRetTy->isVoidTy())
+      if (!Caller->use_empty() || NewRetTy->isVoidTy())
----------------
yozhu wrote:

Yes this makes sense.

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


More information about the llvm-commits mailing list