[LLVMbugs] [Bug 23772] New: [AArch64] r226200 can emit illegal thumb2 instruction: "sub sp, r12, #80"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 5 15:20:58 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23772
Bug ID: 23772
Summary: [AArch64] r226200 can emit illegal thumb2 instruction:
"sub sp, r12, #80"
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: zhaoshiz at codeaurora.org
CC: apazos at codeaurora.org, hfinkel at anl.gov,
llvmbugs at cs.uiuc.edu, mcrosier at codeaurora.org
Classification: Unclassified
r226200 allows coalescing into SP but missed a corner case:
%vreg907<def> = COPY %SP; GPRnopc:%vreg907
%vreg908<def> = t2SUBri %vreg907, 80, pred:14, pred:%noreg, opt:%noreg;
GPRnopc:%vreg908,%vreg907
%SP<def> = COPY %vreg908; GPRnopc:%vreg908
When %vreg908 is coalesced into SP but %vreg907 is not, it's likely to emit an
illegal instruction:
sub sp, r12, #80
In Thumb2, we can only use SP as Rd if and only if Rn is also SP. This patch,
when trying remove "%SP<def> = COPY %vreg908", checks if %vreg907 is SP
already. If not, be conservative and do not coalesce %vreg908 into SP.
http://reviews.llvm.org/D10287
--
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/20150605/44d3cfb7/attachment.html>
More information about the llvm-bugs
mailing list