]> granicus.if.org Git - llvm/commit
[SelectionDAG] ComputeNumSignBits of TRUNCATE operations
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Nov 2016 11:29:19 +0000 (11:29 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Nov 2016 11:29:19 +0000 (11:29 +0000)
commit3d4bb544747aef47fcf0e8eb665610fe53bbab8b
treeea505f2598c563e4f1688332596f4ea03ea04a31
parentb6c1f00e0f7472c6c4b561d3d1b4df5f6a23f517
[SelectionDAG] ComputeNumSignBits of TRUNCATE operations

Add basic ComputeNumSignBits support for TRUNCATE ops for cases where the source's number of sign bits overlaps with the truncated size.

Improves X86 SIGN_EXTEND_IN_REG vector cases which were needlessly sign extending boolean vector results.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287635 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/avx512-mask-op.ll
test/CodeGen/X86/psubus.ll