[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
Loading
Please sign in to comment