summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorKarthik Bhat <kv.bhat@samsung.com>2014-12-22 13:38:58 +0000
committerKarthik Bhat <kv.bhat@samsung.com>2014-12-22 13:38:58 +0000
commitbf662901c1c7d94e23c359468ebca5e5e059419c (patch)
tree830e88fe6c26028575c0060702cad9558d568375 /llvm/lib
parent2645d33977bc6692c1d646289d99bcddf2eb1237 (diff)
downloadbcm5719-llvm-bf662901c1c7d94e23c359468ebca5e5e059419c.tar.gz
bcm5719-llvm-bf662901c1c7d94e23c359468ebca5e5e059419c.zip
Lower multiply-negate operation to mneg on AArch64
This patch pattern matches code such as- neg w8, w8 mul w8, w9, w8 to mneg w8, w8, w9 Review: http://reviews.llvm.org/D6754 llvm-svn: 224706
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64InstrInfo.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.td b/llvm/lib/Target/AArch64/AArch64InstrInfo.td
index 01a01e059a5..3f1dbe0bfc0 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.td
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.td
@@ -657,6 +657,10 @@ def : Pat<(i32 (ineg (mul GPR32:$Rn, GPR32:$Rm))),
(MSUBWrrr GPR32:$Rn, GPR32:$Rm, WZR)>;
def : Pat<(i64 (ineg (mul GPR64:$Rn, GPR64:$Rm))),
(MSUBXrrr GPR64:$Rn, GPR64:$Rm, XZR)>;
+def : Pat<(i32 (mul (ineg GPR32:$Rn), GPR32:$Rm)),
+ (MSUBWrrr GPR32:$Rn, GPR32:$Rm, WZR)>;
+def : Pat<(i64 (mul (ineg GPR64:$Rn), GPR64:$Rm)),
+ (MSUBXrrr GPR64:$Rn, GPR64:$Rm, XZR)>;
} // AddedComplexity = 7
let AddedComplexity = 5 in {
OpenPOWER on IntegriCloud