[all-commits] [llvm/llvm-project] 940061: [InstCombine] Fold (mul(abs(x), abs(x))) -> (mul(x, ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon May 4 07:22:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 940061438e95bcdcaa3b4317c42df98347c084a1
      https://github.com/llvm/llvm-project/commit/940061438e95bcdcaa3b4317c42df98347c084a1
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-05-04 (Mon, 04 May 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/mul.ll

  Log Message:
  -----------
  [InstCombine] Fold (mul(abs(x),abs(x))) -> (mul(x,x)) (PR39476)

This patch adds support for discarding integer absolutes (abs + nabs variants) from self-multiplications.

ABS Alive2: http://volta.cs.utah.edu:8080/z/rwcc8W
NABS Alive2: http://volta.cs.utah.edu:8080/z/jZXUwQ

This is an InstCombine version of D79304 - I'm not sure yet if we'll need that after this.

Reviewed By: @lebedev.ri and @xbolva00

Differential Revision: https://reviews.llvm.org/D79319




More information about the All-commits mailing list