[llvm-bugs] [Bug 42062] New: tail call causes to run out of registers during register allocation
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 29 09:37:15 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42062
Bug ID: 42062
Summary: tail call causes to run out of registers during
register allocation
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: ARM
Assignee: diogo.sampaio at arm.com
Reporter: diogo.sampaio at arm.com
CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
Ties.Stuij at arm.com
llc in the code:
--
target triple = "thumbv8m.base-arm-none-eabi"
@foo = external global i8
declare i32 @bar(i8* nocapture, i32, i32, i8* nocapture)
define void @food(i8* %a) #0 {
entry:
%0 = tail call i32 @bar(i8* %a, i32 8, i32 1, i8* nonnull @foo)
%1 = tail call i32 @bar(i8* %a, i32 9, i32 0, i8* nonnull @foo)
%2 = tail call i32 @bar(i8* %a, i32 7, i32 2, i8* nonnull @foo)
ret void
}
attributes #0 = { minsize "target-cpu"="cortex-m23" }
--
will produce an error: ran out of registers during register allocation
running --disable-tail-calls won't
In thumb there are only 8 registers. In this particular case, the register
allocator could move the bar address, stored in r6 to register r7 and allow the
register r4, r5, r6 to be restored. But he does not.
--
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/20190529/e9998cc6/attachment.html>
More information about the llvm-bugs
mailing list