[PATCH] D55819: [SelectionDAG] Optional handling of UNDEF elements in matchUnaryPredicate

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 06:34:01 PST 2018


andreadb added a comment.

I think this is the right way to go.

SimplifyDemandedVectorElts is getting better and better at identifying unused lanes of a vector. The more we improve that logic, the higher the risk of propagating undefs to unused lanes of a constant build_vector. Teaching `matchUnaryPredicate` (and, in future, `matchBinaryPredicate` too) how/when to ignore undef elements makes a lot of sense to me. It makes the logic resilient to the presence of undefs, and it avoids unexpected regressions (indirectly caused by the aggressive propagation of undefs).


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55819





More information about the llvm-commits mailing list