[llvm-bugs] [Bug 31708] New: signext of small integer return types ignored
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 20 10:02:26 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31708
Bug ID: 31708
Summary: signext of small integer return types ignored
Product: new-bugs
Version: 3.9
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: eric.schweitz at pgroup.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17873
--> https://llvm.org/bugs/attachment.cgi?id=17873&action=edit
Small test file to show x86 signext i16 returns
In the attached .ll file is a small function that has a return type of "signext
i16". From the LLVM Language Reference, it seems that the value returned ought
to be sign extended to the word width (i32) of the target in this case.
Experimentation showed that sign extension was the case in 3.8.
movswl -2(%rsp), %eax
However, in 3.9 the sign extension changed to a zero extension.
movzwl -2(%rsp), %eax
This zero extension can be seen in my latest "master" branch build as well.
To reproduce:
llc -O1 -o bug.s bug.ll
--
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/20170120/e4f11591/attachment.html>
More information about the llvm-bugs
mailing list