Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64][SVE] Error in llvm.experimental.stepvector: Do not know how to widen the result of this operator! #55165

Closed
stevesuzuki-arm opened this issue Apr 28, 2022 · 2 comments

Comments

@stevesuzuki-arm
Copy link
Contributor

stevesuzuki-arm commented Apr 28, 2022

llvm.experimental.stepvector https://godbolt.org/z/bvb4GMeaj

define <vscale x 6 x i32> @step_nxv6i32() #0 {
    %1 = call <vscale x 6 x i32> @llvm.experimental.stepvector.nxv6i32()
    ret <vscale x 6 x i32> %1
}
declare <vscale x 6 x i32> @llvm.experimental.stepvector.nxv6i32()

Crashes with target triple = "aarch64-linux-gnu" -mattr=+sve2 -O3
The same error happens with <vscale x 12 x i32>, <vscale x 24 x i32> and more.

WidenVectorResult #0: t2: nxv6i32 = step_vector TargetConstant:i32<1>

Do not know how to widen the result of this operator!
UNREACHABLE executed at /root/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3564!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -mattr=+sve2 -O3 <source>
1.	Running pass 'Function Pass Manager' on module '<source>'.
2.	Running pass 'AArch64 Instruction Selection' on function '@step_nxv6i32'
 #0 0x00005558a779a40f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x00005558a7797e7c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fac3841f3c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x143c0)
 #3 0x00007fac37eec03b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4303b)
 #4 0x00007fac37ecb859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #5 0x00005558a76dc9ca (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x30dc9ca)
 #6 0x00005558a763a47a llvm::DAGTypeLegalizer::WidenVectorResult(llvm::SDNode*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x303a47a)
 #7 0x00005558a75fc5d8 llvm::DAGTypeLegalizer::run() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2ffc5d8)
 #8 0x00005558a75fd726 llvm::SelectionDAG::LegalizeTypes() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2ffd726)
 #9 0x00005558a7590a43 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f90a43)
#10 0x00005558a75945a3 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f945a3)
#11 0x00005558a7595cd8 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.960) SelectionDAGISel.cpp:0:0
#12 0x00005558a6ad6116 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x24d6116)
#13 0x00005558a6f84a96 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2984a96)
#14 0x00005558a6f84de9 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2984de9)
#15 0x00005558a6f85729 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2985729)
#16 0x00005558a513e598 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#17 0x00005558a5098937 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0xa98937)
#18 0x00007fac37ecd0b3 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b3)
#19 0x00005558a5134f6a _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0xb34f6a)
Compiler returned: 139
@fhahn fhahn added backend:AArch64 SVE ARM Scalable Vector Extensions llvm:crash and removed new issue labels Apr 28, 2022
@llvmbot
Copy link
Member

llvmbot commented Apr 28, 2022

@llvm/issue-subscribers-backend-aarch64

@fhahn fhahn changed the title [AArch64][SVE] Error in llvm.experimental.stepvector [AArch64][SVE] Error in llvm.experimental.stepvector: Do not know how to widen the result of this operator! Apr 28, 2022
@paulwalker-arm
Copy link
Collaborator

Review to fix issue at https://reviews.llvm.org/D126168.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants