[LLVMbugs] [Bug 10930] New: llc generates wrong assembler code for the MIPS target for signed long long
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 15 04:55:32 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10930
Summary: llc generates wrong assembler code for the MIPS target
for signed long long
Product: new-bugs
Version: 2.9
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: gordon.haak at googlemail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7271)
--> (http://llvm.org/bugs/attachment.cgi?id=7271)
The LLC output
The following C-code was compiled with clang 2.9 (no options):
int main() {
signed long long a = 2147483648;
if ((a >= 0) && (a > 15))
{
return 0;
}
return -1;
}
llc (options -march=mips) produces the output (see attachment)
This code is incorrect, since the address calculation in line 22 ("ori $3, $3,
4") is wrong ($3 should point to the lower word of the variable which is not
guaranteed with an "ori"). An "addiu $3, $3, 4") would be correct instead.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list