[llvm] [llvm][AArch64] Improve the cost model for i128 div's (PR #107306)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 14:49:57 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 26ba186bd0a22fac7d08ed566b00c03236b6b7a9 5160fc401f21074422ae01970e70d532ce8ff02d --extensions cpp -- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 7b39889e23..e6205446f6 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -3223,8 +3223,8 @@ InstructionCost AArch64TTIImpl::getArithmeticInstrCost(
       return Cost;
     }
 
-    // sdiv i128 are lowered as a libcall, which was microbenchmarked on an Apple M2
-    // Max as taking around 16 cycles.
+    // sdiv i128 are lowered as a libcall, which was microbenchmarked on an
+    // Apple M2 Max as taking around 16 cycles.
     if (TLI->getValueType(DL, Ty) == MVT::i128)
       return 16;
 
@@ -3246,8 +3246,8 @@ InstructionCost AArch64TTIImpl::getArithmeticInstrCost(
       }
     }
 
-    // udiv i128 are lowered as a libcall, which was microbenchmarked on an Apple M2
-    // Max as taking around 14 cycles.
+    // udiv i128 are lowered as a libcall, which was microbenchmarked on an
+    // Apple M2 Max as taking around 14 cycles.
     if (TLI->getValueType(DL, Ty) == MVT::i128)
       return 14;
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/107306


More information about the llvm-commits mailing list