[llvm] f595c50 - [Attributor] Use the right argument number (call site vs callee)

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 3 12:49:43 PDT 2023


Author: Johannes Doerfert
Date: 2023-07-03T12:49:28-07:00
New Revision: f595c500406b7b3d9d0db218d44b32d90455f580

URL: https://github.com/llvm/llvm-project/commit/f595c500406b7b3d9d0db218d44b32d90455f580
DIFF: https://github.com/llvm/llvm-project/commit/f595c500406b7b3d9d0db218d44b32d90455f580.diff

LOG: [Attributor] Use the right argument number (call site vs callee)

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/Attributor.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index a43c4454763aeb..5e97f138d38c8c 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -814,6 +814,7 @@ struct IRPosition {
     case IRPosition::IRP_CALL_SITE_RETURNED:
       return AttributeList::ReturnIndex;
     case IRPosition::IRP_ARGUMENT:
+      return getCalleeArgNo() + AttributeList::FirstArgIndex;
     case IRPosition::IRP_CALL_SITE_ARGUMENT:
       return getCallSiteArgNo() + AttributeList::FirstArgIndex;
     }


        


More information about the llvm-commits mailing list