[SelectionDAG] Don't inspect !range metadata for extended loads
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 28 Oct 2015 03:20:10 +0000 (03:20 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 28 Oct 2015 03:20:10 +0000 (03:20 +0000)
commit0c67849a499b67fbfdbad4e3a9b2d6f0222371b3
tree9d6abaefa6f66fc3f7f493ffe0f14fd980b4510b
parente7c323a364c3ae3ce1cb20f55a755bf8f3512a8a
[SelectionDAG] Don't inspect !range metadata for extended loads

Summary:
Don't call `computeKnownBitsFromRangeMetadata` for extended loads --
this can cause a mismatch between the width of the !range metadata and
the width of the APInt's accumulating `KnownZero` (and `KnownOne` in the
future).  This isn't a problem now, but will be after a future change.

Note: this can be made more aggressive in the future.

Reviewers: nlewycky

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14107

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251486 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/PowerPC/selectiondag-extload-computeknownbits.ll [new file with mode: 0644]