[PATCH] D116398: [SelectionDAG][RISCV] Add preferred extend of value used for PHI node

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 10:00:52 PST 2021


craig.topper added a comment.

> With this optimization, we could perform bit extend in necessary BB,instead of all predecessors of
> return BB. At the same time, increase more machine CSE opportunities.

Why would the extend be in all predecessors? Wouldn't it just be in the block with the return?

Wouldn't this patch increase code size if none of the phi inputs were known to be sign extended? Your test just moves an extend to the block that produced %conv2 because %left and %right are already extended. But if they weren't wouldn't it increase the number of extends?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116398



More information about the llvm-commits mailing list