[PATCH] D113371: [X86] combinePMULH - recognise 'cheap' trunctions via PACKS/PACKUS as well as SEXT/ZEXT

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 09:41:58 PST 2021


RKSimon added a comment.

In D113371#3161727 <https://reviews.llvm.org/D113371#3161727>, @lebedev.ri wrote:

> Hm, i'm not sure i'm following, why is the truncation free if the dropped bits are zeros / why it won't be free otherwise?

Its not - IsTruncateFree is only true if we've extended both inputs, in which case truncating the inputs should be free, and we're better off doing that so we can perform the MULH on a smaller vector.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113371



More information about the llvm-commits mailing list