@@ -276,8 +276,8 @@ namespace {
276
276
277
277
private:
278
278
void validate () const {
279
- IGC_ASSERT ((ShiftedMask_ % 2 == 1 || CurCat_ == RegCategory::NUMCATEGORIES) &&
280
- " invalid state" );
279
+ IGC_ASSERT_MESSAGE ((ShiftedMask_ % 2 == 1 || CurCat_ == RegCategory::NUMCATEGORIES),
280
+ " invalid state" );
281
281
}
282
282
};
283
283
@@ -341,8 +341,10 @@ namespace {
341
341
// When there's no real category uses (real is anything but NONE)
342
342
// behavior is undefined.
343
343
unsigned getMostUsedCat () const {
344
- IGC_ASSERT (!empty () && !allHaveCat (RegCategory::NONE) &&
345
- " works only for cases when there are uses with real categories" );
344
+ IGC_ASSERT_MESSAGE (!empty (),
345
+ " works only for cases when there are uses with real categories" );
346
+ IGC_ASSERT_MESSAGE (!allHaveCat (RegCategory::NONE),
347
+ " works only for cases when there are uses with real categories" );
346
348
return MostUsedCat_;
347
349
}
348
350
@@ -356,7 +358,7 @@ namespace {
356
358
Conv->insertAfter (Inst);
357
359
Conv->setDebugLoc (Inst->getDebugLoc ());
358
360
} else {
359
- IGC_ASSERT (isa<Argument>(Def) && " must be an argument if not an instruction" );
361
+ IGC_ASSERT_MESSAGE (isa<Argument>(Def), " must be an argument if not an instruction" );
360
362
// Original value is a function argument. Insert at the start of the
361
363
// function.
362
364
Conv->insertBefore (&*Func->begin ()->begin ());
@@ -652,7 +654,7 @@ bool GenXCategory::processValue(Value *V)
652
654
// The "no categories at all" case can only happen for a value that is
653
655
// defined by a function argument or a phi node and used only in phi
654
656
// nodes or subroutine call args.
655
- IGC_ASSERT ((isa<Argument>(V) || isa<PHINode>(V)) && " no register category" );
657
+ IGC_ASSERT_MESSAGE ((isa<Argument>(V) || isa<PHINode>(V)), " no register category" );
656
658
return false ;
657
659
}
658
660
// Value defined with a category but only used in phi nodes.
@@ -684,7 +686,7 @@ bool GenXCategory::processValue(Value *V)
684
686
}
685
687
else
686
688
Conv = Convs[UseInfo.Cat ];
687
- IGC_ASSERT (Conv && " must have such conversion" );
689
+ IGC_ASSERT_MESSAGE (Conv, " must have such conversion" );
688
690
UseInfo.user ->setOperand (UseInfo.OperandNum , Conv);
689
691
}
690
692
}
@@ -707,7 +709,8 @@ bool GenXCategory::processValue(Value *V)
707
709
*/
708
710
Instruction *GenXCategory::createConversion (Value *V, unsigned Cat)
709
711
{
710
- IGC_ASSERT (V->getType ()->getScalarType ()->isIntegerTy () && " createConversion expects int type" );
712
+ IGC_ASSERT_MESSAGE (V->getType ()->getScalarType ()->isIntegerTy (),
713
+ " createConversion expects int type" );
711
714
if (Cat == RegCategory::ADDRESS) {
712
715
Value *Input = V;
713
716
int Offset = 0 ;
@@ -893,9 +896,9 @@ CategoryAndAlignment GenXCategory::getCategoryAndAlignmentForDef(Value *V) const
893
896
unsigned GenXCategory::getCategoryForInlasmConstraintedOp (CallInst *CI,
894
897
unsigned ArgNo,
895
898
bool IsOutput) const {
896
- IGC_ASSERT (CI->isInlineAsm () && " Inline asm expected" );
899
+ IGC_ASSERT_MESSAGE (CI->isInlineAsm (), " Inline asm expected" );
897
900
InlineAsm *IA = dyn_cast<InlineAsm>(IGCLLVM::getCalledValue (CI));
898
- IGC_ASSERT (!IA->getConstraintString ().empty () && " Here should be constraints" );
901
+ IGC_ASSERT_MESSAGE (!IA->getConstraintString ().empty (), " Here should be constraints" );
899
902
900
903
auto ConstraintsInfo = genx::getGenXInlineAsmInfo (CI);
901
904
0 commit comments