aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2022-03-03 10:42:57 +0000
committerDavid Green <david.green@arm.com>2022-03-03 10:42:57 +0000
commit65c0e45a3790c391a0e87d9150c993dbb6537dee (patch)
tree861a728527503bf3c60bff96e71a387affea59e8 /llvm/lib
parent926f77dc228791ce62af8f4a3c512763e2be3ffa (diff)
downloadllvm-65c0e45a3790c391a0e87d9150c993dbb6537dee.zip
llvm-65c0e45a3790c391a0e87d9150c993dbb6537dee.tar.gz
llvm-65c0e45a3790c391a0e87d9150c993dbb6537dee.tar.bz2
[AArch64] Vector shifts cost 1
The costs of vector shifts was 2 as opposed to 1, as the nodes are marked custom. Fix this like the others and mark the nodes as cheap. Differential Revision: https://reviews.llvm.org/D120773
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 7429c1b..e5b530d 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -1824,6 +1824,9 @@ InstructionCost AArch64TTIImpl::getArithmeticInstrCost(
case ISD::XOR:
case ISD::OR:
case ISD::AND:
+ case ISD::SRL:
+ case ISD::SRA:
+ case ISD::SHL:
// These nodes are marked as 'custom' for combining purposes only.
// We know that they are legal. See LowerAdd in ISelLowering.
return (Cost + 1) * LT.first;