| Issue |
64627
|
| Summary |
[X86][SelectionDAG] DAGCombine crash on select + reduce of 5 element vector
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
jacobly0
|
```
target triple = "x86_64"
define float @f() "target-features"="-avx512f" { ; no crash when enabled
%1 = bitcast i5 0 to <5 x i1>
%2 = select <5 x i1> %1, <5 x float> zeroinitializer, <5 x float> <float 1.0, float 1.0, float 1.0, float 1.0, float 1.0>
%3 = call float @llvm.vector.reduce.fadd.v5f32(float -0.0, <5 x float> %2)
ret float %3
}
declare float @llvm.vector.reduce.fadd.v5f32(float, <5 x float>)
```
```
$ llc --version
LLVM (http://llvm.org/):
LLVM version 16.0.6
DEBUG build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: znver4
$ llc repro.ll
llc: llvm/include/llvm/Support/MachineValueType.h:497: MVT llvm::MVT::changeVectorElementType(MVT) const: Assertion `VecTy.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE && "Simple vector VT not representable by simple integer vector VT!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/jacob/.local/lib/dbg/llvm/16.0.6/bin/llc repro.ll
1. Running pass 'Function Pass Manager' on module 'repro.ll'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
#10 0x00007f458a48a374 llvm::MVT::changeVectorElementType(llvm::MVT) const llvm/include/llvm/Support/MachineValueType.h:498:7
#11 0x00007f458a48caee llvm::EVT::changeVectorElementType(llvm::EVT) const llvm/include/llvm/CodeGen/ValueTypes.h:105:30
#12 0x00007f458a43840f combineToExtendBoolVectorInReg(unsigned int, llvm::SDLoc const&, llvm::EVT, llvm::SDValue, llvm::SelectionDAG&, llvm::TargetLowering::DAGCombinerInfo&, llvm::X86Subtarget const&) llvm/lib/Target/X86/X86ISelLowering.cpp:45343:17
#13 0x00007f458a359523 combineSelect(llvm::SDNode*, llvm::SelectionDAG&, llvm::TargetLowering::DAGCombinerInfo&, llvm::X86Subtarget const&) llvm/lib/Target/X86/X86ISelLowering.cpp:46110:27
#14 0x00007f458a34f200 llvm::X86TargetLowering::PerformDAGCombine(llvm::SDNode*, llvm::TargetLowering::DAGCombinerInfo&) const llvm/lib/Target/X86/X86ISelLowering.cpp:56417:36
#15 0x00007f4586a3526a (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1852:16
#16 0x00007f4586a3467c (anonymous namespace)::DAGCombiner::Run(llvm::CombineLevel) llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1635:18
#17 0x00007f4586a33ecb llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level) llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:26460:36
#18 0x00007f4586e8fb8b llvm::SelectionDAGISel::CodeGenAndEmitDAG() llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:784:3
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs