Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Bad machine code: No live subrange at use #41521

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR42552
Status NEW
Importance P enhancement
Reported by Jonas Paulsson (paulsson@linux.vnet.ibm.com)
Reported on 2019-07-09 06:43:46 -0700
Last modified on 2019-07-09 06:45:53 -0700
Version trunk
Hardware PC Linux
CC kparzysz@quicinc.com, llvm-bugs@lists.llvm.org, paulsson@linux.vnet.ibm.com, quentin.colombet@gmail.com, uweigand@de.ibm.com
Fixed by commit(s)
Attachments tc.ll (22623 bytes, text/plain)
crash2.bc (128468 bytes, application/octet-stream)
Blocks
Blocked by
See also
Created attachment 22213
reduced testcase

llc ./tc.ll -mtriple=s390x-linux-gnu -mcpu=z13 -o out.s -verify-machineinstrs -
systemz-subreg-liveness -lsr-complexity-limit=8 -consthoist-gep -pre-RA-
sched=list-ilp -disable-machine-licm -disable-machine-cse -misched=ilpmin

*** Bad machine code: No live subrange at use ***
- function:    main
- basic block: %bb.5 bb132 (0x5db6d48) [1608B;4560B)
- instruction: 3600B    undef %182.subreg_h64:gr128bit = COPY
%181.subreg_h64:gr128bit
- operand 1:   %181.subreg_h64:gr128bit
- interval:    %181 [3476r,3600r:0)  0@3476r L00000008 [3476r,3600r:0)  0@3476r
weight:1.202965e+07
- at:          3600B
LLVM ERROR: Found 1 machine code errors.

There is something strange here: If I rename tc.ll to ./tc_nolive_subr_atuse.ll
there seem to be a random variation of the pre-RA-sched=list-ilp scheduler, as
the MF is not then identical, and the bug disappears! (I guess this should be
reported as a separate bug?)

What's more: if I do -stop/start-before=simple-register-coalescing, the bug
also becomes hidden...

I am using r365452 (2c0337f) "Retire VS2015 Support".
Quuxplusone commented 5 years ago

Attached tc.ll (22623 bytes, text/plain): reduced testcase

Quuxplusone commented 5 years ago

Attached crash2.bc (128468 bytes, application/octet-stream): unreduced test case, llc input