llvm.org GIT mirror llvm / 7946b10
AMDGPU: Replace assert(false) with unreachable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287013 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 3 years ago
3 changed file(s) with 18 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
10551055 RegWidth++;
10561056 return true;
10571057 default:
1058 assert(false); return false;
1058 llvm_unreachable("unexpected register kind");
10591059 }
10601060 }
10611061
11771177 }
11781178
11791179 default:
1180 assert(false); return false;
1180 llvm_unreachable("unexpected register kind");
11811181 }
11821182
11831183 if (!subtargetHasRegister(*TRI, Reg))
24612461 } else if (Op.isImmModifier()) {
24622462 OptionalIdx[Op.getImmTy()] = I;
24632463 } else {
2464 assert(false);
2464 llvm_unreachable("unexpected operand type");
24652465 }
24662466 }
24672467
24972497 } else if (Op.isImmModifier()) {
24982498 OptionalIdx[Op.getImmTy()] = I;
24992499 } else {
2500 assert(false);
2500 llvm_unreachable("unexpected operand type");
25012501 }
25022502 }
25032503
27072707 } else if (Op.isImm()) {
27082708 OptionalIdx[Op.getImmTy()] = I;
27092709 } else {
2710 assert(false);
2710 llvm_unreachable("unhandled operand type");
27112711 }
27122712 }
27132713
229229 // ToDo: unclear if s[88:104] is available on VI. Can we use VCC as SGPR in
230230 // this bundle?
231231 default:
232 assert(false);
233 break;
234 }
235 if (Val % (1 << shift))
232 llvm_unreachable("unhandled register class");
233 }
234
235 if (Val % (1 << shift)) {
236236 *CommentStream << "Warning: " << getRegClassName(SRegClassID)
237237 << ": scalar reg isn't aligned " << Val;
238 }
239
238240 return createRegOperand(SRegClassID, Val >> shift);
239241 }
240242
474476 return false;
475477 }
476478
479 void AMDGPUSymbolizer::tryAddingPcLoadReferenceComment(raw_ostream &cStream,
480 int64_t Value,
481 uint64_t Address) {
482 llvm_unreachable("unimplemented");
483 }
484
477485 //===----------------------------------------------------------------------===//
478486 // Initialization
479487 //===----------------------------------------------------------------------===//
113113
114114 void tryAddingPcLoadReferenceComment(raw_ostream &cStream,
115115 int64_t Value,
116 uint64_t Address) override {
117 assert(false && "Implement if needed");
118 }
116 uint64_t Address) override;
119117 };
120118
121119 } // namespace llvm