[all-commits] [llvm/llvm-project] 5ac89a: [InstCombine] remove unnecessary one-use check fro...

RotateRight via All-commits all-commits at lists.llvm.org
Thu Oct 8 12:09:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ac89add1e380b7e32cb50ebaf2c38ef660b3114
      https://github.com/llvm/llvm-project/commit/5ac89add1e380b7e32cb50ebaf2c38ef660b3114
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/sub-xor.ll

  Log Message:
  -----------
  [InstCombine] remove unnecessary one-use check from add-xor transform

Pre-conditions seem to be optimal, but we don't need a use check
because we are only replacing an add with a sub.

https://rise4fun.com/Alive/hzN

  Pre: (~C1 | C2 == -1) && isPowerOf2(C2+1)
  %m = and i8 %x, C1
  %f = xor i8 %m, C2
  %r = add i8 %f, C3
  =>
  %r = sub i8 C2 + C3, %m




More information about the All-commits mailing list