[PATCH] D11081: SelectionDAG: Support Expand of f16 extloads

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 16:16:11 PDT 2015


arsenm marked an inline comment as done.
arsenm added a comment.

In http://reviews.llvm.org/D11081#231467, @ab wrote:

> I'll admit I'm not sure I understand what the test does (%arg is loaded?), but the code seems reasonable.


Yes, kernel arguments are lowered as loads


================
Comment at: test/CodeGen/AMDGPU/half.ll:125-137
@@ -120,7 +124,15 @@
+
 ; GCN-LABEL: {{^}}extload_v2f16_to_v2f64_arg:
+; GCN-DAG: buffer_load_ushort v
+; GCN-DAG: buffer_load_ushort v
+; GCN-DAG: v_cvt_f32_f16_e32
+; GCN-DAG: v_cvt_f32_f16_e32
+; GCN-DAG: v_cvt_f64_f32_e32
+; GCN-DAG: v_cvt_f64_f32_e32
+; GCN: s_endpgm
 define void @extload_v2f16_to_v2f64_arg(<2 x double> addrspace(1)* %out, <2 x half> %arg) #0 {
   %ext = fpext <2 x half> %arg to <2 x double>
   store <2 x double> %ext, <2 x double> addrspace(1)* %out
   ret void
 }
 
----------------
These are slightly different because the vector arguments aren't promoted like half args are to f32, but I've added checks for them


http://reviews.llvm.org/D11081





More information about the llvm-commits mailing list