[AArch64] Fix useful bits detection for BFM instructions
authorSilviu Baranga <silviu.baranga@arm.com>
Wed, 30 Nov 2016 17:04:22 +0000 (17:04 +0000)
committerSilviu Baranga <silviu.baranga@arm.com>
Wed, 30 Nov 2016 17:04:22 +0000 (17:04 +0000)
commitaab65b155e5bec8d89bde61276a37268e0c22d1d
treebbd0e4f98a5c4f0434ddda7b1bc509c82f625a59
parent2c6f75ddc51f486f17c07f6215bca0848d3d84fe
[AArch64] Fix useful bits detection for BFM instructions

Summary:
When computing useful bits for a BFM instruction, we need
to take into consideration the case where both operands
of the BFM are equal and provide data that we need to track.

Not doing this can cause us to miss useful bits.

Fixes PR31138 (https://llvm.org/bugs/show_bug.cgi?id=31138)

Reviewers: t.p.northover, jmolloy

Subscribers: evandro, gberry, srhines, pirama, mcrosier, aemerson, llvm-commits, rengolin

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

llvm-svn: 288253
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
llvm/test/CodeGen/AArch64/arm64-bitfield-extract.ll