[PATCH] D129715: [LoongArch] Heuristically load FP immediates by movgr2fr from materialized integer

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 19:48:51 PDT 2022


xen0n accepted this revision.
xen0n added a comment.

I don't know if you did the experiments thoroughly and found out 2 is the optimal threshold (on SPEC2006), or if it was just an arbitrary choice ("拍脑袋").

You could mention how the threshold was chosen, in case it is indeed arbitrary but others wrongly assume it's something related to micro-architecture details, or empirically verified.



================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:874
+    return true;
+  // f64 imm is legal if the bitcasted integer can be materialized within 2
+  // instructions.
----------------
nit: `bitcast` -- the verb "cast"'s past participle is itself, so is the compound word "bitcast".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129715



More information about the llvm-commits mailing list