[PATCH] D148275: [InstCombine] support fold select(X|Y,X|Y,X) to X|Y

Jun Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 01:36:14 PDT 2023


junaire added inline comments.


================
Comment at: llvm/test/Transforms/InstSimplify/select_or_and.ll:11
+  %or = or i32 %y, %x
+  %cmp = icmp eq i32 %or, 0
+  %ret = select i1 %cmp, i32 %x, i32 %or
----------------
HerrCai0907 wrote:
> goldstein.w.n wrote:
> > Can you split the next tests to a prior patch so we can see the diff this patch generates?
> before this patch, opt won't do any optimization for this code. Diff between the original code and the checked code is what this patch does.
That's expected. We want to see opt does no optimization for the tests so if you can split the tests into a parent revision then we can see very clearly the changes your patch does in the Phab. Similar to (https://github.com/llvm/llvm-project/commit/87c97d052cfd6dc0c03e5e36be1315f659f9f0ac)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148275



More information about the llvm-commits mailing list