[PATCH] D134064: [InstCombine] Baseline tests for folding ((x?1:4)&(y?1:4))==0 to x^y
Marc Auberer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 09:39:39 PST 2022
marcauberer marked an inline comment as done.
marcauberer added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/select_and_icmpeq.ll:151
+;
+ %z = add i6 1, 2
+ %s1 = select i1 %x, i6 %z, i6 5
----------------
spatel wrote:
> marcauberer wrote:
> > spatel wrote:
> > > This (and similar other tests) doesn't provide the coverage that you were hoping for.
> > > This will be constant-folded before we ever reach the transform that we're hoping to unit-test.
> > > That's why the test is already completely reduced to "false". :)
> > Okay, shall I remove them?
> Yes - we don't want tests for other transforms as part of this patch.
> But we still need tests to verify that the transform to be added is behaving as expected.
> See if something like this works:
> https://alive2.llvm.org/ce/z/2er3z7
> ...and adjust as needed (make the false arm of the selects non-immediate too), so the tests provide coverage for more of the pattern variations.
The latest patchset should solve this ...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134064/new/
https://reviews.llvm.org/D134064
More information about the llvm-commits
mailing list