[DAGCombiner] Fix SDLoc in a (sext (sextload x)) combine (3/N)
authorVedant Kumar <vsk@apple.com>
Tue, 1 May 2018 19:51:15 +0000 (19:51 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 1 May 2018 19:51:15 +0000 (19:51 +0000)
commitd7117ed0f973371fb89a8647b92063c50562bd85
tree4e9fe200eb14beba71277bdfdd2d5ba551a5846a
parentcc7b2a55c2cd8c09f80e4ccd14af944f4df7d171
[DAGCombiner] Fix SDLoc in a (sext (sextload x)) combine (3/N)

Prior to this patch, for the given test case, we would apply the
location associated with the sdiv instruction to instructions which
perform the load.

Part of: llvm.org/PR37262.

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

llvm-svn: 331302
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/ARM/fold-sext-sextload.ll [new file with mode: 0644]