bagel99 / llvm-my66000

This is a fork of the LLVM project. The code in branch my66000 supports Mitch Alsup's MY66000. The code in branch mcore supports the Motorola MCore.
http://llvm.org
Other
2 stars 2 forks source link

ICE with __attribute__((vector_size)) #29

Open tkoenig1 opened 1 year ago

tkoenig1 commented 1 year ago

I assume you don't want to support this, but for completeness' sake, here it is (again, reduced from the gcc testsuite):

 cat Wstringop-overflow-69.c
#define V(N) __attribute__((vector_size(N)))
typedef V(16) char VC16;
VC16 fc16(void);
warn_vec_func() { *(VC16 *)5 = fc16(); }
$ 66 Wstringop-overflow-69.c
Wstringop-overflow-69.c:4:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
warn_vec_func() { *(VC16 *)5 = fc16(); }
^
Wstringop-overflow-69.c:4:40: warning: non-void function does not return a value [-Wreturn-type]
warn_vec_func() { *(VC16 *)5 = fc16(); }
                                       ^
2 warnings generated.
llc: /home/asdf/llvm-my66000/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:9845: std::pair<llvm::SDValue, llvm::SDValue> llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const: Assertion `EVT(CLI.Ins[i].VT) == InVals[i].getValueType() && "LowerCall emitted a value with the wrong 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 --disable-lsr --enable-predication --enable-predication2 --enable-carry-generation --early-carry-coalesce --enable-vvm -march=my66000 Wstringop-overflow-69_opt.bc
1.      Running pass 'Function Pass Manager' on module 'Wstringop-overflow-69_opt.bc'.
2.      Running pass 'My66000 DAG->DAG Pattern Instruction Selection' on function '@warn_vec_func'