[llvm-bugs] [Bug 36210] New: Partial inlining of variadic functions causes verification failure due to mismatched attributes.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 2 08:35:42 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36210

            Bug ID: 36210
           Summary: Partial inlining of variadic functions causes
                    verification failure due to mismatched attributes.
           Product: libraries
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: sfertile at ca.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19798
  --> https://bugs.llvm.org/attachment.cgi?id=19798&action=edit
Ir input for partial-inliner to show the issue.

I've attached a cutdown example from the test suite which shows the issue.

~/install/llvm_trunk/bin/opt -mtriple x86_64-unknown-linux-gnu \
                             -partial-inliner  cutdown.ll -o /dev/null 
Wrong types for attribute: signext zeroext

The issue seems to be that we sign extend a pointer to int that gets added to
the outlined function as an output argument. In this case the call instruction
is:

call void (%struct.obj*, i32*, ...) @assemble_options.1_cond.end(%struct.obj*
%loptions, i32* signext %result.0.lcssa.loc.i, i8* getelementptr inbounds ([11
x i8], [11 x i8]* @.str.23, i64 0, i64 0), i32 signext 8, i8* getelementptr
inbounds ([8 x i8], [8 x i8]* @.str.24, i64 0, i64 0), i32 signext 16777216,
i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.25, i64 0, i64 0), i32
signext 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0,
i64 0), i32 2, i8* null)

If I print-out the ir after partial inlining and remove the sign extension from 
`i32* signext %result.0.lcssa.loc.i` the verifier no longer complains.

-- 
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/20180202/02fe81c2/attachment-0001.html>


More information about the llvm-bugs mailing list