[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 17 14:00:19 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 understand, though I can follow up with additional PRs to fix the correctness issues. I have a longstanding PR to improve the LoadStoreVectorizer and this PR is a blocking it from working correctly.

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


More information about the llvm-commits mailing list