diff options
author | Craig Topper <craig.topper@intel.com> | 2018-07-24 23:44:17 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-07-24 23:44:17 +0000 |
commit | 56c104f1049d6fce39aa671aa9d019bb5b14cdcb (patch) | |
tree | 6b1a67396692b659fd0762206f3ca41ccd42ffbe /llvm/lib | |
parent | b5342b592e1ec303fdd9cd0f96e290d7996a7344 (diff) | |
download | bcm5719-llvm-56c104f1049d6fce39aa671aa9d019bb5b14cdcb.tar.gz bcm5719-llvm-56c104f1049d6fce39aa671aa9d019bb5b14cdcb.zip |
[X86] Use a two lea sequence for multiply by 37, 41, and 73.
These fit a pattern used by 11, 21, and 19.
llvm-svn: 337871
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 352e8170007..c1fb981e739 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -33716,6 +33716,9 @@ static SDValue combineMulSpecial(uint64_t MulAmt, SDNode *N, SelectionDAG &DAG, case 21: // mul x, 21 => add ((shl (mul x, 5), 2), x) return combineMulShlAddOrSub(5, 2, /*isAdd*/ true); + case 41: + // mul x, 41 => add ((shl (mul x, 5), 3), x) + return combineMulShlAddOrSub(5, 3, /*isAdd*/ true); case 22: // mul x, 22 => add (add ((shl (mul x, 5), 2), x), x) return DAG.getNode(ISD::ADD, DL, VT, N->getOperand(0), @@ -33723,6 +33726,12 @@ static SDValue combineMulSpecial(uint64_t MulAmt, SDNode *N, SelectionDAG &DAG, case 19: // mul x, 19 => add ((shl (mul x, 9), 1), x) return combineMulShlAddOrSub(9, 1, /*isAdd*/ true); + case 37: + // mul x, 37 => add ((shl (mul x, 9), 2), x) + return combineMulShlAddOrSub(9, 2, /*isAdd*/ true); + case 73: + // mul x, 73 => add ((shl (mul x, 9), 3), x) + return combineMulShlAddOrSub(9, 3, /*isAdd*/ true); case 13: // mul x, 13 => add ((shl (mul x, 3), 2), x) return combineMulShlAddOrSub(3, 2, /*isAdd*/ true); |