[PATCH] D120428: [AArch64] Optimize safe integer division

Karl Meakin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 04:46:03 PST 2022


Kmeakin added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/checked-int-div.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=aarch64-gnu-linux -mcpu=neoversen1 -o - | FileCheck %s
+
----------------
dmgreen wrote:
> Kmeakin wrote:
> > dmgreen wrote:
> > > neoversen1 isn't a valid cpu. Does this not work in other cases due to the costs of div being too high to ifcvt?
> > `llc -mcpu=help --mtriple=aarch64--` lists `neoversen1` as an option. Any out of order CPU should do (the cost model defaults to in order, which results in div not being ifcvted)
> I think it would be "neoverse-n1", https://godbolt.org/z/5KEGbcfdo.
Oh, I see now that `neoversen1` is a "cpu feature" and `neoverse-n1` is the CPU. Interestingly, specifying `-mcpu=neoverse-n1` results in the if conversion not firing, but `-mcpu=neoversen1` (or any other unrecognised CPU) does result in if conversion. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120428/new/

https://reviews.llvm.org/D120428



More information about the llvm-commits mailing list