Skip to content

[X86] llvm::X86TargetLowering::LowerTRUNCATE(llvm::SDValue, llvm::SelectionDAG &) const: Assertion `VT.is128BitVector() && InVT.is256BitVector() && "Unexpected types!"' failed. #66194

Closed
@RKSimon

Description

@RKSimon

Raised by @mikaelholmen at https://reviews.llvm.org/rG451af635519113bc8fe94852d7489f26485f6689 (451af63)

target triple = "x86_64-unknown-linux-gnu"

define i16 @s(i8 %q) {
entry:
  %cmp12.i.13 = icmp ne i8 %q, 0
  %cond.i15.13 = zext i1 %cmp12.i.13 to i16
  %tobool.not.i.13 = icmp eq i8 %q, 0
  %cond18.i.13 = zext i1 %tobool.not.i.13 to i16
  %0 = insertelement <16 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>, i16 %cond.i15.13, i64 8
  %1 = insertelement <16 x i16> %0, i16 %cond18.i.13, i64 9
  %2 = insertelement <16 x i16> %1, i16 %cond.i15.13, i64 10
  %3 = insertelement <16 x i16> %2, i16 %cond.i15.13, i64 11
  %4 = insertelement <16 x i16> %3, i16 %cond18.i.13, i64 12
  %5 = insertelement <16 x i16> %4, i16 %cond.i15.13, i64 13
  %6 = insertelement <16 x i16> %5, i16 %cond.i15.13, i64 14
  %7 = insertelement <16 x i16> %6, i16 %cond18.i.13, i64 15
  %8 = tail call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %7)
  ret i16 %8
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.add.v16i16(<16 x i16>) #0

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

it crashes with

llc: ../lib/Target/X86/X86ISelLowering.cpp:20433: llvm::SDValue llvm::X86TargetLowering::LowerTRUNCATE(llvm::SDValue, llvm::SelectionDAG &) const: Assertion `VT.is128BitVector() && InVT.is256BitVector() && "Unexpected types!"' failed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions