[LLVMbugs] [Bug 24341] New: Store merging in DAGCombine if first stores are not consecutive
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 3 06:24:20 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24341
Bug ID: 24341
Summary: Store merging in DAGCombine if first stores are not
consecutive
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: tom.aernoudt at synopsys.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14683
--> https://llvm.org/bugs/attachment.cgi?id=14683&action=edit
testcase
Store merging does not happen if the first ordered stores of the chain are non
consecutive. If that is the case consecutive stores later in the ordered list
are not merged.
eg The following code:
void fail(unsigned long long* p) {
unsigned char* q = (unsigned char*)p;
q[4] = 1;
q[0] = 1;
q[5] = 1;
q[2] = 1;
}
compiles to:
movb $1, 4(%rdi)
movb $1, (%rdi)
movb $1, 5(%rdi)
movb $1, 2(%rdi)
If the consecutive stores are first on the ordered list, the stores are merged
correctly.
eg The following code:
void ok(unsigned long long* p)
{
unsigned char* q = (unsigned char*)p;
q[4] = 1;
q[0] = 1;
q[6] = 1;
q[1] = 1;
}
Compiles to:
movb $1, 4(%rdi)
movb $1, 6(%rdi)
movw $257, (%rdi) # imm = 0x101
--
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/20150803/4a8d7e6e/attachment.html>
More information about the llvm-bugs
mailing list