I will split this change in 2 when submitting (it is easier to test everything in bulk):
- Promote f16/i16 conversions to f32/i32
- Custom lower f16 = fp_round f64
Testing done:
- Conformance: half (passed), conversions (passed)
- make check-all (passed)
Paths
| Differential D26767
[AMDGPU] Promote f16/i16 conversions to f32/i32 + custom lower f16 = fp_round f64 ClosedPublic Authored by kzhuravl on Nov 16 2016, 1:44 PM.
Details
Summary I will split this change in 2 when submitting (it is easier to test everything in bulk):
Testing done:
Diff Detail Event Timeline
Comment Actions
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: Also, why are our f16->f32 and f32->f16 are using i32? Comment Actions
fp_to_fp16 is not the same as fp_round. fp_to_fp16 is f16 stored in an integer type arsenm edited edge metadata. Comment ActionsLGTM
This revision is now accepted and ready to land.Nov 16 2016, 6:00 PM
Revision Contents
Diff 78256 lib/Target/AMDGPU/SIISelLowering.h
lib/Target/AMDGPU/SIISelLowering.cpp
test/CodeGen/AMDGPU/fp_to_sint.ll
test/CodeGen/AMDGPU/fp_to_uint.ll
test/CodeGen/AMDGPU/fptosi.f16.ll
test/CodeGen/AMDGPU/fptoui.f16.ll
test/CodeGen/AMDGPU/sitofp.f16.ll
test/CodeGen/AMDGPU/uitofp.f16.ll
|
This can be return of the getNode directly