[llvm-bugs] [Bug 49781] New: "Assertion `NewC && "Constant folding failed"' failed." with SVE

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 30 18:05:43 PDT 2021


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

            Bug ID: 49781
           Summary: "Assertion `NewC && "Constant folding failed"'
                    failed." with SVE
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: efriedma at quicinc.com
                CC: arnaud.degrandmaison at arm.com,
                    llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

Testcase:

define <vscale x 2 x i64> @foo(<vscale x 2 x i64> %a) {
%idx = shufflevector <vscale x 2 x i64> insertelement (<vscale x 2 x i64>
undef, i64 1, i32 0), <vscale x 2 x i64> zeroinitializer, <vscale x 2 x i32>
zeroinitializer
 %b = sub <vscale x 2 x i64> %a, %idx
 %c = sub <vscale x 2 x i64> %b, %idx
 ret <vscale x 2 x i64> %c
}

With "llc -mtriple=aarch64 -mattr=+sve":

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3335: llvm::SDValue (anonymous
namespace)::DAGCombiner::visitSUB(llvm::SDNode *): Assertion `NewC && "Constant
folding failed"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: bin/llc -mtriple=aarch64 -mattr=+sve
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'AArch64 Instruction Selection' on function '@foo'
 #0 0x0000000004c81c03 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(bin/llc+0x4c81c03)
 #1 0x0000000004c7f7ce llvm::sys::RunSignalHandlers() (bin/llc+0x4c7f7ce)
 #2 0x0000000004c820d6 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007faebbb7a390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #4 0x00007faeba564438 raise
/build/glibc-e6zv40/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
 #5 0x00007faeba56603a abort /build/glibc-e6zv40/glibc-2.23/stdlib/abort.c:91:0
 #6 0x00007faeba55cbe7 __assert_fail_base
/build/glibc-e6zv40/glibc-2.23/assert/assert.c:92:0
 #7 0x00007faeba55cc92 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc92)
 #8 0x00000000049291f4 (anonymous
namespace)::DAGCombiner::visitSUB(llvm::SDNode*) DAGCombiner.cpp:0:0
 #9 0x00000000048f8691 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*)
DAGCombiner.cpp:0:0
#10 0x00000000048f3f31 (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*) DAGCombiner.cpp:0:0
#11 0x00000000048f1254 llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults*, llvm::CodeGenOpt::Level) (bin/llc+0x48f1254)
#12 0x0000000004ab258f llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(bin/llc+0x4ab258f)
#13 0x0000000004ab15b1
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(bin/llc+0x4ab15b1)
#14 0x0000000004aadc06
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(bin/llc+0x4aadc06)
#15 0x0000000003ff8b2a
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (bin/llc+0x3ff8b2a)
#16 0x00000000044353c2 llvm::FPPassManager::runOnFunction(llvm::Function&)
(bin/llc+0x44353c2)
#17 0x000000000443c1f8 llvm::FPPassManager::runOnModule(llvm::Module&)
(bin/llc+0x443c1f8)
#18 0x0000000004435a6e llvm::legacy::PassManagerImpl::run(llvm::Module&)
(bin/llc+0x4435a6e)
#19 0x00000000029f3b00 main (bin/llc+0x29f3b00)
#20 0x00007faeba54f840 __libc_start_main
/build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:325:0
#21 0x00000000029f1029 _start (bin/llc+0x29f1029)
Aborted

-- 
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/20210331/1c6457fc/attachment-0001.html>


More information about the llvm-bugs mailing list