R600: Add pattern for SHA-256 Ma function

This can be optimized using the BFI_INT instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181033 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard
2013-05-03 17:21:20 +00:00
parent 218b20a81e
commit 83f0a5a5e8
4 changed files with 35 additions and 0 deletions

View File

@@ -276,6 +276,14 @@ multiclass BFIPatterns <Instruction BFI_INT> {
}
// SHA-256 Ma patterns
// ((x & z) | (y & (x | z))) -> BFI_INT (XOR x, y), z, y
class SHA256MaPattern <Instruction BFI_INT, Instruction XOR> : Pat <
(or (and i32:$x, i32:$z), (and i32:$y, (or i32:$x, i32:$z))),
(BFI_INT (XOR i32:$x, i32:$y), i32:$z, i32:$y)
>;
include "R600Instructions.td"
include "SIInstrInfo.td"