mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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:
@@ -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"
|
||||
|
Reference in New Issue
Block a user