[Assignment Tracking] Remove assertion from DbgAssignIntrinsic::setAddress
authorOCHyams <orlando.hyams@sony.com>
Fri, 31 Mar 2023 13:17:52 +0000 (14:17 +0100)
committerOCHyams <orlando.hyams@sony.com>
Fri, 31 Mar 2023 13:22:25 +0000 (14:22 +0100)
Follow up to https://reviews.llvm.org/D146987.

Remove assertion that the Value must be a pointer type. This fires in
real-world examples e.g. by codegenprepare introducing ptrtoint conversions.

The buildbots have not caught up yet but without this change the test
compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp fails with an ICE.

llvm/lib/IR/IntrinsicInst.cpp

index e120491..1c78d4b 100644 (file)
@@ -213,8 +213,6 @@ void DbgAssignIntrinsic::setAssignId(DIAssignID *New) {
 }
 
 void DbgAssignIntrinsic::setAddress(Value *V) {
-  assert(V->getType()->isPointerTy() &&
-         "Destination Component must be a pointer type");
   setOperand(OpAddress,
              MetadataAsValue::get(getContext(), ValueAsMetadata::get(V)));
 }