[AArch64] Fix a corner case in BitFeild select
authorWeiming Zhao <weimingz@codeaurora.org>
Tue, 1 Dec 2015 19:17:49 +0000 (19:17 +0000)
committerWeiming Zhao <weimingz@codeaurora.org>
Tue, 1 Dec 2015 19:17:49 +0000 (19:17 +0000)
commit6a07b977968eafc8ead24c5b973fd44091c8aa73
tree4fe0a1e7e4504078018e673c64ac69634c3420cb
parent2320de6adb4f38633ae1698ac522def2bf0aacc5
[AArch64] Fix a corner case in BitFeild select

Summary:
When not useful bits, BitWidth becomes 0 and APInt will not be happy.

See https://llvm.org/bugs/show_bug.cgi?id=25571

We can just mark the operand as IMPLICIT_DEF is none bits of it is used.

Reviewers: t.p.northover, jmolloy

Subscribers: gberry, jmolloy, mgrang, aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254440 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
test/CodeGen/AArch64/bitfield-insert.ll