[PATCH] D150595: [InstCombine] Simplify MemTransferInst with type inference

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 11:59:45 PDT 2023


gandhi21299 added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/memcpy_alloca.ll:83
+  %alloca = alloca half, align 2, addrspace(5)
+  %alloca.ascast = addrspacecast ptr addrspace(5) %alloca to ptr
+  call void @llvm.memcpy.p0.p0.i64(ptr %dest, ptr align 2 %alloca.ascast, i64 2, i1 false)
----------------
arsenm wrote:
> Why is the cast necessary for the test?
InstCombine reduces the function down to `ret void` when I remove the cast.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150595/new/

https://reviews.llvm.org/D150595



More information about the llvm-commits mailing list