DAGCombiner: StoreMerging: Fix bad index calculating when adjusting mismatching vecto...
authorMatthias Braun <matze@braunis.de>
Mon, 1 Oct 2018 16:25:50 +0000 (16:25 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 1 Oct 2018 16:25:50 +0000 (16:25 +0000)
commit004fe6bf8304f8bb55f260c0dc7a747ff21da894
tree9de8e8575ec27dc8da09e24eb177aa1f3618eaee
parente79451a5171e20c5da16a7f1a619c8851b9c574c
DAGCombiner: StoreMerging: Fix bad index calculating when adjusting mismatching vector types

This fixes a case of bad index calculation when merging mismatching
vector types. This changes the existing code to just use the existing
extract_{subvector|element} and a bitcast (instead of bitcast first and
then newly created extract_xxx) so we don't need to adjust any indices
in the first place.

rdar://44584718

Differential Revision: https://reviews.llvm.org/D52681

llvm-svn: 343493
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/sdag-store-merging-bug.ll [new file with mode: 0644]