[PATCH] D106222: [X86] Don't use known bits to simplify shuffles.

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 17 18:49:08 PDT 2021


xiangzhangllvm added a comment.

> The result of a shufflevector must not propagate poison from any element other than the one noted in the shuffle mask.
> However, this means the 2a419a0b <https://reviews.llvm.org/rG2a419a0b9957ebac9e11e4b43bc9fbe42a9207df> transform isn't safe: if a lane in the result of a shufflevector is supposed to be zero, it has to actually be zero, not zero-or-poison.

Sorry, I still not much understand, where we got the poison value in following transformation.
computeKnownBits will only meet "AssertZext %f  i8", how does it know there will be poison value ?

  %f = fptoui <4 x float> %arg to <4 x i8> -->   fptosi <4 x float> %1 to <4 x i16> + AssertZext  %f,  i8


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106222



More information about the llvm-commits mailing list