[all-commits] [llvm/llvm-project] 4a66a1: [InstCombine] allow vectors for masked-add -> xor ...

RotateRight via All-commits all-commits at lists.llvm.org
Tue Nov 17 10:36:31 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a66a1d17abfb7cf34081f0620cb2f53b40cca97
      https://github.com/llvm/llvm-project/commit/4a66a1d17abfb7cf34081f0620cb2f53b40cca97
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
    M llvm/test/Transforms/InstCombine/and.ll

  Log Message:
  -----------
  [InstCombine] allow vectors for masked-add -> xor fold

https://rise4fun.com/Alive/I4Ge

  Name: add with pow2 mask
  Pre: isPowerOf2(C2) && (C1 & C2) != 0 && (C1 & (C2-1)) == 0
  %a = add i8 %x, C1
  %r = and i8 %a, C2
  =>
  %n = and i8 %x, C2
  %r = xor i8 %n, C2




More information about the All-commits mailing list