@@ -624,7 +624,7 @@ bool StoreFatPtrsAsIntsAndExpandMemcpyVisitor::visitMemMoveInst(
624
624
if (MMI.getSourceAddressSpace () != AMDGPUAS::BUFFER_FAT_POINTER &&
625
625
MMI.getDestAddressSpace () != AMDGPUAS::BUFFER_FAT_POINTER)
626
626
return false ;
627
- report_fatal_error (
627
+ reportFatalUsageError (
628
628
" memmove() on buffer descriptors is not implemented because pointer "
629
629
" comparison on buffer descriptors isn't implemented\n " );
630
630
}
@@ -738,10 +738,10 @@ Type *LegalizeBufferContentTypesVisitor::scalarArrayTypeAsVector(Type *T) {
738
738
return T;
739
739
Type *ET = AT->getElementType ();
740
740
if (!ET->isSingleValueType () || isa<VectorType>(ET))
741
- report_fatal_error (" loading non-scalar arrays from buffer fat pointers "
742
- " should have recursed" );
741
+ reportFatalUsageError (" loading non-scalar arrays from buffer fat pointers "
742
+ " should have recursed" );
743
743
if (!DL.typeSizeEqualsStoreSize (AT))
744
- report_fatal_error (
744
+ reportFatalUsageError (
745
745
" loading padded arrays from buffer fat pinters should have recursed" );
746
746
return FixedVectorType::get (ET, AT->getNumElements ());
747
747
}
@@ -1259,12 +1259,13 @@ Constant *FatPtrConstMaterializer::materializeBufferFatPtrConst(Constant *C) {
1259
1259
}
1260
1260
1261
1261
if (isa<GlobalValue>(C))
1262
- report_fatal_error ( " Global values containing ptr addrspace(7) (buffer "
1263
- " fat pointer) values are not supported" );
1262
+ reportFatalUsageError ( " global values containing ptr addrspace(7) (buffer "
1263
+ " fat pointer) values are not supported" );
1264
1264
1265
1265
if (isa<ConstantExpr>(C))
1266
- report_fatal_error (" Constant exprs containing ptr addrspace(7) (buffer "
1267
- " fat pointer) values should have been expanded earlier" );
1266
+ reportFatalUsageError (
1267
+ " constant exprs containing ptr addrspace(7) (buffer "
1268
+ " fat pointer) values should have been expanded earlier" );
1268
1269
1269
1270
return nullptr ;
1270
1271
}
@@ -1744,28 +1745,32 @@ Value *SplitPtrStructs::handleMemoryInst(Instruction *I, Value *Arg, Value *Ptr,
1744
1745
IID = Intrinsic::amdgcn_raw_ptr_buffer_atomic_fmin;
1745
1746
break ;
1746
1747
case AtomicRMWInst::FSub: {
1747
- report_fatal_error (" atomic floating point subtraction not supported for "
1748
- " buffer resources and should've been expanded away" );
1748
+ reportFatalUsageError (
1749
+ " atomic floating point subtraction not supported for "
1750
+ " buffer resources and should've been expanded away" );
1749
1751
break ;
1750
1752
}
1751
1753
case AtomicRMWInst::FMaximum: {
1752
- report_fatal_error (" atomic floating point fmaximum not supported for "
1753
- " buffer resources and should've been expanded away" );
1754
+ reportFatalUsageError (
1755
+ " atomic floating point fmaximum not supported for "
1756
+ " buffer resources and should've been expanded away" );
1754
1757
break ;
1755
1758
}
1756
1759
case AtomicRMWInst::FMinimum: {
1757
- report_fatal_error (" atomic floating point fminimum not supported for "
1758
- " buffer resources and should've been expanded away" );
1760
+ reportFatalUsageError (
1761
+ " atomic floating point fminimum not supported for "
1762
+ " buffer resources and should've been expanded away" );
1759
1763
break ;
1760
1764
}
1761
1765
case AtomicRMWInst::Nand:
1762
- report_fatal_error (" atomic nand not supported for buffer resources and "
1763
- " should've been expanded away" );
1766
+ reportFatalUsageError (
1767
+ " atomic nand not supported for buffer resources and "
1768
+ " should've been expanded away" );
1764
1769
break ;
1765
1770
case AtomicRMWInst::UIncWrap:
1766
1771
case AtomicRMWInst::UDecWrap:
1767
- report_fatal_error (" wrapping increment/decrement not supported for "
1768
- " buffer resources and should've ben expanded away" );
1772
+ reportFatalUsageError (" wrapping increment/decrement not supported for "
1773
+ " buffer resources and should've ben expanded away" );
1769
1774
break ;
1770
1775
case AtomicRMWInst::BAD_BINOP:
1771
1776
llvm_unreachable (" Not sure how we got a bad binop" );
@@ -2019,7 +2024,7 @@ PtrParts SplitPtrStructs::visitAddrSpaceCastInst(AddrSpaceCastInst &I) {
2019
2024
}
2020
2025
2021
2026
if (I.getSrcAddressSpace () != AMDGPUAS::BUFFER_RESOURCE)
2022
- report_fatal_error (
2027
+ reportFatalUsageError (
2023
2028
" only buffer resources (addrspace 8) and null/poison pointers can be "
2024
2029
" cast to buffer fat pointers (addrspace 7)" );
2025
2030
SplitUsers.insert (&I);
@@ -2225,8 +2230,8 @@ PtrParts SplitPtrStructs::visitIntrinsicInst(IntrinsicInst &I) {
2225
2230
IRB.SetInsertPoint (&I);
2226
2231
auto [Rsrc, Off] = getPtrParts (Ptr);
2227
2232
if (Mask->getType () != Off->getType ())
2228
- report_fatal_error (" offset width is not equal to index width of fat "
2229
- " pointer (data layout not set up correctly?)" );
2233
+ reportFatalUsageError (" offset width is not equal to index width of fat "
2234
+ " pointer (data layout not set up correctly?)" );
2230
2235
Value *OffRes = IRB.CreateAnd (Off, Mask, I.getName () + " .off" );
2231
2236
copyMetadata (OffRes, &I);
2232
2237
SplitUsers.insert (&I);
0 commit comments