summaryrefslogtreecommitdiff
path: root/lib/Target/R600/AMDGPUInstructions.td
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-05-03 17:21:20 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-05-03 17:21:20 +0000
commit83f0a5a5e8e132b3ce39f15ed2583ad344b88ec4 (patch)
tree724d830066a560147a6f33911b837b5e16213171 /lib/Target/R600/AMDGPUInstructions.td
parent218b20a81e28ab069dd69684f1a8208ec8e1704c (diff)
downloadllvm-83f0a5a5e8e132b3ce39f15ed2583ad344b88ec4.tar.gz
llvm-83f0a5a5e8e132b3ce39f15ed2583ad344b88ec4.tar.bz2
llvm-83f0a5a5e8e132b3ce39f15ed2583ad344b88ec4.tar.xz
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
Diffstat (limited to 'lib/Target/R600/AMDGPUInstructions.td')
-rw-r--r--lib/Target/R600/AMDGPUInstructions.td8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/R600/AMDGPUInstructions.td b/lib/Target/R600/AMDGPUInstructions.td
index 83e1359950..b44d2482d5 100644
--- a/lib/Target/R600/AMDGPUInstructions.td
+++ b/lib/Target/R600/AMDGPUInstructions.td
@@ -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"