OSDN Git Service

AMDGPU: Simplify f16 to i64 custom lowering
authorPetar Avramovic <Petar.Avramovic@amd.com>
Wed, 22 Jul 2020 08:31:41 +0000 (10:31 +0200)
committerPetar Avramovic <Petar.Avramovic@amd.com>
Wed, 22 Jul 2020 08:32:14 +0000 (10:32 +0200)
commit44967fc604519a4a57bbcabbd7c46380b5d1b74c
tree9b8e82049d36c04c1bf4c565821ea4f0b0b22300
parent3a3419460647612fba9dbecbd770fc8c84bbc05a
AMDGPU: Simplify f16 to i64 custom lowering

Range that f16 can represent fits into i32.
Lower as f16->i32->i64 instead of f16->f32->i64
since f32->i64 has long expansion.

Differential Revision: https://reviews.llvm.org/D84166
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/test/CodeGen/AMDGPU/fptosi.f16.ll
llvm/test/CodeGen/AMDGPU/fptoui.f16.ll