This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Set the right SDLoc on extended SETCC uses
ClosedPublic

Authored by vsk on Apr 27 2018, 3:21 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

vsk created this revision.Apr 27 2018, 3:21 PM
vsk edited the summary of this revision. (Show Details)Apr 27 2018, 3:33 PM
niravd accepted this revision.Apr 30 2018, 7:51 AM

This patch looks fine modulo the comment made but that can be pushed into another patch.

LGTM.

This revision is now accepted and ready to land.Apr 30 2018, 7:51 AM
vsk retitled this revision from [DAGCombiner] Set the right SDLoc on extended SETCC uses (5/N) to [DAGCombiner] Set the right SDLoc on extended SETCC uses.May 1 2018, 12:51 PM
This revision was automatically updated to reflect the committed changes.