[PATCH] D134064: [InstCombine] Baseline tests for folding ((x?1:4)&(y?1:4))==0 to x^y

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 11:59:55 PDT 2022


spatel added a comment.

Add negative tests where one of the select arms is a zero? Also, at least 1 test where the predicate is not equality, and a couple of tests where only one pair of the select operands are matching.



================
Comment at: llvm/test/Transforms/InstCombine/select_and_icmpeq.ll:33
+
+define i1 @select_and_icmpeq_i32_commuted3(i1 %x, i1 %y) {
+; CHECK-LABEL: @select_and_icmpeq_i32_commuted3(
----------------
None of these commuted variants are logically different than the 1st test; they really just swap variable names. I don't think they're adding much value.


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