[LLVMbugs] [Bug 15313] New: Argument addAttr adds to the wrong Argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 20 07:49:54 PST 2013


            Bug ID: 15313
           Summary: Argument addAttr adds to the wrong Argument
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: joel.gouly at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10047
  --> http://llvm.org/bugs/attachment.cgi?id=10047&action=edit
The IR Module

Given the following LLVM IR:

define void @t1(i32* nocapture %a) {
  ret void

declare void @t1.a(i32 %c, i32)* %a)

F = @t1
F2 = @t1.a

I = Argument[0] of @t1
I2 = Argument[1] of @t1.a

if I then do:

                .getParamAttributes(I->getArgNo() + 1));

Instead of I2 getting the attribute, Argument[0] gets it, and it ends up as:

declare void @t1.a(i32 nocapture %c, i32* %a)

when it should be:

declare void @t1.a(i32 %c, i32* nocapture %a)

    { 1 => nocapture }

    { 1 => nocapture }

I'm guessing this second dump should be "2 => nocapture".

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130220/3117042a/attachment.html>

More information about the llvm-bugs mailing list