[NFC]: AArch64-SVE
authorHassnaa Hamdi <hassnaa.hamdi@arm.com>
Fri, 23 Sep 2022 11:51:19 +0000 (11:51 +0000)
committerHassnaa Hamdi <hassnaa.hamdi@arm.com>
Fri, 23 Sep 2022 12:07:31 +0000 (12:07 +0000)
modify some comments

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/AArch64/sve-fixed-length.ll

index e3c2086..725d263 100644 (file)
@@ -2057,7 +2057,8 @@ InstructionCost AArch64TTIImpl::getArithmeticInstrCost(
         Opcode, Ty, CostKind, Op1Info, Op2Info);
     if (Ty->isVectorTy()) {
       if (TLI->isOperationLegalOrCustom(ISD, LT.second) && ST->hasSVE()) {
-        // SDIV/UDIV operations are lowered, then we can have less costs.
+        // SDIV/UDIV operations are lowered using SVE, then we can have less
+        // costs.
         if (isa<FixedVectorType>(Ty) &&
             cast<FixedVectorType>(Ty)->getPrimitiveSizeInBits().getFixedSize() <
                 128) {
index 05afbea..1c34e4f 100644 (file)
@@ -60,9 +60,8 @@ define void @add() #0 {
 
 ; Assuming base_cost = 2
 ; Assuming legalization_cost = (vec_len-1/VBITS)+1
-; Assuming extra cost of 8 for i8.
-; Assuming extra cost of 4 for i16.
-; The hard-coded expected cost is based on VBITS=128
+; For fixed-length vectors >= 128, if element type is i8, multiply the cost by 8.
+; For fixed-length vectors >= 128, if element type is i16, multiply the cost by 4.
 define void @sdiv() #0 {
 ; CHECK-LABEL: function 'sdiv'
 
@@ -110,9 +109,8 @@ define void @sdiv() #0 {
 
 ; Assuming base_cost = 2
 ; Assuming legalization_cost = (vec_len-1/VBITS)+1
-; Assuming extra cost of 8 for i8.
-; Assuming extra cost of 4 for i16.
-; The hard-coded expected cost is based on VBITS=128
+; For fixed-length vectors >= 128, if element type is i8, multiply the cost by 8.
+; For fixed-length vectors >= 128, if element type is i16, multiply the cost by 4.
 define void @udiv() #0 {
 ; CHECK-LABEL: function 'udiv'