[DAGCombiner] Change the SDLoc on split extloads (2/N)
authorVedant Kumar <vsk@apple.com>
Tue, 1 May 2018 19:29:15 +0000 (19:29 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 1 May 2018 19:29:15 +0000 (19:29 +0000)
commitcc7b2a55c2cd8c09f80e4ccd14af944f4df7d171
treec6f23b7741ead5b951a005d33b34eb4c89de0859
parentee4bfcaa5ae52c7d36d04da78922e37d288e7c4e
[DAGCombiner] Change the SDLoc on split extloads (2/N)

In DAGCombiner, we try to simplify this pattern:

  ([s|z]ext (load ...))

Conceptually, a new extload which is created while splitting the load
should have the same debug location as the load.

Making this change affects the IROrder of the new load, causing some
test case churn.

In practice, the new location is never different from the location of
the [s|z]ext, at least not during check-llvm or a stage2 build.

Part of: llvm.org/PR37262

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

llvm-svn: 331301
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/avg.ll
llvm/test/CodeGen/X86/known-signbits-vector.ll
llvm/test/CodeGen/X86/madd.ll
llvm/test/CodeGen/X86/pmovsx-inreg.ll
llvm/test/CodeGen/X86/vec_int_to_fp.ll
llvm/test/CodeGen/X86/vector-sext.ll
llvm/test/CodeGen/X86/vector-zext.ll