HomePhabricator

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

Authored by spatel on Nov 17 2020, 10:24 AM.

Description

[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

Details

Committed
spatelNov 17 2020, 10:36 AM
Parents
rG49e0de5f6fe6: [X86] byval tests - replace X32 check prefix with X86. NFC.
Branches
Unknown
Tags
Unknown