aqjune added a comment.

In D93793#3221414 <https://reviews.llvm.org/D93793#3221414>, @Allen wrote:

> I have a babyism question, why poison is preferred to the undef in the 
> pattern ConstantVector::getSplat ?

Hi Allen,
It is because folding poison is easier than folding undef. :)
For example, according to the poison propagating rule, 'and i32 poison, 1' can 
be simplified into 'i32 poison'. However, 'and undef, 1' cannot be folded into 
'undef' since the mask enforces all bits but LSB 0. 
This patch helps simplifications happen more easily.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93793

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to