[llvm] 42b44fe - [Assignment Tracking] Remove assertion from DbgAssignIntrinsic::setAddress

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 06:23:23 PDT 2023


Author: OCHyams
Date: 2023-03-31T14:22:25+01:00
New Revision: 42b44fef7611cb1bfe851533f27e4be67e55571f

URL: https://github.com/llvm/llvm-project/commit/42b44fef7611cb1bfe851533f27e4be67e55571f
DIFF: https://github.com/llvm/llvm-project/commit/42b44fef7611cb1bfe851533f27e4be67e55571f.diff

LOG: [Assignment Tracking] Remove assertion from DbgAssignIntrinsic::setAddress

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.

Added: 
    

Modified: 
    llvm/lib/IR/IntrinsicInst.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp
index e120491fe3861..1c78d4ba1a43b 100644
--- a/llvm/lib/IR/IntrinsicInst.cpp
+++ b/llvm/lib/IR/IntrinsicInst.cpp
@@ -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)));
 }


        


More information about the llvm-commits mailing list