[DAGCombiner] Set the right SDLoc on extended SETCC uses (7/N)
authorVedant Kumar <vsk@apple.com>
Fri, 11 May 2018 18:40:10 +0000 (18:40 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 11 May 2018 18:40:10 +0000 (18:40 +0000)
commit99d5c072f07e2f36ca40764803cd8cc66da319a1
tree75378879a42ca024b92994d99a746a6d0dc2ce43
parentfd340a404723d1dfb27d40e85945cd3ffadd8d80
[DAGCombiner] Set the right SDLoc on extended SETCC uses (7/N)

ExtendSetCCUses updates SETCC nodes which use a load (OriginalLoad) to
reflect a simplification to the load (ExtLoad).

Based on my reading, ExtendSetCCUses may create new nodes to extend a
constant attached to a SETCC. It also creates fresh SETCC nodes which
refer to any updated operands.

ISTM that the location applied to the new constant and SETCC nodes
should be the same as the location of the ExtLoad.

This was suggested by Adrian in https://reviews.llvm.org/D45995.

Part of: llvm.org/PR37262

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

llvm-svn: 332119
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/extend-set-cc-uses-dbg.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/pr32284.ll