This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAGBuilder] use bitcast instead of AnyExtOrTrunc if copy parts from an int vector to a float vector to fix issue #58615
ClosedPublic

Authored by HazyFish on Oct 25 2022, 6:07 PM.

Details

Summary

The getCopyFromPartsVector doesn't work correctly when PartEVT and ValueVT have both different element type and different size.

This patch

  1. removes the part of a comment that contains the incorrect assumption that element type are the same
  2. use bitcast when copy parts of int vector to a float vector after the subvector extraction

Diff Detail

Event Timeline

HazyFish created this revision.Oct 25 2022, 6:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 6:07 PM
HazyFish requested review of this revision.Oct 25 2022, 6:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 6:07 PM
Peter accepted this revision.Oct 31 2022, 8:35 PM
This revision is now accepted and ready to land.Oct 31 2022, 8:35 PM
efriedma accepted this revision.Nov 1 2022, 3:38 PM

LGTM