[llvm-bugs] [Bug 40181] New: After r334261, Assertion failed: ((VT.getVectorNumElements() + N2C->getZExtValue() <= N1.getValueType().getVectorNumElements()) && "Extract subvector overflow!"), function getNode, file lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 4682.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Dec 29 04:10:47 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=40181

            Bug ID: 40181
           Summary: After r334261, Assertion failed:
                    ((VT.getVectorNumElements() + N2C->getZExtValue() <=
                    N1.getValueType().getVectorNumElements()) && "Extract
                    subvector overflow!"), function getNode, file
                    lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 4682.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

See also: https://bugs.freebsd.org/234480
and:  https://aomedia.googlesource.com/aom/+/aa7195d608e0%5E%21/

After rL334261, which introduced the __builtin_ia32_vextractf128_si256
intrinsic, clang asserts on its use in Google's aomedia/aom:

Assertion failed: ((VT.getVectorNumElements() + N2C->getZExtValue() <=
N1.getValueType().getVectorNumElements()) && "Extract subvector overflow!"),
function getNode, file
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 4708.

Program received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3       thr_kill.S: No such file or directory.
(gdb) bt
#0  thr_kill () at thr_kill.S:3
#1  0x000000080467a304 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x00000008045ebb19 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3  0x00000008046683b1 in __assert (func=<optimized out>, file=<optimized out>,
line=<optimized out>, failedexpr=<optimized out>) at
/usr/src/lib/libc/gen/assert.c:51
#4  0x0000000003e30ad9 in getNode () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4706
#5  0x0000000003d20e0d in MergeStoresOfConstantsOrVecElts () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13740
#6  0x0000000003d1e74a in MergeConsecutiveStores () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14272
#7  0x0000000003cf1bff in visitSTORE () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14779
#8  0x0000000003cb6c5f in visit () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1584
#9  0x0000000003cb03ea in combine () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1604
#10 0x0000000003caf2fc in Run () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1453
#11 Combine () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:18683
#12 0x0000000003c7959a in CodeGenAndEmitDAG () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:750
#13 0x0000000003c77df7 in SelectAllBasicBlocks () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1733
#14 0x0000000003c746fb in runOnMachineFunction () at
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:469
#15 0x0000000002a7bda4 in runOnMachineFunction () at
/usr/src/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:176
#16 0x0000000003edb256 in runOnFunction () at
/usr/src/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp:61
#17 0x00000000039371ed in runOnFunction () at
/usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1586
#18 0x00000000039374c8 in runOnModule () at
/usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1609
#19 0x000000000393797b in runOnModule () at
/usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1669
#20 run () at /usr/src/contrib/llvm/lib/IR/LegacyPassManager.cpp:1774
#21 0x0000000001516185 in EmitAssembly () at
/usr/src/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:843
#22 EmitBackendOutput () at
/usr/src/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1265
#23 0x00000000015108a0 in HandleTranslationUnit () at
/usr/src/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:293
#24 0x0000000001fd9743 in ParseAST () at
/usr/src/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp:170
#25 0x000000000197414e in Execute () at
/usr/src/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:910
#26 0x000000000286e441 in ExecuteAction () at
/usr/src/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:961
#27 0x00000000014ee67c in ExecuteCompilerInvocation () at
/usr/src/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:257
#28 0x00000000014df896 in cc1_main () at
/usr/src/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp:218
#29 0x00000000014ebeb2 in ExecuteCC1Tool () at
/usr/src/contrib/llvm/tools/clang/tools/driver/driver.cpp:310
#30 main () at /usr/src/contrib/llvm/tools/clang/tools/driver/driver.cpp:382

Minimized test case:

/* clang -cc1 -triple x86_64-- -S -target-feature +avx -O1
av1_fwd_txfm2d_avx2-min.c */
typedef long a __attribute__((__vector_size__(16)));
typedef long b __attribute__((__vector_size__(32)));
b c();
void d(a *e) {
  a f;
  b g = c();
  f = __builtin_shufflevector(g, g, 0, 1);
  e[2] = f;
  e[1] = __builtin_ia32_vextractf128_si256(g, 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/20181229/88eadcd1/attachment.html>


More information about the llvm-bugs mailing list