[PATCH] D54663: [PowerPC] Complete the custom legalization of vector int to fp conversion

Roland Froese via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 20 10:49:40 PST 2018


RolandF added a comment.

Nice!  Glad to see this stuff get completed.



================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:7333
+    Arrange = DAG.getBitcast(IntermediateVT, Arrange);
+    Extend = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, IntermediateVT, Arrange,
+                         DAG.getValueType(Op.getOperand(0).getValueType()));
----------------
When I looked at this before, I found that using SIGN_EXTEND_INREG led to a perm/shift left/shift right pattern, and I thought that using unpack would be faster for the signed int/pwr8 case.


================
Comment at: test/CodeGen/PowerPC/vec_conv_i16_to_fp32_elts.ll:340
+; CHECK-P8-NEXT:    vmrglh v2, v2, v2
+; CHECK-P8-NEXT:    vslw v2, v2, v3
+; CHECK-P8-NEXT:    vsraw v2, v2, v3
----------------
I think using unpack would be faster than perm/vslw/vsraw, particularly for the f32 case where one level of unpack would do.


Repository:
  rL LLVM

https://reviews.llvm.org/D54663





More information about the llvm-commits mailing list