[llvm-bugs] [Bug 38538] New: "opt -indvars" increases file size from 3970 to 4796465152 bytes

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 13 01:28:31 PDT 2018


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

            Bug ID: 38538
           Summary: "opt -indvars" increases file size from 3970 to
                    4796465152 bytes
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20685
  --> https://bugs.llvm.org/attachment.cgi?id=20685&action=edit
reproducer

Something seems to go haywire in indvars when it's applied to in.ll

Running
 opt -S -o out.ll in.ll -indvars

gives an out.ll file that is huge.

The input in.ll is 3970 bytes and the output out.ll is 4796465152.

It seems like one or a few lines in the output are totally humongous:

elxhw7c132-n7[llvm]: wc out.ll
        81 1619001735 7885294709 out.ll


The first huge line I see starts like this:

  store i32 select (i1 icmp slt (i16 ashr (i16 add (i16 mul (i16 trunc (i32
select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 sel
ect (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1
icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1
 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1 icmp
slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1 icmp s
lt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16
ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16
 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr
(i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (
i16 or (i16 and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or
(i16 and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or 
(i16 and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16
and (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 an
d (i16 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16
shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 
shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl
(i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i1
6 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc
(i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc
 (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16 trunc (i32
select (i1 icmp slt (i16 ashr (i16 or (i16 shl (i16 trunc (i32 select (i1
 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x [1 x
i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0), i
16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1, i32 0) to
i16), i16 9), i16 7), i16 13), i16 0), i32 select (i1 icmp ugt (i32 select 
(i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x [1 x i16*]]], [5 x [4 x [1
x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0), i16** @g_1087), i32 -52
357337, i32 -52357338), i32 -23460), i32 1, i32 0), i32 sub (i32 select (i1
icmp ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x [
1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0), i16**
@g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1, i32 0), i3
2 sext (i16 ashr (i16 or (i16 shl (i16 trunc (i32 select (i1 icmp ugt (i32
select (i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x [1 x i16*]]], [5
 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0), i16** @g_1087), i32
-52357337, i32 -52357338), i32 -23460), i32 1, i32 0) to i16), i16 9), i
16 7), i16 13) to i32))) to i16), i16 9), i16 512), i16 7), i16 13), i16 0),
i32 select (i1 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr inbou
nds ([5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64
3, i64 0), i16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460), i
32 1, i32 0), i32 sub (i32 select (i1 icmp ugt (i32 select (i1 icmp ne (i16**
getelementptr inbounds ([5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @
g_864, i64 0, i64 1, i64 3, i64 0), i16** @g_1087), i32 -52357337, i32
-52357338), i32 -23460), i32 1, i32 0), i32 sext (i16 ashr (i16 or (i16 and
(i16
 shl (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 shl (i16 trunc
(i32 select (i1 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr in
bounds ([5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1,
i64 3, i64 0), i16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460)
, i32 1, i32 0) to i16), i16 9), i16 7), i16 13), i16 0), i32 select (i1 icmp
ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x [1 x
 i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0), i16**
@g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1, i32 0), i32 s
ub (i32 select (i1 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr
inbounds ([5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1
, i64 3, i64 0), i16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460),
i32 1, i32 0), i32 sext (i16 ashr (i16 or (i16 shl (i16 trunc (i32 select 
(i1 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x
[1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0)
, i16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1, i32 0) to
i16), i16 9), i16 7), i16 13) to i32))) to i16), i16 9), i16 512), i16 7
), i16 13) to i32))) to i16), i16 9), i16 512), i16 7), i16 13), i16 0), i32
select (i1 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds 
([5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3,
i64 0), i16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1
, i32 0), i32 sub (i32 select (i1 icmp ugt (i32 select (i1 icmp ne (i16**
getelementptr inbounds ([5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_86
4, i64 0, i64 1, i64 3, i64 0), i16** @g_1087), i32 -52357337, i32 -52357338),
i32 -23460), i32 1, i32 0), i32 sext (i16 ashr (i16 or (i16 and (i16 shl
 (i16 trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 and (i16 shl (i16
trunc (i32 select (i1 icmp slt (i16 ashr (i16 or (i16 shl (i16 trunc (i32
 select (i1 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds ([5
x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3
, i64 0), i16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1,
i32 0) to i16), i16 9), i16 7), i16 13), i16 0), i32 select (i1 icmp ugt (
i32 select (i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x [1 x i16*]]],
[5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0), i16** @g_108
7), i32 -52357337, i32 -52357338), i32 -23460), i32 1, i32 0), i32 sub (i32
select (i1 icmp ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds (
[5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3,
i64 0), i16** @g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1,
 i32 0), i32 sext (i16 ashr (i16 or (i16 shl (i16 trunc (i32 select (i1 icmp
ugt (i32 select (i1 icmp ne (i16** getelementptr inbounds ([5 x [4 x [1 x 
i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0, i64 1, i64 3, i64 0), i16**
@g_1087), i32 -52357337, i32 -52357338), i32 -23460), i32 1, i32 0) to i16)
, i16 9), i16 7), i16 13) to i32))) to i16), i16 9), i16 512), i16 7), i16 13),
i16 0), i32 select (i1 icmp ugt (i32 select (i1 icmp ne (i16** geteleme
ntptr inbounds ([5 x [4 x [1 x i16*]]], [5 x [4 x [1 x i16*]]]* @g_864, i64 0,
i64 1, i64 3, i64 0), i16** @g_1087), i32 -52357337, i32 -52357338), i32

-- 
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/20180813/ebafebeb/attachment-0001.html>


More information about the llvm-bugs mailing list