<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/130470>130470</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Assertion `vecType->isBuiltinType() || vecType->isDependentType() || (vecType->isBitIntType() && llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits()) && vecType->castAs<BitIntType>()->getNumBits() >= 8)' failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bi6c
</td>
</tr>
</table>
<pre>
Compiler Explorer: https://godbolt.org/z/sd691xMKo
testcase is generated by fuzzer
```console
<source>:5:64: warning: '_BitInt' suffix for literals is a C23 extension [-Wc23-extensions]
5 | uv1ti rotr(uv1ti x, unsigned int i) { return (x >> i) | (x << (66666666666666666666wb - i)); }
| ^
clang: /root/llvm-project/clang/lib/AST/ASTContext.cpp:4587: clang::QualType clang::ASTContext::getExtVectorType(clang::QualType, unsigned int) const: Assertion `vecType->isBuiltinType() || vecType->isDependentType() || (vecType->isBitIntType() && llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits()) && vecType->castAs<BitIntType>()->getNumBits() >= 8)' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang -gdwarf-4 -g -o /app/output.s -fno-verbose-asm -c --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1. <source>:5:91: current parser token ')'
2. <source>:5:37: parsing function body 'rotr'
3. <source>:5:37: in compound statement ('{}')
#0 0x0000000003e6bf88 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e6bf88)
#1 0x0000000003e69c44 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e69c44)
#2 0x0000000003db6558 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x00007fd583442520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007fd5834969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007fd583442476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007fd5834287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007fd58342871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007fd583439e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x0000000007319057 clang::ASTContext::getExtVectorType(clang::QualType, unsigned int) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x7319057)
#10 0x0000000006951f71 checkVectorShift(clang::Sema&, clang::ActionResult<clang::Expr*, true>&, clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation, bool) SemaExpr.cpp:0:0
#11 0x0000000006960311 clang::Sema::CreateBuiltinBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6960311)
#12 0x000000000696193d clang::Sema::BuildBinOp(clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x696193d)
#13 0x0000000006962154 clang::Sema::ActOnBinOp(clang::Scope*, clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6962154)
#14 0x00000000064a415d clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*, true>, clang::prec::Level) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64a415d)
#15 0x00000000064a77e9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64a77e9)
#16 0x00000000064abb1d clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool, bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64abb1d)
#17 0x00000000064a1a61 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64a1a61)
#18 0x00000000064a2d17 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64a2d17)
#19 0x00000000064a4047 clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*, true>, clang::prec::Level) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64a4047)
#20 0x00000000064a77e9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64a77e9)
#21 0x000000000651dea2 clang::Parser::ParseReturnStatement() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x651dea2)
#22 0x00000000065210a5 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x65210a5)
#23 0x00000000065227d0 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x65227d0)
#24 0x00000000065236c1 clang::Parser::ParseCompoundStatementBody(bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x65236c1)
#25 0x0000000006524eaa clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6524eaa)
#26 0x00000000064366d3 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64366d3)
#27 0x000000000646b48d clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x646b48d)
#28 0x000000000642a40e clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x642a40e)
#29 0x000000000642abc9 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x642abc9)
#30 0x00000000064323a3 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x64323a3)
#31 0x000000000643327d clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x643327d)
#32 0x000000000642570a clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x642570a)
#33 0x000000000482f988 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x482f988)
#34 0x0000000004af82c5 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4af82c5)
#35 0x0000000004a7ba9e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4a7ba9e)
#36 0x0000000004be6f8e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4be6f8e)
#37 0x0000000000d52c87 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd52c87)
#38 0x0000000000d49a4a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#39 0x0000000004877d89 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#40 0x0000000003db6a04 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3db6a04)
#41 0x000000000487837f clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#42 0x000000000483ab5d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x483ab5d)
#43 0x000000000483bbde clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x483bbde)
#44 0x0000000004843af5 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4843af5)
#45 0x0000000000d4ef23 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd4ef23)
#46 0x0000000000c16b04 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xc16b04)
#47 0x00007fd583429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#48 0x00007fd583429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#49 0x0000000000d494f5 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd494f5)
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
```
Code:
```c
typedef unsigned __int128 uv1ti __attribute__((__vector_size__(16)));
typedef __int128 sv1ti __attribute__((__vector_size__(16)));
uv1ti rotr(uv1ti x, unsigned int i) { return (x >> i) | (x << (66666666666666666666wb - i)); }
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsW19z4ygS_zTkhXJKQv8f8qA4yW52Zy-5Seru0YUQsrnIoAOUOPPpr0CS9Se2J5nR7O3UXcq7Kwu6-fWPpmlwL1aKrTmlFyC4BMHVGa71RsiLjIXkLBP568VSbCtWUgmvd1UpJJXAS-FG60oBLwXoBqCbtcgzUepzIdcA3XwB6EblYeLu_vhdACfVVGmCFYVMwTXlVGJNc5i9wqL-8oVK4KTmEzrNhwiuREnNK2-pRC0JBd418NIAeGnom8FfsOSMr80jQNHqkulbrgGKoKqLgu1gISQsmaYSl8oMiuESeZDuNOWKCQ5BcLn4J0HeYv9KgeAKOCmEEAYQREtYP7uaQSm0BChuvuwAWsKaW7ZyyLiGDKAEgugSSqprySFA8Q5asNdd27J7uQSefQ4P_L1kcGEFzMe7hCDqwMBGRXANnJSUuLP5RgqhAbopy-ftopLiX5SYr00PdFOyDKCb9OGx-fdScE13-pxUFfBSP4gjo6VTB7z07zUuH18rOnzXyzXf11Rf7_Q_KNFCmr4AxQc0TCkyJJgJNUpgqhSV2k5A6DxTYgQWwLtm6rJmpWa81dsyZywf9bqiFeU55fptP4DisULrEsN-KAQohIaw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