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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs