1. Dec 22, 2022
  2. Dec 21, 2022
    • Paul Walker's avatar
      [InstCombine] Bubble vector.reverse of binop operands to their result. · 0bca4468
      Paul Walker authored
      This mirrors a similar shufflevector transformation so the same
      effect is obtained for scalable vectors. The transformation is
      only performed when it can be proven the number of resulting
      reversals is not increased. By bubbling the reversals from operand
      to result this should typically be the case and ideally leads to
      back-back shuffles that can be elimitated entirely.
      
      Differential Revision: https://reviews.llvm.org/D139342
      0bca4468
    • Paul Walker's avatar
      [InstCombine] Bubble vector.reverse of select operands to their result. · 87c494b8
      Paul Walker authored
      This mirrors a similar shufflevector transformation so the same
      effect is obtained for scalable vectors. The transformation is
      only performed when it can be proven the number of resulting
      reversals is not increased. By bubbling the reversals from operand
      to result this should typically be the case and ideally leads to
      back-back shuffles that can be elimitated entirely.
      
      Differential Revision: https://reviews.llvm.org/D139339
      87c494b8
    • Paul Walker's avatar
      [InstCombine] Bubble vector.reverse of compare operands to their result. · 362c52ad
      Paul Walker authored
      This mirrors a similar shufflevector transformation so the same
      effect is obtained for scalable vectors. The transformation is
      only performed when it can be proven the number of resulting
      reversals is not increased. By bubbling the reversals from operand
      to result this should typically be the case and ideally leads to
      back-back shuffles that can be elimitated entirely.
      
      Differential Revision: https://reviews.llvm.org/D139340
      362c52ad
    • Matt Arsenault's avatar
      llvm-reduce: Remove test dependence on registered targets · d8fb46ee
      Matt Arsenault authored
      This reverts e4b126cc and
      e57ab8fe.
      
      This previously depended on where the target happened to construct (or
      not) the MachineFunctionInfo during the initial MIR construction. Now
      that the MachineFunctionInfo is consistently constructed at
      MachineFunction construction time, this should always work.
      d8fb46ee
    • Matt Arsenault's avatar
      CodeGen: Don't lazily construct MachineFunctionInfo · 69e75ae6
      Matt Arsenault authored
      This fixes what I consider to be an API flaw I've tripped over
      multiple times. The point this is constructed isn't well defined, so
      depending on where this is first called, you can conclude different
      information based on the MachineFunction. For example, the AMDGPU
      implementation inspected the MachineFrameInfo on construction for the
      stack objects and if the frame has calls. This kind of worked in
      SelectionDAG which visited all allocas up front, but broke in
      GlobalISel which hasn't visited any of the IR when arguments are
      lowered.
      
      I've run into similar problems before with the MIR parser and trying
      to make use of other MachineFunction fields, so I think it's best to
      just categorically disallow dependency on the MachineFunction state in
      the constructor and to always construct this at the same time as the
      MachineFunction itself.
      
      A missing feature I still could use is a way to access an custom
      analysis pass on the IR here.
      69e75ae6
    • Lei Huang's avatar
      [PowerPC] Implement P10 Byte Reverse Insructions · 7a7e9109
      Lei Huang authored
      Generate brh, brw and brd instructions for byte-swap operations
      on P10 and generating a single instruction for a 32-bit swap followed
      by a 16-bit right shift.
      
      Reviewed By: stefanp
      
      Differential Revision: https://reviews.llvm.org/D140414
      7a7e9109
    • David Green's avatar
      [AArch64] Combine Trunc(DUP) -> DUP · 3e65ad74
      David Green authored
      This adds a simple fold of TRUNCATE(AArch64ISD::DUP) -> AArch64ISD::DUP,
      which can help generate more optimal UMULL sequences, and seems useful
      in general.
      
      Differential Revision: https://reviews.llvm.org/D140289
      3e65ad74
    • Nikita Popov's avatar
      [InstCombine] Recursively replace select value equivalence · 79068275
      Nikita Popov authored
      In the X == C ? f(X) : Y -> X == C ? f(C) : Y fold, perform the
      replacement in f(X) recursively. For now, this just goes two
      instructions up rather than one instruction up.
      79068275