[llvm-bugs] [Bug 26590] New: Tailcall forwards arguments with mismatching zero/signext parameter attributes
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 11 18:18:20 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26590
Bug ID: 26590
Summary: Tailcall forwards arguments with mismatching
zero/signext parameter attributes
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: hans at chromium.org
CC: llvm-bugs at lists.llvm.org, rnk at google.com
Classification: Unclassified
For example:
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"
declare void @g(i16 signext)
define void @f(i16 zeroext %x) {
entry:
tail call void @g(i16 signext %x)
ret void
}
llc will generate:
f: # @f
.cfi_startproc
# BB#0: # %entry
jmp g # TAILCALL
Which means g()'s parameter doesn't get sign-extended to 32 bits as expected.
The problem is that MatchingStackOffset in X86ISelLowering.cpp only checks that
the arguments are at the same stack offset and have the same size. It should
also check the parameter attributes, but that is tricky since it has no
straight-forward way of getting at the caller's arguments.
I'm looking into this, but thought I'd file it in the meantime.
--
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/20160212/eb7853b8/attachment-0001.html>
More information about the llvm-bugs
mailing list