1. Dec 13, 2022
  2. Dec 12, 2022
    • Jakub Kuderski's avatar
      [mlir][arith] Simplify muli emulation with mului_extended · 3f36d2d5
      Jakub Kuderski authored
      Using `arith.mului_extended` makes it much simpler to emulate wide
      integer multiplication.
      
      Reviewed By: antiagainst
      
      Differential Revision: https://reviews.llvm.org/D139776
      3f36d2d5
    • Sanjay Patel's avatar
      [InstCombine] try to fold a pair of insertelements into one insertelement · 4446f71c
      Sanjay Patel authored
      This replaces patches that tried to convert related patterns to shuffles
      (D138872, D138873, D138874 - reverted/abandoned) but caused codegen
      problems and were questionable as a canonicalization because an
      insertelement is a simpler op than a shuffle.
      
      This detects a larger pattern -- insert-of-insert -- and replaces with
      another insert, so this hopefully does not cause any problems.
      
      As noted by TODO items in the code and tests, this could go a lot further.
      But this is enough to reduce the motivating test from issue #17113.
      
      Example proofs:
      https://alive2.llvm.org/ce/z/NnUv3a
      
      I drafted a version of this for AggressiveInstCombine, but it seems that
      would uncover yet another phase ordering gap. If we do generalize this to
      handle the full range of potential patterns, that may be worth looking at
      again.
      
      Differential Revision: https://reviews.llvm.org/D139668
      4446f71c