[llvm-bugs] [Bug 25154] wrong code at -O2 and -O3 on x86_64-linux-gnu

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 2 11:03:56 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25154

James Y Knight <jyknight at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from James Y Knight <jyknight at google.com> ---
Fixed:

Author: jyknight
Date: Mon Nov  2 12:48:08 2015
New Revision: 251816

URL: http://llvm.org/viewvc/llvm-project?rev=251816&view=rev
Log:
Fix two issues in MergeConsecutiveStores:

1) PR25154. This is basically a repeat of PR18102, which was fixed in
r200201, and broken again by r234430. The latter changed which of the
store nodes was merged into from the first to the last. Thus, we now
also need to prefer merging a later store at a given address into the
target node, instead of an earlier one.

2) While investigating that, I also realized I'd introduced a bug in
r236850. There, I removed a check for alignment -- not realizing that
nothing except the alignment check was ensuring that none of the stores
were overlapping! This is a really bogus way to ensure there's no
aliased stores.

A better solution to both of these issues is likely to always use the
code added in the 'if (UseAA)' branches which rearrange the chain based
on a more principled analysis. I'll look into whether that can be used
always, but in the interest of getting things back to working, I think a
minimal change makes sense.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    llvm/trunk/test/CodeGen/X86/MergeConsecutiveStores.ll
    llvm/trunk/test/CodeGen/X86/dag-merge-fast-accesses.ll
    llvm/trunk/test/CodeGen/X86/stores-merging.ll

-- 
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/20151102/d73d4db6/attachment.html>


More information about the llvm-bugs mailing list