[PATCH] D87790: [ARM] Select f32 constants with vmov.f16

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 19:02:22 PDT 2020


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM

On a side-note, should we be trying to emit movw+vmov instead of a constant-pool load under any circumstances?



================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h:693
+  inline int getFP32FP16Imm(const APInt &Imm) {
+    if (Imm.countLeadingZeros() < 16)
+      return -1;
----------------
I'd probably write this as `if (Imm.getActiveBits() > 16)`, so both instances of "16" refer to the same thing.  But not a big deal either way.


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

https://reviews.llvm.org/D87790



More information about the llvm-commits mailing list