[PATCH] D25679: Do not assume that FP vector operands are never legalized by expanding

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 09:34:16 PDT 2016


amehsan added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp:337-340
 SDValue DAGTypeLegalizer::ExpandOp_BITCAST(SDNode *N) {
   SDLoc dl(N);
-  if (N->getValueType(0).isVector()) {
+  if (N->getValueType(0).isVector() &&
+      N->getOperand(0).getValueType().isInteger()) {
----------------
So, for cases that your new condition is not satisfied, what change do we make in the generated code? (The question applies to other platforms as well). I believe there is no testcase in unit-tests for this, (otherwise it would have failed and would have been included in your changes). Still this may happen in benchmarks and real work loads. I think you may need to investigate how that code pattern changes and what is the potential performance impact of your change for that code pattern. 


================
Comment at: test/CodeGen/PowerPC/pr30715.ll:8
+
+define weak_odr void @_ZNK10FullMatrixIgE5m_fn2IfEEvR6VectorIT_ERKS4_b(%class.FullMatrix* %this, %class.Vector* dereferenceable(8) %p1, %class.Vector* dereferenceable(8), i1 zeroext) {
+entry:
----------------
Please remove mangled name from the test file.


Repository:
  rL LLVM

https://reviews.llvm.org/D25679





More information about the llvm-commits mailing list