[DAG] SimplifyMultipleUseDemandedBits - drop unnecessary *_EXTEND_VECTOR_INREG cases
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 22 Jun 2020 11:11:11 +0000 (12:11 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 22 Jun 2020 11:35:32 +0000 (12:35 +0100)
commitecc5d7ee0d2caf34ff53788aa58dc87c6ef9efba
tree2d9de2e74d639514ee947c0a32665cb43220921e
parentb5b46601c0177ea214e7f95d5090f764c8f6e30a
[DAG] SimplifyMultipleUseDemandedBits - drop unnecessary *_EXTEND_VECTOR_INREG cases

For little endian targets, if we only need the lowest element and none of the extended bits then we can just use the (bitcasted) source vector directly.

We already do this in SimplifyDemandedBits, this adds the SimplifyMultipleUseDemandedBits equivalent.
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/known-signbits-vector.ll