[PATCH] D72753: [ARM] Fixup FP16 bitcasts

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 00:27:26 PST 2020


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, ostannard, efriedma.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.

Under fp16 we have to lower via custom lowering a bitcast.

If the bitcast is between a i32 and a f32, we currently look for the pattern we want and if we don't find it we return SDValue(), which makes the underlying DAG legaliser expand the code to a stack load and store. The i32 to f32 bitcast should still be legal though, which I believe is done by returning the original node.

Seems to help in some of the MVE scalarised code too.


https://reviews.llvm.org/D72753

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/ARM/fp16-bitcast.ll
  llvm/test/CodeGen/Thumb2/mve-div-expand.ll
  llvm/test/CodeGen/Thumb2/mve-fmath.ll
  llvm/test/CodeGen/Thumb2/mve-masked-ldst.ll
  llvm/test/CodeGen/Thumb2/mve-masked-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72753.238182.patch
Type: text/x-patch
Size: 50070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200115/622e9af7/attachment-0001.bin>


More information about the llvm-commits mailing list