[LLVMbugs] [Bug 17534] New: llc handles shufflevector with one-element vectors incorrect

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 10 05:50:55 PDT 2013


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

            Bug ID: 17534
           Summary: llc handles shufflevector with one-element vectors
                    incorrect
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: ili.filippov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Reproducer for this issue:

; ModuleID = 'a.o'
target datalayout =
"e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind
define void @f_fu(<8 x i32>* nocapture %RET, <1 x i32> %aFOO) #0 {
  %basesmear.i.i92 = shufflevector <1 x i32> %aFOO, <1 x i32> undef, <8 x i32>
<i32 0, i32 undef, i32 0, i32 undef, i32 0, i32 undef, i32 0, i32 undef>
  store <8 x i32> %basesmear.i.i92, <8 x i32>* %RET, align 4
  ret void
}

attributes #0 = { nounwind }

llc output:

llc: llvm-3.3/include/llvm/CodeGen/SelectionDAGNodes.h:538: const
llvm::SDValue& llvm::SDNode::getOperand(unsigned int) const: Assertion `Num <
NumOperands && "Invalid child # of SDNode!"' failed.
0  llc             0x00000000010ecc62 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  llc             0x00000000010ec8b9
2  libpthread.so.0 0x00007f1763e33000
3  libc.so.6       0x00007f1762e7bba5 gsignal + 53
4  libc.so.6       0x00007f1762e7d358 abort + 328
5  libc.so.6       0x00007f1762e74972
6  libc.so.6       0x00007f1762e74a22
7  llc             0x000000000054955a
8  llc             0x0000000000a2fb65
9  llc             0x0000000000a628df
10 llc             0x0000000000a63d50
11 llc             0x0000000000a6527b
llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AliasAnalysis&,
llvm::CodeGenOpt::Level) + 827
12 llc             0x0000000000b10511
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 497
13 llc             0x0000000000b1399e
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2318
14 llc             0x0000000000b15623
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1027
15 llc             0x00000000010847df
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
16 llc             0x000000000108482b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
17 llc             0x00000000010842d7
llvm::MPPassManager::runOnModule(llvm::Module&) + 663
18 llc             0x0000000001084497 llvm::PassManagerImpl::run(llvm::Module&)
+ 231
19 llc             0x0000000000578ec7
20 llc             0x0000000000569cb8 main + 360
21 libc.so.6       0x00007f1762e67a05 __libc_start_main + 245
22 llc             0x0000000000577c55
Stack dump:
0.      Program arguments: llc c.s 
1.      Running pass 'Function Pass Manager' on module 'c.s'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@f_fu'
Aborted (core dumped)


This issue is a regression between 3.2 and 3.3 versions. Also if we change <1 x
i32> to <2 x i32> or more everything will pass.

-- 
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/20131010/a0604583/attachment.html>


More information about the llvm-bugs mailing list