]> granicus.if.org Git - llvm/commit
[PPC] Fix assertion failure during binary encoding with -mcpu=pwr9
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Mon, 29 May 2017 07:12:39 +0000 (07:12 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Mon, 29 May 2017 07:12:39 +0000 (07:12 +0000)
commit2f498526c2ea8aba83520ec2a62ed331e5bfbf5e
tree9e9772dda62b148b6f31893b8b0a3b6e2705f465
parent0aa64f381a88d08757708d283b550e049807c962
[PPC] Fix assertion failure during binary encoding with -mcpu=pwr9

Summary
clang -c -mcpu=pwr9 test/CodeGen/PowerPC/build-vector-tests.ll causes an assertion failure during the binary encoding.
The failure occurs when a D-form load instruction takes two register operands instead of a register + an immediate.

This patch fixes the problem and also adds an assertion to catch this failure earlier before the binary encoding (i.e. during lit test).
The fix is from Nemanja Ivanovic @nemanjai.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304133 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrVSX.td