[LLVMbugs] [Bug 20540] New: Compile error after commit 214628. (Assertion `begin() + idx < end()' failed)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 5 00:24:44 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20540

            Bug ID: 20540
           Summary: Compile error after commit 214628. (Assertion `begin()
                    + idx < end()' failed)
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: anton.mitrokhin at phystech.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

After commit 214628 llc failed to compile
a.ll: (Reproducer)
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind readnone
declare i32 @llvm.x86.sse2.pmovmskb.128(<16 x i8>) #0

; Function Attrs: nounwind
define void @f_fu_(float* noalias nocapture %RET, <8 x i8> %__mask) #1 {
allocas:
  %mask8.i.i.i = shufflevector <8 x i8> %__mask, <8 x i8> <i8 0, i8 undef, i8
undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef>, <16 x i32> <i32 0,
i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 8, i32 8, i32 8,
i32 8, i32 8, i32 8, i32 8>
  %m.i.i.i = call i32 @llvm.x86.sse2.pmovmskb.128(<16 x i8> %mask8.i.i.i) #1
  br label %pl_loopend.i.i

pl_loopend.i.i:
  %pl_and.i.1.i = and i32 %m.i.i.i, 2
  ret void
}

Compilation string:
.../llvm/bin-trunk_r214628/bin/llc a.ll -o new.s --mattr='+sse4.1'

Output:
llc:
/export/users/amitrokh/llvm/llvm-trunk_r214628/include/llvm/ADT/SmallVector.h:141:
reference llvm::SmallVectorTemplateCommon<int, void>::operator[](unsigned int)
[T = int]: Assertion `begin() + idx < end()' failed.
0  llc             0x00000000013b0a15 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1  llc             0x00000000013b1163
2  libpthread.so.0 0x0000003a4820f750
3  libc.so.6       0x0000003a47a35c39 gsignal + 57
4  libc.so.6       0x0000003a47a37348 abort + 328
5  libc.so.6       0x0000003a47a2eb96
6  libc.so.6       0x0000003a47a2ec42
7  llc             0x0000000000bfd707
8  llc             0x0000000000bfc212
9  llc             0x0000000000bf5614
10 llc             0x0000000000be1d91
llvm::X86TargetLowering::PerformDAGCombine(llvm::SDNode*,
llvm::TargetLowering::DAGCombinerInfo&) const + 3185
11 llc             0x0000000000c4fe0e
12 llc             0x0000000000c4f48e
llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AliasAnalysis&,
llvm::CodeGenOpt::Level) + 2254
13 llc             0x0000000000d6ff4b
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 3259
14 llc             0x0000000000d6e628
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 7096
15 llc             0x0000000000d6ba94
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1332
16 llc             0x0000000000b69806
17 llc             0x0000000000ee7a8c
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 124
18 llc             0x000000000134744a
llvm::FPPassManager::runOnFunction(llvm::Function&) + 362
19 llc             0x00000000013476db
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
20 llc             0x0000000001347c77
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 999
21 llc             0x0000000000582c1d main + 6749
22 libc.so.6       0x0000003a47a21d65 __libc_start_main + 245
23 llc             0x000000000057fbad
Stack dump:
0.      Program arguments: .../llvm/bin-trunk_r214628/bin/llc a.ll -o new.s
--mattr=+sse4.1
1.      Running pass 'Function Pass Manager' on module 'a.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@f_fu_'

On LLVM 214627 everything goes smoothly.

It appears that Mask array (generated from OpMask array with
'getTargetShuffleMask') in llvm-trunk/lib/Target/X86/X86ISelLowering.cpp line
19132 upon call to the 'combineX86ShufflesRecursively' has illegal values {0 1
2 3 4 5 6 7 -1 -1 -1 -1 -1 -1 -1 -1} and size 16. The assert fails when meets
'-1'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140805/ead06223/attachment.html>


More information about the llvm-bugs mailing list