[llvm-bugs] [Bug 26114] New: Many unnecessary mov instructions near call site
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 11 09:23:59 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26114
Bug ID: 26114
Summary: Many unnecessary mov instructions near call site
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Register Allocator
Assignee: unassignedbugs at nondot.org
Reporter: mcrosier at codeaurora.org
CC: atrick at apple.com, hfinkel at anl.gov,
llvm-bugs at lists.llvm.org, qcolombet at apple.com
Classification: Unclassified
Test case:
void foo(char *c, short s, float X, char C, long long LL, int I, double D);
void test(short s, float X, char C, long long LL, int I, double D) {
foo("test", s, X, C, LL, I, D);
}
On AArch64 at -O3 the assembly output is as follows:
test:
mov w8, w3
mov x9, x2
mov w10, w1
mov w11, w0
adrp x0, .L.str
add x0, x0, :lo12:.L.str
mov w1, w11
mov w2, w10
mov x3, x9
mov w4, w8
b foo
We should be able to generate something like this:
test:
adrp x5, .LC0
mov w4, w3
mov x3, x2
mov w2, w1
mov w1, w0
add x0, x5, :lo12:.LC0
b foo
Which has 4 fewer moves.
--
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/20160111/0a01c3a6/attachment.html>
More information about the llvm-bugs
mailing list