[llvm] [IRBuilder][GlobalISel] Add byte ptr cast support in IRBuilder (PR #222049)

Anshil Gandhi via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 10:46:48 PDT 2026


================
@@ -140,9 +146,7 @@ Value *IRBuilderBase::CreateBitPreservingCastChain(const DataLayout &DL,
   };
 
   // See if we need inttoptr for this type pair. May require additional bitcast.
-  bool OldIsIntLike =
-      OldTy->isIntOrIntVectorTy() || OldTy->isByteOrByteVectorTy();
-  if (OldIsIntLike && NewTy->isPtrOrPtrVectorTy()) {
+  if (OldTy->isIntOrIntVectorTy() && NewTy->isPtrOrPtrVectorTy()) {
----------------
gandhi56 wrote:

I will push a PR to correct the documentation.

https://github.com/llvm/llvm-project/pull/222049


More information about the llvm-commits mailing list