================
@@ -1066,6 +1066,17 @@ InstructionCost GCNTTIImpl::getCastInstrCost(unsigned 
Opcode, Type *Dst,
         Elts && Src->isIntegerTy(*Elts))
       return InstructionCost(MaskUnpackCostPerElt) * *Elts *
              getFullRateInstrCost();
+    // Integer and FP values share registers. The sizes differ for the parts of
+    // a split vector, and a legalized vector may need its lanes repacked.
+    if (Src->getPrimitiveSizeInBits() == Dst->getPrimitiveSizeInBits()) {
----------------
arsenm wrote:

getPrimitiveSizeInBits doesn't correctly handle pointers, 

https://github.com/llvm/llvm-project/pull/238412
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to