<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/110633>110633</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[SelectionDAG] -use-constant-fp-for-fixed-length-splat not quite working?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JonPsson1
</td>
</tr>
</table>
<pre>
[tc_leg.tar.gz](https://github.com/user-attachments/files/17200345/tc_leg.tar.gz)
llc -mtriple=s390x-linux-gnu -mcpu=z16 -o - ./tc_leg.ll -use-constant-fp-for-fixed-length-splat
```
auto *T = FixedVectorType::get(V.front()->getType(), V.size());
(gdb) p V.size()
$90 = 4
(gdb) p V.front()->getType()->dump()
<4 x float>
llc: llvm-project/llvm/lib/IR/Type.cpp:691: static llvm::FixedVectorType* llvm::FixedVectorType::get(llvm::Type*, unsigned int): Assertion `isValidElementType(ElementType) && "Element type of a VectorType must " "be an integer, floating point, or " "pointer type."' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: llc -mtriple=s390x-linux-gnu -mcpu=arch15 ./bugpoint-reduced-simplified.bc -o /dev/null -use-constant-fp-for-fixed-length-splat
1. Running pass 'Function Pass Manager' on module './bugpoint-reduced-simplified.bc'.
2. Running pass 'SystemZ DAG->DAG Pattern Instruction Selection' on function '@func_79'
#0 0x000002aa17df2ed0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (llc+0x1d72ed0)
#1 0x000002aa17df09d0 llvm::sys::RunSignalHandlers() (llc+0x1d709d0)
#2 0x000002aa17df0bb4 SignalHandler(int) Signals.cpp:0:0
#3 0x000002aa1b0401de
#4 0x000003ff9bb48c6e raise /build/glibc-8Bkpa0/glibc-2.30/signal/../sysdeps/unix/sysv/linux/raise.c:50:10
#5 0x000003ff9bb2b232 abort /build/glibc-8Bkpa0/glibc-2.30/stdlib/abort.c:81:7
#6 0x000003ff9bb408b2 __assert_fail_base /build/glibc-8Bkpa0/glibc-2.30/assert/assert.c:89:7
#7 0x000003ff9bb40926 (/lib/s390x-linux-gnu/libc.so.6+0x40926)
#8 0x000002aa172da314 llvm::FixedVectorType::get(llvm::Type*, unsigned int) (llc+0x125a314)
#9 0x000002aa17118b34 llvm::ConstantVector::getImpl(llvm::ArrayRef<llvm::Constant*>) (llc+0x1098b34)
#10 0x000002aa17120662 llvm::ConstantVector::get(llvm::ArrayRef<llvm::Constant*>) (llc+0x10a0662)
#11 0x000002aa170e70a6 llvm::ConstantFoldCastInstruction(unsigned int, llvm::Constant*, llvm::Type*) (.part.0) ConstantFold.cpp:0:0
#12 0x000002aa1712105c getFoldedCast(llvm::Instruction::CastOps, llvm::Constant*, llvm::Type*, bool) Constants.cpp:0:0
#13 0x000002aa1687df88 (anonymous namespace)::FoldBitCast(llvm::Constant*, llvm::Type*, llvm::DataLayout const&) (.part.0) ConstantFolding.cpp:0:0
#14 0x000002aa16880014 llvm::ConstantFoldCastOperand(unsigned int, llvm::Constant*, llvm::Type*, llvm::DataLayout const&) (llc+0x800014)
#15 0x000002aa16bc2c28 llvm::MachineConstantPool::getConstantPoolIndex(llvm::Constant const*, llvm::Align) (llc+0xb42c28)
#16 0x000002aa17bf46e0 llvm::InstrEmitter::AddOperand(llvm::MachineInstrBuilder&, llvm::SDValue, unsigned int, llvm::MCInstrDesc const*, llvm::SmallDenseMap<llvm::SDValue, llvm::Register, 16u, llvm::DenseMapInfo<llvm::SDValue, void>, llvm::detail::
```
@paulwalker-arm
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysV0tT4zoa_TXKRmWXLDt-LLIICelh6nZdCrpYzIaSLdnRIEsePWjoXz8l2SF2oLu5cycFifX6ztH3OJaIMbyTjG3A-gqs9yvi7FHpzT-VvDVGyWRVK_rqB23zKFgXW6Lj7gdY7wEuj9YOBqRbgA8AHzpuj66OG9UDfHC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