[LLVMbugs] [Bug 13859] New: SelectionDAG assertion failed: "Invalid type for expanded integer"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 17 09:45:51 PDT 2012


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

             Bug #: 13859
           Summary: SelectionDAG assertion failed: "Invalid type for
                    expanded integer"
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: glider at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ cat yuv.s
; ModuleID = 'yuv.ii'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
target triple = "i386-apple-macosx10.7.0"

define void @_Z17FilterYUVRows_MMXi(i32 %af) nounwind ssp {
entry:
  %aMyAlloca = alloca i32, align 32
  %dest = alloca <1 x i64>, align 32

  %a32 = load i32* %aMyAlloca, align 4
  %aconv = trunc i32 %a32 to i16
  %a36 = insertelement <4 x i16> undef, i16 %aconv, i32 0
  %a37 = insertelement <4 x i16> %a36, i16 %aconv, i32 1
  %a38 = insertelement <4 x i16> %a37, i16 %aconv, i32 2
  %a39 = insertelement <4 x i16> %a38, i16 %aconv, i32 3
  %a40 = bitcast <4 x i16> %a39 to x86_mmx
  %a41 = bitcast x86_mmx %a40 to <1 x i64>

  %a47 = trunc i32 %a32 to i1
  br i1 %a47, label %a48, label %a49

a48:
  unreachable

a49:
  store <1 x i64> %a41, <1 x i64>* %dest, align 8 ; !!!
  ret void
}
================================================
llc yuv.s 
Assertion failed: (Lo.getValueType() ==
TLI.getTypeToTransformTo(*DAG.getContext(), Op.getValueType()) &&
Hi.getValueType() == Lo.getValueType() && "Invalid type for expanded integer"),
function SetExpandedInteger, file
/Users/glider/src/asan/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp, line
780.
0  llc               0x0000000106f72f22 _ZL15PrintStackTracePv + 34
1  llc               0x0000000106f734c9 _ZL13SignalHandleri + 697
2  libsystem_c.dylib 0x00007fff8ac0ccfa _sigtramp + 26
3  libsystem_c.dylib 0x0000000000000002 _sigtramp + 18446603338188272418
4  llc               0x0000000106f73166 abort + 22
5  llc               0x0000000106f73127 __assert_rtn + 55
6  llc               0x0000000106a778a8
llvm::DAGTypeLegalizer::SetExpandedInteger(llvm::SDValue, llvm::SDValue,
llvm::SDValue) + 648
7  llc               0x0000000106a62c83
llvm::DAGTypeLegalizer::ExpandIntegerResult(llvm::SDNode*, unsigned int) + 1683
8  llc               0x0000000106a74feb llvm::DAGTypeLegalizer::run() + 1115
9  llc               0x0000000106a7bc81 llvm::SelectionDAG::LegalizeTypes() +
417
10 llc               0x0000000106b2ccd5
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1493
11 llc               0x0000000106b2c209
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 6585
12 llc               0x0000000106b29dfd
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 973
13 llc               0x0000000106c354fc
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 60
14 llc               0x0000000106ed50cd
llvm::FPPassManager::runOnFunction(llvm::Function&) + 317
15 llc               0x0000000106ed535b
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
16 llc               0x0000000106ed54b4
llvm::MPPassManager::runOnModule(llvm::Module&) + 292
17 llc               0x0000000106ed5a22
llvm::PassManagerImpl::run(llvm::Module&) + 242
18 llc               0x0000000106ed5bcd llvm::PassManager::run(llvm::Module&) +
13
19 llc               0x000000010662c0df main + 5279
20 llc               0x000000010662ac34 start + 52
Stack dump:
0.    Program arguments:
/Users/glider/src/asan/llvm/build/Release+Asserts/bin/llc yuv.s 
1.    Running pass 'Function Pass Manager' on module 'yuv.s'.
2.    Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_Z17FilterYUVRows_MMXi'
Illegal instruction: 4


This is a reduced testcase from the IR generated by AddressSanitizer on libyuv
code.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list