[all-commits] [llvm/llvm-project] 0037e2: [SDAG] bail out of mergeTruncStores() if there's a...
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Fri Dec 2 07:10:03 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0037e21f28adbeb9f8cac30016521d543561645e
https://github.com/llvm/llvm-project/commit/0037e21f28adbeb9f8cac30016521d543561645e
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-12-02 (Fri, 02 Dec 2022)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/SystemZ/merge-stores.ll
Log Message:
-----------
[SDAG] bail out of mergeTruncStores() if there's any other use in the chain
This fixes the miscompile in issue #58883.
The test demonstrates that we gave up on store merging in that example.
This change should be strictly safe (just adds another clause
to avoid the transform), and it does not prohibit any existing
valid optimizations based on regression tests. I want to believe
that it's also a sufficient fix (possibly overkill), but I'm not
sure how to prove that.
Differential Revision: https://reviews.llvm.org/D137791
More information about the All-commits
mailing list