[PATCH] D125220: [InstCombine] (rot X, ?) == 0/-1 --> X == 0/-1

Chenbing.Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 19:11:38 PDT 2022


Chenbing.Zheng marked 3 inline comments as done.
Chenbing.Zheng added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/icmp-fsh.ll:62
   %rot = tail call <2 x i5> @llvm.fshl.v2i5(<2 x i5>%x, <2 x i5> %x, <2 x i5> %y)
   %r = icmp ne <2 x i5> %rot, <i5 -1, i5 undef>
   ret <2 x i1> %r
----------------
spatel wrote:
> We should add one more test that has "eq zero with undef", so the transform has better coverage. 
> 
> If there is not a test for a non-zero and non-negative-one, then please add that too. Then we know the transform does not happen with something like "<i5 undef, i5 1>".
I have committed tests, and the negative tests follow here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125220



More information about the llvm-commits mailing list