[PATCH] D134064: [InstCombine] Baseline tests for folding and-of-selects to xor

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 10:24:11 PST 2022


spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/select_and_icmpeq.ll:42
+;
+  %z = add i4 1, 1
+  %s1 = select i1 %x, i4 %z, i4 5
----------------
There are still a bunch of lines like this that reduce immediately to a constant. Those lines should be removed and replace the uses of that value with the constant in the rest of the test. 

If the test doesn't provide any new coverage with that adjustment, then remove the whole test.


================
Comment at: llvm/test/Transforms/InstCombine/select_and_icmpeq.ll:86
+  %u0 = or i8 %u, 3   ; set two LSB
+  %v = and i8 %u0, 1  ; clear all bits
+
----------------
clear all but low bit?


================
Comment at: llvm/test/Transforms/InstCombine/select_and_icmpeq.ll:165
+;
+  %z0 = and i32 %z, -1 ; LSB is set
+  %t = or i32 %z0, 42  ; set some other bits
----------------
This is a no-op. Was this supposed to be an 'or %z, 1'?


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