5 ms·
Here's a fancy trick from LLVM source: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp#L4397-L4401 https://github.com/llv
by mmozeiko 3y ago
Here's a fancy trick from LLVM source: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp#L4397-L4401 https://github.com/llvm/llvm-project/blob/main/llvm/lib/Targ...
#define A 0xf0
#define B 0xcc
#define C 0xaa
And then you can build immediate for VPTERNLOG operation by writing bitwise expression with A/B/C values in source code.
For example, A^B^C=150. A^(~B&C)=210. And so on...
Also mentioned by Fabian here: https://twitter.com/rygorous/status/1187032693944410114 https://twitter.com/rygorous/status/1187032693944410114