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
3 changes: 1 addition & 2 deletions llvm/lib/Target/DirectX/DXILOpBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ static OverloadKind getOverloadKind(Type *Ty) {
case Type::StructTyID:
return OverloadKind::ObjectType;
default:
llvm_unreachable("invalid overload type");
return OverloadKind::VOID;
return OverloadKind::UNDEFINED;
}
}

Expand Down
11 changes: 11 additions & 0 deletions llvm/test/CodeGen/DirectX/sin_vector_error.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.0-library %s 2>&1 | FileCheck %s
; The sin intrinsic needs to be scalarized before op lowering

; CHECK: error:
; CHECK-SAME: in function sin_vector
; CHECK-SAME: Cannot create Sin operation: Invalid overload type

define <4 x float> @sin_vector(<4 x float> %a) {
%x = call <4 x float> @llvm.sin.v4f32(<4 x float> %a)
ret <4 x float> %x
}
Loading