[PATCH] [NVPTX] expand extload/truncstore for vectors of floats

Jingyue Wu jingyue at google.com
Wed Jul 1 11:08:46 PDT 2015


LGTM with comments address. Thanks for working on it, Henry!


REPOSITORY
  rL LLVM

================
Comment at: lib/Target/NVPTX/NVPTXISelLowering.cpp:219-224
@@ -212,2 +218,8 @@
   setTruncStoreAction(MVT::f64, MVT::f32, Expand);
+  setTruncStoreAction(MVT::v2f32, MVT::v2f16, Expand);
+  setTruncStoreAction(MVT::v2f64, MVT::v2f16, Expand);
+  setTruncStoreAction(MVT::v2f64, MVT::v2f32, Expand);
+  setTruncStoreAction(MVT::v4f32, MVT::v4f16, Expand);
+  setTruncStoreAction(MVT::v4f64, MVT::v4f16, Expand);
+  setTruncStoreAction(MVT::v4f64, MVT::v4f32, Expand);
 
----------------
We should probably have a test for `fptrunc` too. 

================
Comment at: test/CodeGen/NVPTX/extloadv.ll:7
@@ +6,3 @@
+  %3 = fpext <4 x float> %2 to <4 x double>
+; CHECK-NOT: ld.v2.f32        {%fd{{[0-9]+}}, %fd{{[0-9]+}}}, [%rd{{[0-9]+}}];
+; CHECK:  cvt.f64.f32
----------------
You can put a space instead of a tab after `ld.v2.f32`. The matching is insensitive to white spaces.

http://reviews.llvm.org/D10876

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list