Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2756,8 +2756,10 @@ X86TargetLowering::getPreferredVectorAction(MVT VT) const {
!Subtarget.hasBWI())
return TypeSplitVector;

// Since v8f16 is legal, widen anything over v4f16.
if (!VT.isScalableVector() && VT.getVectorNumElements() != 1 &&
!Subtarget.hasF16C() && VT.getVectorElementType() == MVT::f16)
VT.getVectorNumElements() <= 4 && !Subtarget.hasF16C() &&
VT.getVectorElementType() == MVT::f16)
return TypeSplitVector;

if (!VT.isScalableVector() && VT.getVectorNumElements() != 1 &&
Expand Down
14 changes: 14 additions & 0 deletions llvm/test/CodeGen/X86/pr152150.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
; RUN: llc < %s -mtriple=x86_64-unknown-unknown-eabi-elf | FileCheck %s

; CHECK-LABEL: conv2d
define dso_local void @conv2d() {
.preheader:
br label %0

0: ; preds = %0, %.preheader
%1 = phi [4 x <7 x half>] [ zeroinitializer, %.preheader ], [ %4, %0 ]
%2 = extractvalue [4 x <7 x half>] %1, 0
%3 = extractvalue [4 x <7 x half>] %1, 1
%4 = insertvalue [4 x <7 x half>] poison, <7 x half> poison, 3
br label %0
}