[all-commits] [llvm/llvm-project] 2e7ea9: [PowerPC] Exploit xxeval instruction for operation...

Tony Varghese via All-commits all-commits at lists.llvm.org
Sun Aug 31 21:44:15 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e7ea9c94504ddb45f8215e2e2bad4a875617648
      https://github.com/llvm/llvm-project/commit/2e7ea9c94504ddb45f8215e2e2bad4a875617648
  Author: Tony Varghese <tonypalampalliyil at gmail.com>
  Date:   2025-09-01 (Mon, 01 Sep 2025)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCInstrP10.td
    M llvm/test/CodeGen/PowerPC/xxeval-vselect-x-b.ll
    M llvm/test/CodeGen/PowerPC/xxeval-vselect-x-c.ll

  Log Message:
  -----------
  [PowerPC] Exploit xxeval instruction for operations of the form ternary(A,X,B) and ternary(A,X,C). (#152956)

Adds support for ternary equivalent operations of the form `ternary(A,
X, B)` and `ternary(A, X, C)` where `X=[and(B,C)| nor(B,C)| eqv(B,C)|
nand(B,C)]`.

The following are the patterns involved and the imm values:

| **Operation**              | **Immediate Value** |
|----------------------------|---------------------|
| ternary(A,  and(B,C),   B) | 49                  |
| ternary(A,  nor(B,C),   B) | 56                  |
| ternary(A,  eqv(B,C),   B) | 57                  |
| ternary(A,  nand(B,C),  B) | 62                  |
|                            |                     |
| ternary(A,  and(B,C),   C) | 81                  |
| ternary(A,  nor(B,C),   C) | 88                  |
| ternary(A,  eqv(B,C),   C) | 89                  |
| ternary(A,  nand(B,C),  C) | 94                  |

eg.  `xxeval XT, XA, XB, XC, 49` 
- performs `XA ? and(XB, XC) : B`and places the result in `XT`.

This is the continuation of [[PowerPC] Exploit xxeval instruction for
ternary patterns - ternary(A, X,
and(B,C))](https://github.com/llvm/llvm-project/pull/141733#top).

---------

Co-authored-by: Tony Varghese <tony.varghese at ibm.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list