OSDN Git Service

[DAGCombiner] Factor out duplicated logic for an extload combine, NFC (5/N)
authorVedant Kumar <vsk@apple.com>
Fri, 11 May 2018 18:40:02 +0000 (18:40 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 11 May 2018 18:40:02 +0000 (18:40 +0000)
commitf6585e9bd31aa3e473410a43861d652c192e6635
tree75e20c2ebd4b9b0998c519f3cffc24b2483a32d0
parent299099812245aa5cdf7114d5741b977f02acc5f4
[DAGCombiner] Factor out duplicated logic for an extload combine, NFC (5/N)

Part of the logic for combining (zext (load ...)) and (sext (load ...))
is duplicated. This creates problems because bugs in one version have to
be fixed again in the other version.

To address this, as a first step, I've extracted the duplicate logic
into a helper. I'll fix the debug location bug in the helper and
eliminate the copy of its logic in a followup.

Part of: llvm.org/PR37262

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332117 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp