R600InstrInfo.cpp - Add getTransSwizzle assert for the swizzle op index. NFCI.

Fixes static analyzer undefined value warning.

llvm-svn: 360239
This commit is contained in:
Simon Pilgrim 2019-05-08 10:39:56 +00:00
parent aa1b6f1cfb
commit 02937dad69
1 changed files with 1 additions and 0 deletions

View File

@ -401,6 +401,7 @@ Swizzle(std::vector<std::pair<int, unsigned>> Src,
}
static unsigned getTransSwizzle(R600InstrInfo::BankSwizzle Swz, unsigned Op) {
assert(Op < 3 && "Out of range swizzle index");
switch (Swz) {
case R600InstrInfo::ALU_VEC_012_SCL_210: {
unsigned Cycles[3] = { 2, 1, 0};