[llvm] r360239 - R600InstrInfo.cpp - Add getTransSwizzle assert for the swizzle op index. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 03:39:56 PDT 2019
Author: rksimon
Date: Wed May 8 03:39:56 2019
New Revision: 360239
URL: http://llvm.org/viewvc/llvm-project?rev=360239&view=rev
Log:
R600InstrInfo.cpp - Add getTransSwizzle assert for the swizzle op index. NFCI.
Fixes static analyzer undefined value warning.
Modified:
llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp?rev=360239&r1=360238&r2=360239&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp Wed May 8 03:39:56 2019
@@ -401,6 +401,7 @@ Swizzle(std::vector<std::pair<int, unsig
}
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};
More information about the llvm-commits
mailing list