[PATCH] D92420: [PowerPC] Exploitation of xxeval instruction for AND and NAND

Baptiste Saleil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 07:55:18 PST 2020


bsaleil accepted this revision.
bsaleil added a comment.

LGTM, just a minor comment regarding the multiclass.



================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:2565
 
+multiclass xxevalPattern <dag pattern, bits<8> imm> {
+  def : Pat<(v4i32 pattern), (XXEVAL $vA, $vB, $vC, imm)>;
----------------
I think we don't need a multiclass here:
```class xxevalPattern <dag pattern, bits<8> imm> :                                
  Pat<(v4i32 pattern), (XXEVAL $vA, $vB, $vC, imm)> {}```


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:2585
+  // and(A, B, C)
+  defm : xxevalPattern<(and v4i32:$vA, (and v4i32:$vB, v4i32:$vC)), 1>;
+  // and(A, xor(B, C))
----------------
Then there is no need to use `defm` here


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92420/new/

https://reviews.llvm.org/D92420



More information about the llvm-commits mailing list