[PATCH] D57044: [AArch64] OOptimize floating point materialization

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 25 04:55:44 PST 2019


zatrazz updated this revision to Diff 183519.
zatrazz added a comment.

Patch updated based on previous comments. The isAnyMOVWMovAlias 
can catch more cases where we can materialize the floating-point constant
than isLogicalImmediate (128 .0 for instance). The positive zero still need to
be handled as specific case because the resulting fmov will use the zero
register instead of an immediate. The isAnyMOVWMovAlias path is not use 
for fp16 (I will need to check further if is safe for all cases).

As a side note there still some cases where we can materialize the a fp-constant 
without loads that current patch does not handle. The negative zero, for instance, 
can be materialized as 'movi    v0.2s, 0x80, lsl 24'. I will check how we can handle
cases like this.


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

https://reviews.llvm.org/D57044

Files:
  lib/Target/AArch64/AArch64FastISel.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  test/CodeGen/AArch64/fabs.ll
  test/CodeGen/AArch64/fadd-combines.ll
  test/CodeGen/AArch64/fpimm.ll
  test/CodeGen/AArch64/isinf.ll
  test/CodeGen/AArch64/known-never-nan.ll
  test/CodeGen/AArch64/literal_pools_float.ll
  test/CodeGen/AArch64/win_cst_pool.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57044.183519.patch
Type: text/x-patch
Size: 12652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190125/9f59ffc7/attachment.bin>


More information about the llvm-commits mailing list