-
Notifications
You must be signed in to change notification settings - Fork 13k
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
llc can't compile "sext i4 to i64" emitted by llvm-gcc #1652
Comments
When does llvm-gcc emit this? |
llvm-gcc emits this when it compiles the gcc/reload.c file. [sbox-n770: /llvm/llvm-gcc/build/gcc] > /llvm/llvm-gcc/build/prev-gcc/xgcc |
If so, that sounds like a serious bug. Duncan/Devang, could this be related to recent struct layout/bitfield |
lauro, does this happen with -O0 ? If it happens with -O2 but not -O0, please attach the -O0 -emit- |
The "sext i4 to i64" is emitted when llvm optimizes the function laurov@laurov-desktop:/tmp$ opt -std-compile-opts find_reloads_address.bc | llc |
This |
Reid, will you please look into this? It sounds like an instcombine regression from your changes. -Chris |
The transform being done is this: < %tmp766 = and i64 %tmp765, 15 ; [#uses=1]
|
Fixed with this patch: Test case here: |
Thanks Reid! |
Extended Description
laurov@laurov-desktop:~/llvm/llvm/build$ llc -march=x86
bugpoint-reduced-simplified.bc
llc: /home/laurov/llvm/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:2257:
llvm::MVT::ValueType llvm::TargetLowering::getValueType(const llvm::Type*)
const: Assertion `0 && "Invalid width for value type"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x1a)[0x88d7886]
llc((anonymous namespace)::SignalHandler(int)+0x112)[0x88d7b4c]
[0xffffe420]
/lib/tls/i686/cmov/libc.so.6(abort+0x103)[0xb7cdfef3]
/lib/tls/i686/cmov/libc.so.6(__assert_fail+0xfb)[0xb7cd7dbb]
llc(llvm::TargetLowering::getValueType(llvm::Type const*) const+0xbf)[0x868dff9]
llc(llvm::SelectionDAGLowering::getValue(llvm::Value const*)+0xaa)[0x8660a3c]
llc(llvm::SelectionDAGLowering::visitSExt(llvm::User&)+0x30)[0x866b834]
llc(llvm::SelectionDAGLowering::visit(unsigned int, llvm::User&)+0x2eb)[0x8688df9]
llc(llvm::SelectionDAGLowering::visit(llvm::Instruction&)+0x28)[0x8688fde]
llc(llvm::SelectionDAGISel::BuildSelectionDAG(llvm::SelectionDAG&,
llvm::BasicBlock*, std::vector<std::pair<llvm::MachineInstr*, unsigned int>,
std::allocator<std::pair<llvm::MachineInstr*, unsigned int> > >&,
llvm::FunctionLoweringInfo&)+0x14a)[0x866f26e]
llc(llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*,
llvm::MachineFunction&, llvm::FunctionLoweringInfo&)+0x98)[0x866fcd4]
llc(llvm::SelectionDAGISel::runOnFunction(llvm::Function&)+0x5d2)[0x86714e6]
llc[0x853a0ed]
llc(llvm::FPPassManager::runOnFunction(llvm::Function&)+0x13a)[0x88639a6]
llc(llvm::FunctionPassManagerImpl::run(llvm::Function&)+0x6e)[0x8863c2a]
llc(llvm::FunctionPassManager::run(llvm::Function&)+0x88)[0x8863cea]
llc(main+0xbe9)[0x83d6bdd]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7cca8cc]
llc(__gxx_personality_v0+0x175)[0x83d4f11]
Aborted (core dumped)
The text was updated successfully, but these errors were encountered: