[PATCH] D26767: [AMDGPU] Promote f16/i16 conversions to f32/i32 + custom lower f16 = fp_round f64

Konstantin Zhuravlyov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 15:26:35 PST 2016


kzhuravl added a comment.

In https://reviews.llvm.org/D26767#597992, @arsenm wrote:

> If fp_tound has integer type after legalization, the legalization for it is broken


Agreed, I have bitcasted it to f16 and removed bitcast from combining. However I found that in some existing cases we legalize fp_to_fp16 to integer types (which got me confused), namely:
https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AMDGPU/AMDGPUISelLowering.cpp#L2100

Also, why are our f16->f32 and f32->f16 are using i32?
https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AMDGPU/VOP1Instructions.td#L132


https://reviews.llvm.org/D26767





More information about the llvm-commits mailing list