Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Bad Thumb2 code generated, SUB.W SP, #25274

Closed Quuxplusone closed 7 years ago

Quuxplusone commented 8 years ago
Bugzilla Link PR25275
Status RESOLVED DUPLICATE of bug 23772
Importance P normal
Reported by Brian G. Lucas (bagel99@gmail.com)
Reported on 2015-10-21 13:59:25 -0700
Last modified on 2017-07-17 09:11:58 -0700
Version trunk
Hardware PC Linux
CC jsweval@arxan.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
This is a regression since 3.6.0.

LLVM version 3.7.0 and trunk generate:
    mov        r0, sp
    sub.w   sp, r0, #8  <-- BAD!! rd of sp is undefined

gnu as gives following error message:
Error: r13 not allowed here -- `sub.w sp,r0,#8'

LLVM version 3.6.0 generated:
    mov         r0, sp
    sub.w   r1, r0, #8
    mov        sp, r1

The source code that generates this is somewhat complex.  If necessary, I'll
try to find a small .ll test case.
Quuxplusone commented 7 years ago

_This bug has been marked as a duplicate of bug 23772_