[LLVMbugs] [Bug 21572] New: Vector element count mismatch!

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 14 04:18:05 PST 2014


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

            Bug ID: 21572
           Summary: Vector element count mismatch!
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ cat >1.cc
void f (short *pb, float *pf)
{
    for (int i = 0; i < 8; ++i)
      pb[i] = pf[i] * 2;
}

$ clang++ -cc1 -triple armv7--linux-androideabi -emit-obj -O2 -vectorize-slp
1.cc
clang++: ../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2877: llvm::SDValue
llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc, llvm::EVT,
llvm::SDValue): Assertion `(!VT.isVector() || VT.getVectorNumElements() ==
Operand.getValueType().getVectorNumElements()) && "Vector element count
mismatch!"' failed.
0  clang++         0x000000000141d1a8 llvm::sys::PrintStackTrace(_IO_FILE*) +
40
1  clang++         0x000000000141e80b
2  libpthread.so.0 0x00007f1c932f2340
3  libc.so.6       0x00007f1c92519bb9 gsignal + 57
4  libc.so.6       0x00007f1c9251cfc8 abort + 328
5  libc.so.6       0x00007f1c92512a76
6  libc.so.6       0x00007f1c92512b22
7  clang++         0x0000000001725206 llvm::SelectionDAG::getNode(unsigned int,
llvm::SDLoc, llvm::EVT, llvm::SDValue) + 11942
8  clang++         0x00000000008a5667
llvm::ARMTargetLowering::PerformDAGCombine(llvm::SDNode*,
llvm::TargetLowering::DAGCombinerInfo&) const + 22791
9  clang++         0x0000000001697c17
10 clang++         0x00000000016972a4
llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AliasAnalysis&,
llvm::CodeGenOpt::Level) + 2324
11 clang++         0x000000000179755e
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 910
12 clang++         0x0000000001796a18
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 8632
13 clang++         0x0000000001793924
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1316
14 clang++         0x000000000085ad46
15 clang++         0x0000000000f1eccc
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 124
16 clang++         0x00000000011468b3
llvm::FPPassManager::runOnFunction(llvm::Function&) + 499
17 clang++         0x0000000001146b2b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
18 clang++         0x0000000001147087
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 935
19 clang++         0x0000000001844c0d
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
7517
20 clang++         0x0000000001839c95
21 clang++         0x0000000001dd46f3 clang::ParseAST(clang::Sema&, bool, bool)
+ 483
22 clang++         0x00000000015bcf3e clang::FrontendAction::Execute() + 62
23 clang++         0x000000000158eacc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 892
24 clang++         0x0000000001640192
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3090
25 clang++         0x00000000006c2ca7 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 679
26 clang++         0x00000000006c1a52 main + 12290
27 libc.so.6       0x00007f1c92504ec5 __libc_start_main + 245
28 clang++         0x00000000006be94b
Stack dump:
0.      Program arguments: /code/llvm/build/bin/clang++ -cc1 -triple
armv7--linux-androideabi -emit-obj -O2 -vectorize-slp 1.ii 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '1.ii'.
4.      Running pass 'ARM Instruction Selection' on function '@_Z1fPsPf'


Bitcode:
# cat >1.ll
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv7--linux-androideabi"

; Function Attrs: nounwind
define void @_Z1fPsPf(i16* nocapture %pb, float* nocapture readonly %pf) #0 {
entry:
  %0 = bitcast float* %pf to <8 x float>*
  %1 = load <8 x float>* %0, align 4
  %2 = fmul <8 x float> %1, <float 2.000000e+00, float 2.000000e+00, float
2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float
2.000000e+00, float 2.000000e+00>
  %3 = fptosi <8 x float> %2 to <8 x i16>
  %4 = bitcast i16* %pb to <8 x i16>*
  store <8 x i16> %3, <8 x i16>* %4, align 2
  ret void
}

attributes #0 = { nounwind "less-precise-fpmad"="false"
"no-frame-pointer-elim"="false" "no-infs-fp-math"="false"
"no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8"
"unsafe-fp-math"="false" "use-soft-float"="false" }

# llc 1.ll
...
the same error
...

-- 
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/20141114/f4f28a36/attachment.html>


More information about the llvm-bugs mailing list