title: Truth-table reduction to ternary logic operations, vpternlog
body: <p>I have many truth-tables of many variables (7 or more) and I use a tool (eg logic friday 1) to simplify the logic formula. I could do that by hand but that is much too error prone. These formula I then translate to compiler intrinsics (eg <a href="https://github.com/HJLebbink/asm-dude/wiki/PXOR" rel="nofollow noreferrer">_mm_xor_epi32</a>) which works fine. </p>
  
  <p><strong>Question</strong>: with <a href="https://github.com/HJLebbink/asm-dude/wiki/VPTERNLOGD_VPTERNLOGQ" rel="nofollow noreferrer">vpternlog</a> I can make ternary logic operations. But I'm not aware of a method to simplify my truth-tables to sequences of vpternlog instructions that are (somewhat) efficient.</p>
  
  <p>I'm not asking if someone knows a tool that simplifies to arbitrary ternary logic operations, although that would be great, I'm looking for a method to do such simplifications. </p>
  
  <p>Edit: I asked a similar question on <a href="https://electronics.stackexchange.com/questions/342887/how-to-map-a-truth-table-to-ternary-logical-functions">Electrical Engineering</a>.</p>