[llvm-bugs] [Bug 40793] New: X86 ISel gets stuck in infinite loop
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 20 12:34:42 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40793
Bug ID: 40793
Summary: X86 ISel gets stuck in infinite loop
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: andrew at scheidecker.net
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
Created attachment 21498
--> https://bugs.llvm.org/attachment.cgi?id=21498&action=edit
IR that triggers bug
Using SVN revision 354401 (from 2019/02/19), llc gets stuck in a loop on the
attached input, when run with the command-line:
llc llvm-lock.ll -mcpu=skylake-avx512
Using llc from the LLVM 6.0 release does not get stuck in a loop.
Running it with e.g. -mcpu=skylake also does not get stuck in a loop. Based on
this, I've assumed this is an X86/AVX512 target specific bug.
Passing -debug prints the following in a loop:
Promoting t1036: i16 = and t46, Constant:i16<15>
Creating new node: t1038: i32 = any_extend t46
Creating constant: t1039: i32 = Constant<15>
Creating new node: t1040: i32 = and t1038, Constant:i32<15>
Creating new node: t1041: i16 = truncate t1040
Replacing.1 t1036: i16 = and t46, Constant:i16<15>
With: t1041: i16 = truncate t1040
and 0 other values
Combining: t1037: i32 = srl Constant:i32<32733>, t1041
Creating new node: t1042: i16 = and t46, Constant:i16<15>
Creating new node: t1043: i32 = srl Constant:i32<32733>, t1042
... into: t1043: i32 = srl Constant:i32<32733>, t1042
Combining: t39: i32 = Constant<32733>
Combining: t43: i64 = any_extend t1043
Combining: t1043: i32 = srl Constant:i32<32733>, t1042
Combining: t1042: i16 = and t46, Constant:i16<15>
Breaking into the debugger shows this call stack:
`anonymous namespace'::DAGCombiner::CombineTo
`anonymous namespace'::DAGCombiner::CombineTo
`anonymous namespace'::DAGCombiner::PromoteIntBinOp
`anonymous namespace'::DAGCombiner::combine
`anonymous namespace'::DAGCombiner::Run
llvm::SelectionDAG::Combine
llvm::SelectionDAGISel::CodeGenAndEmitDAG
llvm::SelectionDAGISel::SelectBasicBlock
llvm::SelectionDAGISel::SelectAllBasicBlocks
llvm::SelectionDAGISel::runOnMachineFunction
`anonymous namespace'::X86DAGToDAGISel::runOnMachineFunction
llvm::MachineFunctionPass::runOnFunction
llvm::FPPassManager::runOnFunction
llvm::FPPassManager::runOnModule
--
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/20190220/2fe1c290/attachment.html>
More information about the llvm-bugs
mailing list