Page MenuHomePhabricator

[X86][FP16] Promote FP16->[U]INT to FP16->FP32->[U]INT
ClosedPublic

Authored by pengfei on Aug 12 2022, 10:52 PM.

Details

Summary

This is to avoid f16->i64 being lowered to __fixhfdi/__fixunshfdi on 32-bits since neither libgcc nor compiler-rt provide them. https://godbolt.org/z/cjWEsea5v

It also helps to improve the performance by promoting the vector type.

Diff Detail

Event Timeline

pengfei created this revision.Aug 12 2022, 10:52 PM
pengfei requested review of this revision.Aug 12 2022, 10:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 10:52 PM
LuoYuanke added inline comments.Aug 12 2022, 11:47 PM
llvm/test/CodeGen/X86/half.ll
333–334

In 32-bit mode, the half type is passed through stack or xmm register?

pengfei added inline comments.Aug 13 2022, 1:13 AM
llvm/test/CodeGen/X86/half.ll
333–334

Pass through stack and return through xmm register https://godbolt.org/z/KEoGTKPzv

pengfei edited the summary of this revision. (Show Details)Aug 13 2022, 1:19 AM
This revision is now accepted and ready to land.Aug 13 2022, 2:02 AM
This revision was landed with ongoing or failed builds.Aug 13 2022, 6:37 PM
This revision was automatically updated to reflect the committed changes.