[llvm] Count CallInst Arguments Attributes to reduce unnecessary extension (PR #73501)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 05:29:22 PST 2023


================
@@ -69,6 +69,20 @@ static ISD::NodeType getPreferredExtendForValue(const Instruction *I) {
       NumOfSigned += CI->isSigned();
       NumOfUnsigned += CI->isUnsigned();
     }
+    if (const auto *CallI = dyn_cast<CallInst>(U)) {
----------------
zengdage wrote:

Sorry, I don't understand how to avoid iterating over the call arguments. Do you mean that I need to change the `User *` to `User &` on Line 67?

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


More information about the llvm-commits mailing list