http://llvm.org/bugs/show_bug.cgi?id=19546
Bug ID: 19546
Summary: missed-optimization: copies of adjacent struct fields
are not coalesced
Product: clang
Version: 3.4
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
For every optimization setting I've tried, clang 3.4 generates two two-byte
copies for this code:
struct test
{
unsigned short a, b;
};
void copy_test(struct test * __restrict__ out,
const struct test * __restrict__ in)
{
out->a = in->a;
out->b = in->b;
}
It should generate the same code it does for *out = *in.
Sorry if I'm targetting the wrong component.
--
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