OSDN Git Service

[DAG] optimize away an arithmetic-right-shift of a 0 or -1 value
authorSanjay Patel <spatel@rotateright.com>
Mon, 17 Oct 2016 15:58:28 +0000 (15:58 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 17 Oct 2016 15:58:28 +0000 (15:58 +0000)
commit6eae33cd6bb8abde69cecd0274077a6fa9844140
tree00e692183b3ca13692ededb971df27c4f7e5144d
parentc595aad3caaa2e6ff06d8e9213272ea7566453c9
[DAG] optimize away an arithmetic-right-shift of a 0 or -1 value

This came up as part of:
https://reviews.llvm.org/D25485

Note that the vector case is missed because ComputeNumSignBits() is deficient for vectors.

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