Re: Support for AVX512 ternary logic instruction

2019-01-21 Thread Richard Biener
On Mon, Jan 21, 2019 at 2:46 AM Andi Kleen wrote: > > Wojciech Muła writes: > > > > The main concern is if it's a proper approach? Seems that to match > > other logic functions, like "a & b | c", a separate pattern is required. > > Since an argument can be either negated or not, and we can use th

Re: Support for AVX512 ternary logic instruction

2019-01-20 Thread Andi Kleen
Wojciech Muła writes: > > The main concern is if it's a proper approach? Seems that to match > other logic functions, like "a & b | c", a separate pattern is required. > Since an argument can be either negated or not, and we can use three > logic ops (or, and, xor) there would be 72 patterns. So

Re: Support for AVX512 ternary logic instruction

2019-01-19 Thread H.J. Lu
On Sat, Jan 19, 2019 at 11:23 AM Wojciech Muła wrote: > > Hi all! > > One thing I miss in GCC is lack of support for the AVX512 ternary logic > instruction VPTERNLOG. This instruction evaluates any three-argument logic > function; this means that an expression like "a | b & ~c" can be folded into