[PATCH] D136524: [InstCombine] Handle select inst when eliminating constant memcpy

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 08:28:43 PST 2023


gandhi21299 marked an inline comment as done.
gandhi21299 added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/ptr-replace-alloca.ll:397-399
+  %ptr = select i1 %cond, ptr %alloca, ptr %p
+  %val = getelementptr inbounds [32 x i8], ptr %alloca, i32 0, i32 2
+  %load = load i8, ptr %val
----------------
nikic wrote:
> Otherwise the select is simply unused, and this doesn't show the desired transform.
Despite the change from 256 to 32 and your comment above, I stil get the same result. Some other instcombine optimization optimizes this function out apparently.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136524



More information about the llvm-commits mailing list